X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/97274864799ac2eea84bf80c9727a810b695db55..84fc815feb485b35eec53a8c7863c6770fc65e02:/chat.go?ds=inline diff --git a/chat.go b/chat.go index 8bc5285..1e96b24 100644 --- a/chat.go +++ b/chat.go @@ -143,12 +143,19 @@ func showEvents(conn net.Conn, out io.Writer) error { } // eventText returns the text that the client shows for event, or "" for none. -// The client shows no user message, because the user typed it. A tool result -// shows its first resultLines lines. +// 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 resultLines +// lines. func eventText(event Event) string { switch event.Kind { case "ready": return "[connected to " + event.Text + "]" + case "user": + if event.Source == terminalSource { + return "" + } + + return "[" + event.Source + "] " + event.Text case "reply": return event.Text case "tool":