feat(gateway): add Telegram temporary tool progress - #18238
Conversation
5beff77 to
425e144
Compare
425e144 to
3c8981e
Compare
|
Thanks for the contribution and for building this — the UX win (keep progress visible live, clean up the chat afterward) is a real improvement, and your write-up of the breadcrumb-on-failure behavior was exactly the right default. I went ahead and merged a salvage rewrite in #21186 (merge commit bf843ad) that lands the same user-visible feature with a lighter footprint:
The main difference is on the Net: ~141 LOC production vs your ~235, same behaviour, and your name is in |
What does this PR do?
Adds an opt-in Telegram display setting,
display.platforms.telegram.temporary_tool_progress, so Hermes can show temporary work/status visibility while a turn is running and then delete the bot-sent temporary bubbles after the final response is successfully delivered.This keeps the useful live “working” visibility without leaving Telegram chats cluttered. The implementation is Telegram-gated, default-off, generation-safe, and best-effort: it tracks only current-run bot-sent temporary message IDs, never deletes the final response or user messages, preserves breadcrumbs on failure, and ignores Telegram deletion failures.
Covered temporary messages now include:
⏳ Still working...noticesThis PR is intentionally separate from #18266’s
display.ephemeral_system_ttllifecycle. #18266 deletes slash-command/system notices after a TTL; this PR deletes tracked Telegram progress/status messages only after confirmed final delivery.Related Issue
N/A — no issue filed.
Potentially related PRs found during duplicate check:
feat(gateway): auto-delete tool progress messages after responsefeat(gateway): silent tool progress messages on Telegramfix(gateway): update Telegram progress lines on tool completion[codex] Add message transport for gateway tool progressfeat(gateway): auto-delete slash-command system notices after TTLThis PR is narrower than the broad auto-delete variants: Telegram-only, default-off, generation-safe, and success-only cleanup for bot-sent temporary tool-progress/status bubbles.
Type of Change
Changes Made
gateway/display_config.py: addstemporary_tool_progressdisplay setting and supports the oldercleanup_tool_progressalias.gateway/platforms/base.py: makes post-delivery callbacks composable and generation-aware so cleanup hooks do not clobber background-review, EphemeralReply, or newer-run callbacks.gateway/run.py: tracks Telegram tool-progress message IDs, long-runningStill working...message IDs, and status-callback message IDs, then schedules best-effort cleanup only after successful final/streamed/queued delivery.hermes_cli/config.py: adds the default config key while preservingephemeral_system_ttl.cli-config.yaml.example: documents the new display-platform override.tests/gateway/test_display_config.pyandtests/gateway/test_run_progress_topics.py: add coverage for config resolution, callback composition/generation safety, success cleanup, failure breadcrumbs, background-review composition, queued follow-up behavior,Still working...cleanup, and status-callback cleanup.How to Test
⏳ Still working...notice.Automated verification run locally:
Result:
78 passed in 12.14s.Broad gateway verification run locally:
Result:
4667 passed, 10 skipped, 196 warnings in 69.23s.Additional checks:
git diff --checkcli-config.yaml.exampleChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
N/A — this PR does not add a skill.
Screenshots / Logs
Focused regression output:
Broad gateway output, excluding known unrelated local failures:
Notes on unchecked full-suite item:
pytest tests/ -qwas not run after the May 6 rebase.tests/gateway/test_discord_free_response.py::test_discord_free_channel_skips_auto_threadfails isolated on cleanorigin/main(da6019820) too, so it is not attributed to this PR.test_send_typing,test_closed_when_http_not_ready, and the Discord free-response test above.git diff --check, Python AST parse for modified Python files, YAML parse forcli-config.yaml.example, and a static secret/unsafe-pattern scan.