Notify the agent when any command it runs in a task terminal finishes

This commit is contained in:
Ian Gulliver
2026-10-22 20:40:42 -07:00
parent fa0e521402
commit 101dace80e
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -366,10 +366,10 @@ func (term *Terminal) InputLine() (string, bool) {
return term.line, term.atPrompt
}
func (term *Terminal) WakeOnPrompt(fn func(exit string, out []byte), mayRun bool) bool {
func (term *Terminal) WakeOnPrompt(fn func(exit string, out []byte)) bool {
term.mu.Lock()
defer term.mu.Unlock()
if term.atPrompt && term.line == "" || !term.atPrompt && !mayRun {
if term.atPrompt && term.line == "" {
return false
}
term.wake = &wake{fn: fn}