agent: Make assistant panel input size configurable (#37975)
Release Notes: - Added the `agent. message_editor_min_lines `setting to allow users to customize the agent panel message editor default size by using a different minimum number of lines. <img width="800" height="1316" alt="Screenshot 2025-09-11 at 5 47 18 pm" src="https://github.com/user-attachments/assets/20990b90-c4f9-4f5c-af59-76358642a273" /> --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This commit is contained in:
co-authored by
Danilo Leal
parent
ceb907e0dc
commit
6446963a0c
@@ -75,6 +75,7 @@ pub struct AgentSettings {
|
||||
pub expand_edit_card: bool,
|
||||
pub expand_terminal_card: bool,
|
||||
pub use_modifier_to_send: bool,
|
||||
pub message_editor_min_lines: usize,
|
||||
}
|
||||
|
||||
impl AgentSettings {
|
||||
@@ -107,6 +108,10 @@ impl AgentSettings {
|
||||
model,
|
||||
});
|
||||
}
|
||||
|
||||
pub fn set_message_editor_max_lines(&self) -> usize {
|
||||
self.message_editor_min_lines * 2
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
|
||||
@@ -320,6 +325,10 @@ pub struct AgentSettingsContent {
|
||||
///
|
||||
/// Default: false
|
||||
use_modifier_to_send: Option<bool>,
|
||||
/// Minimum number of lines of height the agent message editor should have.
|
||||
///
|
||||
/// Default: 4
|
||||
message_editor_min_lines: Option<usize>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Default)]
|
||||
@@ -472,6 +481,10 @@ impl Settings for AgentSettings {
|
||||
&mut settings.use_modifier_to_send,
|
||||
value.use_modifier_to_send,
|
||||
);
|
||||
merge(
|
||||
&mut settings.message_editor_min_lines,
|
||||
value.message_editor_min_lines,
|
||||
);
|
||||
|
||||
settings
|
||||
.model_parameters
|
||||
|
||||
Reference in New Issue
Block a user