on main help sign in
prevent the editor when agent busy
d7569d7Kujtim Hoxha
internal/tui/components/chat/editor.go+3
@@ -132,6 +132,9 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
132 }
132 }
133 case tea.KeyMsg:
133 case tea.KeyMsg:
134 if key.Matches(msg, focusedKeyMaps.OpenEditor) {
134 if key.Matches(msg, focusedKeyMaps.OpenEditor) {
135+ if m.app.CoderAgent.IsSessionBusy(m.session.ID) {
136+ return m, util.ReportWarn("Agent is working, please wait...")
137+ }
135 return m, openEditor()
138 return m, openEditor()
136 }
139 }
137 // if the key does not match any binding, return
140 // if the key does not match any binding, return