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:
|
case tea.KeyMsg:
|
||||||
if key.Matches(msg, focusedKeyMaps.OpenEditor) {
|
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()
|
return m, openEditor()
|
||||||
}
|
}
|
||||||
// if the key does not match any binding, return
|
// if the key does not match any binding, return
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue