on main help sign in
fix: tab to chat only when in chat
891b535Kujtim Hoxha
internal/ui/model/ui.go+6−4
@@ -1433,10 +1433,12 @@ func (m *UI) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
1433 }
1433 }
1434 m.newSession()
1434 m.newSession()
1435 case key.Matches(msg, m.keyMap.Tab):
1435 case key.Matches(msg, m.keyMap.Tab):
1436+ if m.state != uiLanding {
1436− m.focus = uiFocusMain
1437+ m.focus = uiFocusMain
1437− m.textarea.Blur()
1438+ m.textarea.Blur()
1438− m.chat.Focus()
1439+ m.chat.Focus()
1439− m.chat.SetSelected(m.chat.Len() - 1)
1440+ m.chat.SetSelected(m.chat.Len() - 1)
1441+ }
1440 case key.Matches(msg, m.keyMap.Editor.OpenEditor):
1442 case key.Matches(msg, m.keyMap.Editor.OpenEditor):
1441 if m.isAgentBusy() {
1443 if m.isAgentBusy() {
1442 cmds = append(cmds, uiutil.ReportWarn("Agent is working, please wait..."))
1444 cmds = append(cmds, uiutil.ReportWarn("Agent is working, please wait..."))