X-Git-Url: http://git.giacomolli.uk/onechat/blobdiff_plain/e1e48ba388c28105fff3b70c8ca02304f5d57f53..47f69638bc96100f2e446f63c7c3689023156e64:/daemon.go 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) }