Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T05:01:52.065Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

repl_settings.rs

45 lines · 1.5 KB · rust
1use settings::{RegisterSetting, Settings};
2
3/// Settings for configuring REPL display and behavior.
4#[derive(Clone, Debug, RegisterSetting)]
5pub struct ReplSettings {
6    /// Maximum number of lines to keep in REPL's scrollback buffer.
7    /// Clamped with [4, 256] range.
8    ///
9    /// Default: 32
10    pub max_lines: usize,
11    /// Maximum number of columns to keep in REPL's scrollback buffer.
12    /// Clamped with [20, 512] range.
13    ///
14    /// Default: 128
15    pub max_columns: usize,
16    /// Whether to show small single-line outputs inline instead of in a block.
17    ///
18    /// Default: true
19    pub inline_output: bool,
20    /// Maximum number of characters for an output to be shown inline.
21    /// Only applies when `inline_output` is true.
22    ///
23    /// Default: 50
24    pub inline_output_max_length: usize,
25    /// Maximum number of lines of output to display before scrolling.
26    /// Set to 0 to disable output height limits.
27    ///
28    /// Default: 0
29    pub output_max_height_lines: usize,
30}
31
32impl Settings for ReplSettings {
33    fn from_settings(content: &settings::SettingsContent) -> Self {
34        let repl = content.repl.as_ref().unwrap();
35
36        Self {
37            max_lines: repl.max_lines.unwrap(),
38            max_columns: repl.max_columns.unwrap(),
39            inline_output: repl.inline_output.unwrap_or(true),
40            inline_output_max_length: repl.inline_output_max_length.unwrap_or(50),
41            output_max_height_lines: repl.output_max_height_lines.unwrap_or(0),
42        }
43    }
44}
45
Served at tenant.openagents/omega Member data and write actions are omitted.