Add audit cards for Telegram plan tool#40
Open
chinkan wants to merge 1 commit into
Open
Conversation
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors Telegram verbose-mode progress reporting into a single persistent "audit card" managed by ToolCallNotifier, and removes the duplicate path that previously streamed tool-status lines into the assistant answer. It also adds a privacy-aware argument preview formatter and a structured plan/tool display model.
Changes:
- Adds a
ToolDisplayStatewith plan checklist + tool activity rendering, parsesplan_create/plan_updatearguments, and tightensformat_args_previewto an allowlist/denylist model. - Introduces
ToolEvent::Finishedand reworksToolCallNotifier::finishto edit the live message into a persistent completed/failed card (or delete it when no activity occurred). - Removes the agent-side
stream_status_txpath so tool status lines no longer enter the answer stream, and adds a source-inspection regression test.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/platform/tool_notifier.rs | Adds display state, planning parsers, privacy-aware preview, persistent finish card, edit retry, and new tests. |
| src/platform/telegram.rs | Forwards a terminal Finished event to the notifier and finalizes the notifier even if the channel closes unexpectedly. |
| src/agent.rs | Removes duplicate tool-status streaming; sends raw arguments_json to the notifier; adds source-inspection regression test. |
| docs/superpowers/specs/2026-05-28-telegram-plan-tool-visuals-design.md | New design spec for verbose-mode audit card. |
| docs/superpowers/plans/2026-05-28-telegram-plan-tool-visuals.md | New implementation plan with step-by-step tasks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request implements a new design for Telegram verbose-mode progress and audit messages, significantly improving the agent's planning and tool execution feedback. The main change is to ensure that tool progress and audit information is shown only in a persistent, structured audit card managed by the
ToolCallNotifier, and never mixed into the final assistant answer stream. This eliminates duplicate tool-status messages, improves clarity, and sets the stage for richer, more user-friendly progress reporting. The implementation includes code changes, a detailed design spec, and new tests to enforce the intended message flow.Design and behavior changes:
2026-05-28-telegram-plan-tool-visuals-design.md) specifying the new persistent audit card UI for Telegram verbose mode, including message lifecycle, plan and tool rendering, and privacy/security guidelines.Agent and notifier logic refactoring:
src/agent.rsthat previously streamed tool-status lines into the assistant answer stream, ensuring tool progress is only handled by the notifier. [1] [2]src/platform/telegram.rsto robustly manage the lifecycle of the persistent audit card, sending a terminalFinishedevent and ensuring the notifier finishes properly even if the channel closes unexpectedly. [1] [2] [3]Testing and enforcement:
src/agent.rsto ensure that tool-status lines are never formatted or sent to the assistant answer stream, preventing regressions.