From 08dfe188c1022b17a88eab70da0f03c611baf51f Mon Sep 17 00:00:00 2001 From: dj-oyu <68707227+dj-oyu@users.noreply.github.com> Date: Sun, 22 Feb 2026 08:56:37 +0900 Subject: [PATCH] feat: echo MiniApp commands to chat for user visibility When a command is sent from the MiniApp (source=webapp), echo it to the Telegram chat before processing so the user can confirm what was sent. Co-Authored-By: Claude Opus 4.6 --- pkg/agent/loop.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index 7d82f12d9..3e08a0fdd 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -242,6 +242,16 @@ func (al *AgentLoop) Run(ctx context.Context) error { continue } + // Echo commands sent from the Mini App so the user can see what was sent. + if msg.Metadata["source"] == "webapp" && msg.Content != "" { + al.bus.PublishOutbound(bus.OutboundMessage{ + Channel: msg.Channel, + ChatID: msg.ChatID, + Content: "via MiniApp: " + msg.Content, + SkipPlaceholder: true, + }) + } + // Fast path: handle slash commands immediately without blocking the LLM worker. if response, handled := al.handleCommand(ctx, msg); handled { if response != "" {