diff --git a/internal/ui/dialog/commands.go b/internal/ui/dialog/commands.go index 0b0185b03a3c992ce55ff9164ceba6115260c174..a560ce21c0a8985ddd245dffbb6045ec08350212 100644 --- a/internal/ui/dialog/commands.go +++ b/internal/ui/dialog/commands.go @@ -27,9 +27,7 @@ type CommandType uint func (c CommandType) String() string { return []string{"System", "User", "MCP"}[c] } const ( - sidebarCompactModeBreakpoint = 120 - defaultCommandsDialogMaxHeight = 20 - defaultCommandsDialogMaxWidth = 70 + sidebarCompactModeBreakpoint = 120 ) const ( @@ -240,8 +238,8 @@ func commandsRadioView(sty *styles.Styles, selected CommandType, hasUserCmds boo // Draw implements [Dialog]. func (c *Commands) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor { t := c.com.Styles - width := max(0, min(defaultCommandsDialogMaxWidth, area.Dx()-t.Dialog.View.GetHorizontalBorderSize())) - height := max(0, min(defaultCommandsDialogMaxHeight, area.Dy()-t.Dialog.View.GetVerticalBorderSize())) + width := max(0, min(defaultDialogMaxWidth, area.Dx()-t.Dialog.View.GetHorizontalBorderSize())) + height := max(0, min(defaultDialogHeight, area.Dy()-t.Dialog.View.GetVerticalBorderSize())) if area.Dx() != c.windowWidth && c.selected == SystemCommands { c.windowWidth = area.Dx() // since some items in the list depend on width (e.g. toggle sidebar command), diff --git a/internal/ui/dialog/dialog.go b/internal/ui/dialog/dialog.go index 990b4ed68174bee20d627dec5f7176d9466b77d8..15e0fa52f5ab7b181e5659e7526213d254f01931 100644 --- a/internal/ui/dialog/dialog.go +++ b/internal/ui/dialog/dialog.go @@ -11,9 +11,9 @@ import ( // Dialog sizing constants. const ( // defaultDialogMaxWidth is the maximum width for standard dialogs. - defaultDialogMaxWidth = 120 + defaultDialogMaxWidth = 70 // defaultDialogHeight is the default height for standard dialogs. - defaultDialogHeight = 30 + defaultDialogHeight = 20 // titleContentHeight is the height of the title content line. titleContentHeight = 1 // inputContentHeight is the height of the input content line.