Notify the agent when any command it runs in a task terminal finishes
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user