diff --git a/internal/tui/page/chat/chat.go b/internal/tui/page/chat/chat.go index 1d6e6ee0554a2d5e8a791f92363767e3b68f44ed..770644357ab2c65911f4531e5edbf60735eda3ec 100644 --- a/internal/tui/page/chat/chat.go +++ b/internal/tui/page/chat/chat.go @@ -287,6 +287,9 @@ func (p *chatPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case tea.KeyPressMsg: switch { case key.Matches(msg, p.keyMap.NewSession): + if p.app.CoderAgent.IsBusy() { + return p, util.ReportWarn("Agent is busy, please wait before starting a new session...") + } return p, p.newSession() case key.Matches(msg, p.keyMap.AddAttachment): agentCfg := config.Get().Agents["coder"]