@@ -265,6 +265,8 @@ func New(com *common.Common) *UI {
265265 completions: comp,
266266 attachments: attachments,
267267 todoSpinner: todoSpinner,
268+ lspStates: make(map[string]app.LSPClientInfo),
269+ mcpStates: make(map[string]mcp.ClientInfo),
268270 }
269271
270272 status := NewStatus(com, ui)
@@ -1106,6 +1108,7 @@ func (m *UI) handleDialogMsg(msg tea.Msg) tea.Cmd {
11061108 break
11071109 }
11081110 cmds = append(cmds, m.initializeProject())
1111+ m.dialog.CloseDialog(dialog.CommandsID)
11091112
11101113 case dialog.ActionSelectModel:
11111114 if m.isAgentBusy() {
@@ -1329,6 +1332,13 @@ func (m *UI) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
13291332 }
13301333 return true
13311334 }
1335+ case key.Matches(msg, m.keyMap.Suspend):
1336+ if m.isAgentBusy() {
1337+ cmds = append(cmds, uiutil.ReportWarn("Agent is busy, please wait..."))
1338+ return true
1339+ }
1340+ cmds = append(cmds, tea.Suspend)
1341+ return true
13321342 }
13331343 return false
13341344 }
@@ -1430,10 +1440,12 @@ func (m *UI) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
14301440 }
14311441 m.newSession()
14321442 case key.Matches(msg, m.keyMap.Tab):
1433− m.focus = uiFocusMain
1434− m.textarea.Blur()
1435− m.chat.Focus()
1436− m.chat.SetSelected(m.chat.Len() - 1)
1443+ if m.state != uiLanding {
1444+ m.focus = uiFocusMain
1445+ m.textarea.Blur()
1446+ m.chat.Focus()
1447+ m.chat.SetSelected(m.chat.Len() - 1)
1448+ }
14371449 case key.Matches(msg, m.keyMap.Editor.OpenEditor):
14381450 if m.isAgentBusy() {
14391451 cmds = append(cmds, uiutil.ReportWarn("Agent is working, please wait..."))
@@ -1506,6 +1518,16 @@ func (m *UI) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
15061518 m.focus = uiFocusEditor
15071519 cmds = append(cmds, m.textarea.Focus())
15081520 m.chat.Blur()
1521+ case key.Matches(msg, m.keyMap.Chat.NewSession):
1522+ if !m.hasSession() {
1523+ break
1524+ }
1525+ if m.isAgentBusy() {
1526+ cmds = append(cmds, uiutil.ReportWarn("Agent is busy, please wait before starting a new session..."))
1527+ break
1528+ }
1529+ m.focus = uiFocusEditor
1530+ m.newSession()
15091531 case key.Matches(msg, m.keyMap.Chat.Expand):
15101532 m.chat.ToggleExpandedSelectedItem()
15111533 case key.Matches(msg, m.keyMap.Chat.Up):