feat: three-level tool UI mode - #50
Open
chinkan wants to merge 6 commits into
Open
Conversation
Users wanted a middle ground between silent and verbose tool
output. Add ToolUiMode (silent/minimal/verbose) stored as
tool_ui_mode_{user_id}; /verbose now cycles all three. Migrates
legacy tool_ui_enabled boolean (true→verbose, false→silent).
Adds delete_message to PlatformSender for minimal-mode cleanup.
Replace compact_tier3/compact_tier4 with a single compact_messages() that self-gates on utilization (COMPACT_TRIGGER_PCT=0.70) and follows a graduated ladder for how many oldest messages to summarize. LLM output (and the sync fallback) render structured marker lines per ticket 02; sync fallback replaces the previous brute-force truncation. Retune sync tier thresholds (mask 0.70, collapse 0.75, compact 0.82) and run the compaction gate every iteration in loop_runner.
Fix review findings on unified compaction: - Round summarized range down to tool-call/tool-result pair boundaries so a call is never separated from its result across the preserve boundary - Clamp preserved tail to system + newest 8 verbatim - Sync fallback labels tool calls as [Tool: NAME] with real function name, rendered through CompressedMessage::to_marker() (single format source) - Guard zero context_window; reinstate compaction turn gap in loop_runner - Add test asserting a tool-call pair is never split at the boundary
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.
Summary
Implements three-level tool UI mode: tool calls can now be rendered at different verbosity levels, with a new
ToolRegistrydriving notification layout and per-mode formatting.Changes
346efe4)src/tool_registry.rs— new registry modulesrc/command_tool.rs,src/platform/telegram.rs,src/platform/tool_notifier.rs— mode-aware renderingsrc/agent.rs,src/main.rs,src/platform/sender.rs,src/supervisor/backend/reasoning.rs— wiringCONTEXT.md,docs/adr/0002-three-level-tool-ui-mode.md9bfa32d) — Cargo.lock transitive version bumps only (no manifest change)0abefec,a62331b) — caveman skills bundle + cavecrew skill, synced inskills-lock.jsonTest plan
cargo fmt,cargo clippy -- -D warnings,cargo test,cargo build --release