// stop the agent.
func (b *TelegramBot) Notify(event Event) {
switch event.Kind {
- case "busy", "idle", "reply", "error", "notice":
+ case "busy", "idle", "reply", "error", "notice", "subagent", "work":
case "user":
if event.Source == telegramSource {
return
}
// telegramText returns the text of event for the chat. A user message of
-// another client has its source as a mark.
+// another client has its source as a mark. A subagent shows only its start and
+// how its run ended, because the reply of the agent carries the content of the
+// report.
func telegramText(event Event) string {
switch event.Kind {
case "user":
return "[" + event.Source + "] " + event.Text
+ case "subagent":
+ return "[" + event.Text + "] started"
+ case "work":
+ return "[" + event.Source + "] " + event.Status
case "error":
return "Error: " + event.Text
default: