feat: add compact UI output for Plan Mode tools

Plan tools (plan_read, plan_write) now display with elegant tree-style
formatting similar to the old todo_write UI:

- State indicators: □ (todo), ◐ (doing), ■ (done), ⊘ (blocked)
- Tree prefixes (├/└) for items with child details
- Strikethrough for completed items
- Shows touches and all three checks (happy/negative/boundary)
- Displays plan file path link at the end

plan_approve uses compact single-line format like read_file:
- Shows approval status and revision number
- Handles already-approved and error cases

Changes:
- Add print_plan_compact() to UiWriter trait with default impl
- Implement print_plan_compact() in ConsoleUiWriter
- Call print_plan_compact() from execute_plan_read/write
- Add plan_read/plan_write to is_self_handled_tool()
- Add plan_approve to is_compact_tool() with format_plan_approve_summary()
- Add serde_yaml dependency to g3-cli
This commit is contained in:
Dhanji R. Prasanna
2026-02-02 15:30:05 +11:00
parent d6b7177107
commit 571188305a
6 changed files with 167 additions and 2 deletions

1
Cargo.lock generated
View File

@@ -1384,6 +1384,7 @@ dependencies = [
"rustyline",
"serde",
"serde_json",
"serde_yaml",
"sha2",
"syntect",
"tempfile",