@@ -49,8 +49,11 @@ type Commands struct {
4949 Close key.Binding
5050 }
5151
52− sessionID string // can be empty for non-session-specific commands
53− selected CommandType
52+ sessionID string
53+ hasSession bool
54+ hasTodos bool
55+ hasQueue bool
56+ selected CommandType
5457
5558 spinner spinner.Model
5659 loading bool
@@ -68,11 +71,14 @@ type Commands struct {
6871var _ Dialog = (*Commands)(nil)
6972
7073// NewCommands creates a new commands dialog.
71−func NewCommands(com *common.Common, sessionID string, customCommands []commands.CustomCommand, mcpPrompts []commands.MCPPrompt) (*Commands, error) {
74+func NewCommands(com *common.Common, sessionID string, hasSession, hasTodos, hasQueue bool, customCommands []commands.CustomCommand, mcpPrompts []commands.MCPPrompt) (*Commands, error) {
7275 c := &Commands{
7376 com: com,
7477 selected: SystemCommands,
7578 sessionID: sessionID,
79+ hasSession: hasSession,
80+ hasTodos: hasTodos,
81+ hasQueue: hasQueue,
7682 customCommands: customCommands,
7783 mcpPrompts: mcpPrompts,
7884 }
@@ -387,7 +393,7 @@ func (c *Commands) defaultCommands() []*CommandItem {
387393 }
388394
389395 // Only show compact command if there's an active session
390− if c.sessionID != "" {
396+ if c.hasSession {
391397 commands = append(commands, NewCommandItem(c.com.Styles, "summarize", "Summarize Session", "", ActionSummarize{SessionID: c.sessionID}))
392398 }
393399
@@ -417,10 +423,10 @@ func (c *Commands) defaultCommands() []*CommandItem {
417423 }
418424 }
419425 // Only show toggle compact mode command if window width is larger than compact breakpoint (120)
420− if c.windowWidth >= sidebarCompactModeBreakpoint && c.sessionID != "" {
426+ if c.windowWidth >= sidebarCompactModeBreakpoint && c.hasSession {
421427 commands = append(commands, NewCommandItem(c.com.Styles, "toggle_sidebar", "Toggle Sidebar", "", ActionToggleCompactMode{}))
422428 }
423− if c.sessionID != "" {
429+ if c.hasSession {
424430 cfg := c.com.Config()
425431 agentCfg := cfg.Agents[config.AgentCoder]
426432 model := cfg.GetModelByType(agentCfg.Model)
@@ -437,12 +443,27 @@ func (c *Commands) defaultCommands() []*CommandItem {
437443 commands = append(commands, NewCommandItem(c.com.Styles, "open_external_editor", "Open External Editor", "ctrl+o", ActionExternalEditor{}))
438444 }
439445
440− return append(commands,
446+ if c.hasTodos || c.hasQueue {
447+ var label string
448+ switch {
449+ case c.hasTodos && c.hasQueue:
450+ label = "Toggle To-Dos/Queue"
451+ case c.hasQueue:
452+ label = "Toggle Queue"
453+ default:
454+ label = "Toggle To-Dos"
455+ }
456+ commands = append(commands, NewCommandItem(c.com.Styles, "toggle_pills", label, "ctrl+t", ActionTogglePills{}))
457+ }
458+
459+ commands = append(commands,
441460 NewCommandItem(c.com.Styles, "toggle_yolo", "Toggle Yolo Mode", "", ActionToggleYoloMode{}),
442461 NewCommandItem(c.com.Styles, "toggle_help", "Toggle Help", "ctrl+g", ActionToggleHelp{}),
443462 NewCommandItem(c.com.Styles, "init", "Initialize Project", "", ActionInitializeProject{}),
444463 NewCommandItem(c.com.Styles, "quit", "Quit", "ctrl+c", tea.QuitMsg{}),
445464 )
465+
466+ return commands
446467}
447468
448469// SetCustomCommands sets the custom commands and refreshes the view if user commands are currently displayed.