@@ -27,8 +27,9 @@ type CommandType uint
27func (c CommandType) String() string { return []string{"System", "User", "MCP"}[c] }
27func (c CommandType) String() string { return []string{"System", "User", "MCP"}[c] }
30− sidebarCompactModeBreakpoint = 120
30+ sidebarCompactModeBreakpoint = 120
31+ defaultCommandsDialogMaxHeight = 20
31− defaultCommandsDialogMaxWidth = 70
32+ defaultCommandsDialogMaxWidth = 70
@@ -240,7 +241,7 @@ func commandsRadioView(sty *styles.Styles, selected CommandType, hasUserCmds boo
240func (c *Commands) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor {
241func (c *Commands) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor {
241 t := c.com.Styles
242 t := c.com.Styles
242 width := max(0, min(defaultCommandsDialogMaxWidth, area.Dx()))
243 width := max(0, min(defaultCommandsDialogMaxWidth, area.Dx()))
243− height := max(0, min(defaultDialogHeight, area.Dy()))
244+ height := max(0, min(defaultCommandsDialogMaxHeight, area.Dy()))
244 if area.Dx() != c.windowWidth && c.selected == SystemCommands {
245 if area.Dx() != c.windowWidth && c.selected == SystemCommands {
245 c.windowWidth = area.Dx()
246 c.windowWidth = area.Dx()
246 // since some items in the list depend on width (e.g. toggle sidebar command),
247 // since some items in the list depend on width (e.g. toggle sidebar command),