feat(telegram): live progress indicator for the remote-control channel - #28
feat(telegram): live progress indicator for the remote-control channel#28SergiioB wants to merge 1 commit into
Conversation
Post an editable "Thinking…" bubble the moment an owner message lands and update it live with the turn's activity (step count, tool name, step summary) until the reply is ready, then remove it so the answer stands alone. The existing chatAction "typing" dots are kept but are too subtle to read as an acknowledgement and vanish the instant a fast reply lands, leaving the operator with no visible feedback that their message was received. The indicator is pure channel infrastructure: every post/edit/delete is best-effort and serialised through an internal promise chain, throttled to ~1.4 edits/s with identical-text suppression, and a fast turn that removes the bubble before the initial send resolves still cleans up correctly. Adds an optional deleteMessage to the TelegramApi surface.
|
Thanks @SergiioB, and sorry it took four days to get to you. The chain-serialised start/update/remove is genuinely careful work, I traced the fast-turn race you describe in the comments and it holds up. One thing I do not think you had in view. Second, lighter: the |
|
+1 on the summary-echo concern @sosidudku1 raised — traced it myself: Two more before this can land:
Happy to take another look once those land — the throttling/chain-serialization design itself is solid. |
What
The Telegram remote-control channel now posts an editable "Thinking…" bubble the moment an owner message lands, updates it live with the turn's activity, and removes it when the reply is ready.
Why
Today the only feedback is the native
chatAction: "typing"dots. They are easy to miss and disappear the instant a fast reply lands, so a short answer gives no visible sign the message was received. This adds a clear, persistent acknowledgement that also surfaces what the agent is doing on longer turns.Behavior
🤔 Thinking….⚙️ Working… (step N),🔧 <tool>(fromtool_call_parsed),✅ <step summary>(fromstep_finished),🔁 Repeating <tool> (×N)(fromloop_detected).Implementation notes
TelegramProgressIndicatorininbound-handler.ts, wired intodispatchToRuntimethrough the existingeventHook.deleteMessageto theTelegramApisurface (grammy'sbot.apialready provides it).remove()before the initialsendMessageresolves still cleans up the just-posted message.telegram.*flag if you prefer.Testing
vitest run src/channels/telegram/), including the 23inbound-handlertests.servedeployment against a remotellama-server.Happy to add a dedicated unit test for the indicator lifecycle and/or put it behind a config flag if that helps merge.