Skip to content

feat: three-level tool UI mode - #50

Open
chinkan wants to merge 6 commits into
mainfrom
feature/bugs-fixes
Open

feat: three-level tool UI mode#50
chinkan wants to merge 6 commits into
mainfrom
feature/bugs-fixes

Conversation

@chinkan

@chinkan chinkan commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

Implements three-level tool UI mode: tool calls can now be rendered at different verbosity levels, with a new ToolRegistry driving notification layout and per-mode formatting.

Changes

  • feat: three-level tool UI mode (346efe4)
    • src/tool_registry.rs — new registry module
    • src/command_tool.rs, src/platform/telegram.rs, src/platform/tool_notifier.rs — mode-aware rendering
    • src/agent.rs, src/main.rs, src/platform/sender.rs, src/supervisor/backend/reasoning.rs — wiring
    • Docs: CONTEXT.md, docs/adr/0002-three-level-tool-ui-mode.md
  • chore(deps) (9bfa32d) — Cargo.lock transitive version bumps only (no manifest change)
  • chore: skills (0abefec, a62331b) — caveman skills bundle + cavecrew skill, synced in skills-lock.json

Test plan

  • cargo fmt, cargo clippy -- -D warnings, cargo test, cargo build --release

chinkan added 6 commits July 31, 2026 17:27
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant