Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Clarify how `agent.flexible` affects `agent.default_width` (#63020)
Dom Porada5151c7953d6b
diff --git a/assets/settings/default.json b/assets/settings/default.jsonindex 75afc59d01a..4dc6720bd6f 100644--- a/assets/settings/default.json+++ b/assets/settings/default.json@@ -1146,13 +1146,16 @@"button": true,// Where to dock the agent panel. Can be 'left', 'right' or 'bottom'."dock": "left",- // Whether the agent panel should use flexible (proportional) sizing.+ // Whether the agent panel should use flexible (proportional) sizing when docked+ // to the left or right. When enabled, `default_width` does not control the panel+ // width, and resetting the panel restores the default proportion.//// Default: true"flexible": true,// Where to position the threads sidebar. Can be 'left' or 'right'."sidebar_side": "left",- // Default width when the agent panel is docked to the left or right.+ // Default fixed width when the agent panel is docked to the left or right and+ // `flexible` is false."default_width": 640,// Default height when the agent panel is docked to the bottom."default_height": 320,diff --git a/crates/settings_content/src/agent.rs b/crates/settings_content/src/agent.rsindex 61e189244b6..4c39f33ab6c 100644--- a/crates/settings_content/src/agent.rs+++ b/crates/settings_content/src/agent.rs@@ -206,7 +206,11 @@ pub struct AgentSettingsContent {////// Default: left (Agentic layout), right (Classic layout)pub dock: Option<DockPosition>,- /// Whether the agent panel should use flexible (proportional) sizing.+ /// Whether the agent panel should use flexible (proportional) sizing when docked to the+ /// left or right.+ ///+ /// When enabled, `default_width` does not control the panel width, and resetting the panel+ /// restores the default proportion.////// Default: truepub flexible: Option<bool>,@@ -214,7 +218,8 @@ pub struct AgentSettingsContent {////// Default: leftpub sidebar_side: Option<SidebarDockPosition>,- /// Default width in pixels when the agent panel is docked to the left or right.+ /// Default fixed width in pixels when the agent panel is docked to the left or right and+ /// `flexible` is false.////// Default: 640pub default_width: Option<crate::PixelSetting>,diff --git a/crates/settings_ui/src/page_data.rs b/crates/settings_ui/src/page_data.rsindex 19e802a2a27..bbb952fdf24 100644--- a/crates/settings_ui/src/page_data.rs+++ b/crates/settings_ui/src/page_data.rs@@ -6862,7 +6862,7 @@ fn panels_page() -> SettingsPage {}),SettingsPageItem::SettingItem(SettingItem {title: "Agent Panel Flexible Sizing",- description: "Whether the agent panel should use flexible (proportional) sizing when docked to the left or right.",+ description: "Whether the agent panel should use flexible (proportional) sizing when docked to the left or right. When enabled, the default width does not control the panel width, and resetting the panel restores the default proportion.",field: Box::new(SettingField {organization_override: None,json_path: Some("agent.flexible"),@@ -6876,7 +6876,7 @@ fn panels_page() -> SettingsPage {}),SettingsPageItem::SettingItem(SettingItem {title: "Agent Panel Default Width",- description: "Default width when the agent panel is docked to the left or right.",+ description: "Default fixed width when the agent panel is docked to the left or right and flexible sizing is disabled.",field: Box::new(SettingField {organization_override: None,json_path: Some("agent.default_width"),diff --git a/docs/src/reference/all-settings.md b/docs/src/reference/all-settings.mdindex d501e392172..4ac82c90cc2 100644--- a/docs/src/reference/all-settings.md+++ b/docs/src/reference/all-settings.md@@ -88,6 +88,39 @@ Non-negative `float` values}```+## Agent Panel {#agent-panel}++To configure panel sizing, open the Settings Editor and search for “Agent Panel Default Width” or “Agent Panel Flexible Sizing”.++### Default Width {#agent-panel-default-width}++- Description: Default fixed width in pixels when the agent panel is docked to the left or right and `agent.flexible` is `false`.+- Setting: `agent.default_width`+- Default: `640`++### Flexible Sizing {#agent-panel-flexible-sizing}++- Description: Whether the agent panel uses flexible (proportional) sizing when docked to the left or right. When enabled, `agent.default_width` does not control the panel width, and double-clicking the panel’s outer resize handle restores the default proportion.+- Setting: `agent.flexible`+- Default: `true`++**Options**++`boolean` values++To use a fixed reset width, disable flexible sizing in the Settings Editor. Or add this to your settings.json:++```json [settings]+{+ "agent": {+ "default_width": 640,+ "flexible": false+ }+}+```++See [Agent Panel visual customization](../visual-customization.md#agent-panel) for other panel appearance settings.+## Agent UI Font Size- Description: The font size for text in the agent panel. Inherits the UI font size if unset.diff --git a/docs/src/visual-customization.md b/docs/src/visual-customization.mdindex f40ebd36fc5..682b61b711f 100644--- a/docs/src/visual-customization.md+++ b/docs/src/visual-customization.md@@ -523,7 +523,8 @@ Project panel can be shown/hidden with {#action project_panel::ToggleFocus} ({#k"enabled": true, // Enable/disable the agent"button": true, // Show/hide the icon in the status bar"dock": "right", // Where to dock: left, right, bottom- "default_width": 640, // Default width (left/right docked)+ "flexible": true, // Use proportional sizing (left/right docked)+ "default_width": 640, // Fixed width when flexible is false"default_height": 320 // Default height (bottom docked)},// Controls the font family and size for agent responses in the agent panel.@@ -538,6 +539,8 @@ Project panel can be shown/hidden with {#action project_panel::ToggleFocus} ({#k}```+When `agent.flexible` is enabled, `agent.default_width` does not control the panel width. Double-clicking the panel’s outer resize handle restores the default proportion. Set `agent.flexible` to `false` to use `agent.default_width` as the reset width.+See [Zed AI Documentation](./ai/overview.md) for additional non-visual AI settings.## Terminal Panel