]> git.giacomolli.uk - onechat/blobdiff - terminal.go
Resume the subagents that a restart cut
[onechat] / terminal.go
index 9e2b6507ab5e7913ddac111a4d895564cf48b68a..96a8cc5cf5605671700802710ed757561a2b16e3 100644 (file)
@@ -149,7 +149,8 @@ func terminalCmpError(err, fallback error) error {
 // terminalEventText returns the text that the client shows for event, or "" for
 // none. The client shows a user message only from another source, such as
 // telegram, because the user typed the others. A tool result shows its first
-// terminalResultLines lines.
+// terminalResultLines lines. The report of a subagent shows whole, and it
+// starts with the name of the subagent.
 func terminalEventText(event Event) string {
        switch event.Kind {
        case "ready":
@@ -166,6 +167,10 @@ func terminalEventText(event Event) string {
                return "[tool] " + event.Text
        case "echo":
                return "[result] " + terminalFirstLines(event.Text, terminalResultLines)
+       case "subagent":
+               return "[" + event.Text + "] started"
+       case "work":
+               return event.Text
        case "busy":
                return "[working]"
        case "idle":