X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/6e3e9c5c10f3d35bae7e9846334974a09418aef7..47f69638bc96100f2e446f63c7c3689023156e64:/daemon.go?ds=sidebyside diff --git a/daemon.go b/daemon.go index 3cef419..a4041f1 100644 --- a/daemon.go +++ b/daemon.go @@ -359,6 +359,13 @@ func daemonRunRequest(l *TurnLoop, request SocketRequest) error { } return nil + case "stop": + found, err := l.StopSubagent(request.Text) + if err == nil && !found { + err = fmt.Errorf("no subagent %s runs", request.Text) + } + + return err default: return fmt.Errorf("unknown request %q", request.Type) }