fix: use Alt+1-5 for tab navigation to free number keys for input
All checks were successful
CI / build (push) Successful in 1m46s
All checks were successful
CI / build (push) Successful in 1m46s
💘 Generated with Crush Assisted-by: GLM-5.1 via Crush <crush@charm.land>
This commit is contained in:
@@ -83,7 +83,7 @@ Commands:
|
||||
help Show this help
|
||||
|
||||
TUI Controls:
|
||||
1-5 Switch tabs (Dashboard/Chat/Workflow/Agents/Config)
|
||||
Alt+1-5 Switch tabs (Dashboard/Chat/Workflow/Agents/Config)
|
||||
Tab / Shift+Tab Cycle tabs
|
||||
Ctrl+C Show quit confirmation (press twice quickly to force quit)
|
||||
|
||||
|
||||
@@ -248,24 +248,24 @@ var keys = keyMap{
|
||||
key.WithHelp("n/esc", "no"),
|
||||
),
|
||||
Dashboard: key.NewBinding(
|
||||
key.WithKeys("1"),
|
||||
key.WithHelp("1", "dashboard"),
|
||||
key.WithKeys("alt+1"),
|
||||
key.WithHelp("alt+1", "dashboard"),
|
||||
),
|
||||
Chat: key.NewBinding(
|
||||
key.WithKeys("2"),
|
||||
key.WithHelp("2", "chat"),
|
||||
key.WithKeys("alt+2"),
|
||||
key.WithHelp("alt+2", "chat"),
|
||||
),
|
||||
Workflow: key.NewBinding(
|
||||
key.WithKeys("3"),
|
||||
key.WithHelp("3", "workflow"),
|
||||
key.WithKeys("alt+3"),
|
||||
key.WithHelp("alt+3", "workflow"),
|
||||
),
|
||||
Agents: key.NewBinding(
|
||||
key.WithKeys("4"),
|
||||
key.WithHelp("4", "agents"),
|
||||
key.WithKeys("alt+4"),
|
||||
key.WithHelp("alt+4", "agents"),
|
||||
),
|
||||
Config: key.NewBinding(
|
||||
key.WithKeys("5"),
|
||||
key.WithHelp("5", "config"),
|
||||
key.WithKeys("alt+5"),
|
||||
key.WithHelp("alt+5", "config"),
|
||||
),
|
||||
Install: key.NewBinding(
|
||||
key.WithKeys("i"),
|
||||
@@ -463,23 +463,23 @@ func (m Model) handleKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
||||
m.confirmCursor = 1
|
||||
m.viewport.SetContent(m.renderContent())
|
||||
return m, nil
|
||||
case "1":
|
||||
case "alt+1":
|
||||
m.activeTab = tabDashboard
|
||||
m.resizeViewport()
|
||||
return m, nil
|
||||
case "2":
|
||||
case "alt+2":
|
||||
m.activeTab = tabChat
|
||||
m.resizeViewport()
|
||||
return m, nil
|
||||
case "3":
|
||||
case "alt+3":
|
||||
m.activeTab = tabWorkflow
|
||||
m.resizeViewport()
|
||||
return m, nil
|
||||
case "4":
|
||||
case "alt+4":
|
||||
m.activeTab = tabAgents
|
||||
m.resizeViewport()
|
||||
return m, nil
|
||||
case "5":
|
||||
case "alt+5":
|
||||
m.activeTab = tabConfig
|
||||
m.resizeViewport()
|
||||
return m, nil
|
||||
@@ -1411,11 +1411,11 @@ func (m Model) renderFooter() string {
|
||||
case tabDashboard:
|
||||
helpText = "[i] install [u] update [s] scan [l] lsp [m] mcp"
|
||||
case tabChat, tabWorkflow:
|
||||
helpText = "[1-5] tabs [tab] next [ctrl+c] quit"
|
||||
helpText = "[alt+1-5] tabs [tab] next [ctrl+c] quit"
|
||||
case tabAgents:
|
||||
helpText = "[c] crush [l] claude"
|
||||
default:
|
||||
helpText = "[1-5] tabs [tab] next [ctrl+c] quit"
|
||||
helpText = "[alt+1-5] tabs [tab] next [ctrl+c] quit"
|
||||
}
|
||||
rightR := statusBarStyle.Render(helpText)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user