mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-19 08:09:51 +00:00
prevent the editor when agent busy
This commit is contained in:
parent
ed3518d075
commit
d7569d79c6
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue