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
|
help Show this help
|
||||||
|
|
||||||
TUI Controls:
|
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
|
Tab / Shift+Tab Cycle tabs
|
||||||
Ctrl+C Show quit confirmation (press twice quickly to force quit)
|
Ctrl+C Show quit confirmation (press twice quickly to force quit)
|
||||||
|
|
||||||
|
|||||||
@@ -248,24 +248,24 @@ var keys = keyMap{
|
|||||||
key.WithHelp("n/esc", "no"),
|
key.WithHelp("n/esc", "no"),
|
||||||
),
|
),
|
||||||
Dashboard: key.NewBinding(
|
Dashboard: key.NewBinding(
|
||||||
key.WithKeys("1"),
|
key.WithKeys("alt+1"),
|
||||||
key.WithHelp("1", "dashboard"),
|
key.WithHelp("alt+1", "dashboard"),
|
||||||
),
|
),
|
||||||
Chat: key.NewBinding(
|
Chat: key.NewBinding(
|
||||||
key.WithKeys("2"),
|
key.WithKeys("alt+2"),
|
||||||
key.WithHelp("2", "chat"),
|
key.WithHelp("alt+2", "chat"),
|
||||||
),
|
),
|
||||||
Workflow: key.NewBinding(
|
Workflow: key.NewBinding(
|
||||||
key.WithKeys("3"),
|
key.WithKeys("alt+3"),
|
||||||
key.WithHelp("3", "workflow"),
|
key.WithHelp("alt+3", "workflow"),
|
||||||
),
|
),
|
||||||
Agents: key.NewBinding(
|
Agents: key.NewBinding(
|
||||||
key.WithKeys("4"),
|
key.WithKeys("alt+4"),
|
||||||
key.WithHelp("4", "agents"),
|
key.WithHelp("alt+4", "agents"),
|
||||||
),
|
),
|
||||||
Config: key.NewBinding(
|
Config: key.NewBinding(
|
||||||
key.WithKeys("5"),
|
key.WithKeys("alt+5"),
|
||||||
key.WithHelp("5", "config"),
|
key.WithHelp("alt+5", "config"),
|
||||||
),
|
),
|
||||||
Install: key.NewBinding(
|
Install: key.NewBinding(
|
||||||
key.WithKeys("i"),
|
key.WithKeys("i"),
|
||||||
@@ -463,23 +463,23 @@ func (m Model) handleKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
|||||||
m.confirmCursor = 1
|
m.confirmCursor = 1
|
||||||
m.viewport.SetContent(m.renderContent())
|
m.viewport.SetContent(m.renderContent())
|
||||||
return m, nil
|
return m, nil
|
||||||
case "1":
|
case "alt+1":
|
||||||
m.activeTab = tabDashboard
|
m.activeTab = tabDashboard
|
||||||
m.resizeViewport()
|
m.resizeViewport()
|
||||||
return m, nil
|
return m, nil
|
||||||
case "2":
|
case "alt+2":
|
||||||
m.activeTab = tabChat
|
m.activeTab = tabChat
|
||||||
m.resizeViewport()
|
m.resizeViewport()
|
||||||
return m, nil
|
return m, nil
|
||||||
case "3":
|
case "alt+3":
|
||||||
m.activeTab = tabWorkflow
|
m.activeTab = tabWorkflow
|
||||||
m.resizeViewport()
|
m.resizeViewport()
|
||||||
return m, nil
|
return m, nil
|
||||||
case "4":
|
case "alt+4":
|
||||||
m.activeTab = tabAgents
|
m.activeTab = tabAgents
|
||||||
m.resizeViewport()
|
m.resizeViewport()
|
||||||
return m, nil
|
return m, nil
|
||||||
case "5":
|
case "alt+5":
|
||||||
m.activeTab = tabConfig
|
m.activeTab = tabConfig
|
||||||
m.resizeViewport()
|
m.resizeViewport()
|
||||||
return m, nil
|
return m, nil
|
||||||
@@ -1411,11 +1411,11 @@ func (m Model) renderFooter() string {
|
|||||||
case tabDashboard:
|
case tabDashboard:
|
||||||
helpText = "[i] install [u] update [s] scan [l] lsp [m] mcp"
|
helpText = "[i] install [u] update [s] scan [l] lsp [m] mcp"
|
||||||
case tabChat, tabWorkflow:
|
case tabChat, tabWorkflow:
|
||||||
helpText = "[1-5] tabs [tab] next [ctrl+c] quit"
|
helpText = "[alt+1-5] tabs [tab] next [ctrl+c] quit"
|
||||||
case tabAgents:
|
case tabAgents:
|
||||||
helpText = "[c] crush [l] claude"
|
helpText = "[c] crush [l] claude"
|
||||||
default:
|
default:
|
||||||
helpText = "[1-5] tabs [tab] next [ctrl+c] quit"
|
helpText = "[alt+1-5] tabs [tab] next [ctrl+c] quit"
|
||||||
}
|
}
|
||||||
rightR := statusBarStyle.Render(helpText)
|
rightR := statusBarStyle.Render(helpText)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user