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
ae079f7d36
commit
e02532eb1c
1 changed files with 10 additions and 0 deletions
|
|
@ -242,6 +242,16 @@ func (al *AgentLoop) Run(ctx context.Context) error {
|
||||||
continue
|
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.
|
// Fast path: handle slash commands immediately without blocking the LLM worker.
|
||||||
if response, handled := al.handleCommand(ctx, msg); handled {
|
if response, handled := al.handleCommand(ctx, msg); handled {
|
||||||
if response != "" {
|
if response != "" {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue