X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/c781f79f3c8cb9a7577ee1574d196988da2719b3..8707a09fee94c97e29d668d24fb9713373913e0b:/terminal_test.go?ds=inline diff --git a/terminal_test.go b/terminal_test.go index c93c46f..7f83b57 100644 --- a/terminal_test.go +++ b/terminal_test.go @@ -47,34 +47,56 @@ func TestEventText(t *testing.T) { text string }{ { - name: "reply as it is", - event: Event{Kind: "reply", Text: "Done."}, - text: "Done.", + name: "keeps the complete reply text", + event: Event{ + Kind: "reply", + Text: "Done.", + }, + text: "Done.", }, { - name: "own user message not shown", - event: Event{Kind: "user", Text: "typed", Source: terminalSource}, - text: "", + name: "hides the current terminal user message", + event: Event{ + Kind: "user", + Text: "typed", + Source: terminalSource, + }, + text: "", }, { - name: "user message of another source marked", - event: Event{Kind: "user", Text: "from the phone", Source: "telegram"}, - text: "[telegram] from the phone", + name: "marks a user message from another source", + event: Event{ + Kind: "user", + Text: "from the phone", + Source: "telegram", + }, + text: "[telegram] from the phone", }, { - name: "start of a subagent", - event: Event{Kind: "subagent", Text: "GreenOtter"}, - text: "[GreenOtter] started", + name: "marks the start of a subagent", + event: Event{ + Kind: "subagent", + Text: "GreenOtter", + }, + text: "[GreenOtter] started", }, { - name: "report of a subagent whole", - event: Event{Kind: "work", Text: "[GreenOtter]\nThere are 3 files.\n\nFull chat: zoom(\"GreenOtter\")", Source: "GreenOtter", Status: subagentFinished}, - text: "[GreenOtter]\nThere are 3 files.\n\nFull chat: zoom(\"GreenOtter\")", + name: "keeps the complete subagent report", + event: Event{ + Kind: "work", + Text: "[GreenOtter]\nThere are 3 files.\n\nFull chat: zoom(\"GreenOtter\")", + Source: "GreenOtter", + Status: subagentFinished, + }, + text: "[GreenOtter]\nThere are 3 files.\n\nFull chat: zoom(\"GreenOtter\")", }, { - name: "long result cut", - event: Event{Kind: "echo", Text: strings.Repeat("line\n", 12)}, - text: "[result] " + strings.Repeat("line\n", 9) + "line\n[2 more lines]", + name: "clips a long tool result with its omitted count", + event: Event{ + Kind: "echo", + Text: strings.Repeat("line\n", 12), + }, + text: "[result] " + strings.Repeat("line\n", 9) + "line\n[2 more lines]", }, }