diff options
| author | Kujtim Hoxha <[email protected]> | 2025-04-21 16:50:10 +0200 |
|---|---|---|
| committer | Kujtim Hoxha <[email protected]> | 2025-04-21 16:50:10 +0200 |
| commit | d7569d79c6da1437fe46343ed13810df6c8cae1f (patch) | |
| tree | 477f3af31a67ff1ced2931fd14e9eee48bb75ac1 | |
| parent | ed3518d0755cb5cae25d9d8f1690ab2e60702588 (diff) | |
| download | opencode-d7569d79c6da1437fe46343ed13810df6c8cae1f.tar.gz opencode-d7569d79c6da1437fe46343ed13810df6c8cae1f.zip | |
prevent the editor when agent busy
| -rw-r--r-- | internal/tui/components/chat/editor.go | 3 |
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 |
