summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKujtim Hoxha <[email protected]>2025-04-21 16:50:10 +0200
committerKujtim Hoxha <[email protected]>2025-04-21 16:50:10 +0200
commitd7569d79c6da1437fe46343ed13810df6c8cae1f (patch)
tree477f3af31a67ff1ced2931fd14e9eee48bb75ac1
parented3518d0755cb5cae25d9d8f1690ab2e60702588 (diff)
downloadopencode-d7569d79c6da1437fe46343ed13810df6c8cae1f.tar.gz
opencode-d7569d79c6da1437fe46343ed13810df6c8cae1f.zip
prevent the editor when agent busy
-rw-r--r--internal/tui/components/chat/editor.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/tui/components/chat/editor.go b/internal/tui/components/chat/editor.go
index 963fbbdbf..4f6937039 100644
--- a/internal/tui/components/chat/editor.go
+++ b/internal/tui/components/chat/editor.go
@@ -132,6 +132,9 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
case tea.KeyMsg:
if key.Matches(msg, focusedKeyMaps.OpenEditor) {
+ if m.app.CoderAgent.IsSessionBusy(m.session.ID) {
+ return m, util.ReportWarn("Agent is working, please wait...")
+ }
return m, openEditor()
}
// if the key does not match any binding, return