on main help sign in
fix: handle new session when focused on the list
commit698b7c8049bd0bb75fccc47c11d472cb500b16ba authorKujtim Hoxha <kujtimii.h@gmail.com> dateThu 22 Jan 2026, 15:25 (9 months ago) parent891b535
2 files changed+12−2
internal/ui/model/keys.go+2−2 internal/ui/model/ui.go+10
internal/ui/model/keys.go+2−2
@@ -166,11 +166,11 @@ func DefaultKeyMap() KeyMap {
166166 )
167167
168168 km.Chat.Down = key.NewBinding(
169− key.WithKeys("down", "ctrl+j", "ctrl+n", "j"),
169+ key.WithKeys("down", "ctrl+j", "j"),
170170 key.WithHelp("↓", "down"),
171171 )
172172 km.Chat.Up = key.NewBinding(
173− key.WithKeys("up", "ctrl+k", "ctrl+p", "k"),
173+ key.WithKeys("up", "ctrl+k", "k"),
174174 key.WithHelp("↑", "up"),
175175 )
176176 km.Chat.UpDown = key.NewBinding(
internal/ui/model/ui.go+10
@@ -1511,6 +1511,16 @@ func (m *UI) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
15111511 m.focus = uiFocusEditor
15121512 cmds = append(cmds, m.textarea.Focus())
15131513 m.chat.Blur()
1514+ case key.Matches(msg, m.keyMap.Chat.NewSession):
1515+ if !m.hasSession() {
1516+ break
1517+ }
1518+ if m.isAgentBusy() {
1519+ cmds = append(cmds, uiutil.ReportWarn("Agent is busy, please wait before starting a new session..."))
1520+ break
1521+ }
1522+ m.focus = uiFocusEditor
1523+ m.newSession()
15141524 case key.Matches(msg, m.keyMap.Chat.Expand):
15151525 m.chat.ToggleExpandedSelectedItem()
15161526 case key.Matches(msg, m.keyMap.Chat.Up):