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 <noreply@anthropic.com>
This commit is contained in:
parent
29bbb4ea7b
commit
08dfe188c1
1 changed files with 10 additions and 0 deletions
|
|
@ -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 != "" {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue