Commit Graph

37 Commits

Author SHA1 Message Date
Dhanji R. Prasanna
cd64ebbf87 Add tokens consumed and context percentage to per-tool timing footer
The per-tool timing line now shows:
- Tokens delta (tokens added to context by this tool call)
- Context window usage percentage

Example: └─ ️ 1ms  523tk | 49% ctx

Changes:
- Updated UiWriter trait print_tool_timing signature
- Track tokens before/after adding tool messages to calculate delta
- Updated ConsoleUiWriter, MachineUiWriter, PlannerUiWriter, and test mocks
2025-12-24 15:44:19 +11:00
Dhanji R. Prasanna
3bc254962c clean up filter_json a bit (more to come) 2025-12-22 12:03:09 +11:00
Dhanji R. Prasanna
01a5284d6d Move fixed_filter_json from g3-core to g3-cli
Properly separates UI display concern from core library:
- fixed_filter_json module now lives in g3-cli (UI layer)
- UiWriter trait gains filter_json_tool_calls() and reset_json_filter() methods
- g3-core delegates filtering to UI layer via trait methods
- Different UiWriter implementations can choose their own filtering behavior
- ConsoleUiWriter filters JSON tool calls for clean terminal display
- MachineUiWriter/NullUiWriter use default pass-through

Benefits:
- Proper separation of concerns
- Core stays clean without display-specific logic
- Testability - filter can be tested independently in g3-cli
2025-12-22 10:32:21 +11:00
Jochen
75aa2d983e Refine planner mode UI and error handling
Improve planner mode user experience with better error reporting,
cleaner tool output, and consistent log file placement.

- Propagate and display classified LLM errors to users with
  appropriate icons and context
- Display tool calls on single lines with truncated arguments
- Show LLM text responses without overwriting via UiWriter
- Ensure all logs write to workspace/logs directory consistently
- Set G3_WORKSPACE_PATH early in planning mode initialization
2025-12-09 22:44:00 +11:00
Dhanji R. Prasanna
d9ad244197 add markdown format only to final_output and fix todo duplication 2025-12-02 14:26:22 +11:00
Dhanji R. Prasanna
0e4c935a70 clean up TODO output 2025-12-02 06:48:58 +11:00
Jochen
52f78653b4 add context window monitor
Writes the current context window to logs/current_context_window (uses a symlink to a session ID).

This PR was unfortunately generated by a different LLM and did a ton of superficial reformating, it's actually a fairly small and benign change, but I don't want to roll back everything. Hope that's ok.
2025-11-27 21:00:02 +11:00
Jochen
551a577ee1 changed user choice for TODO stale check
user can ignore, mark stale or quit.
2025-11-21 12:35:14 +11:00
Jochen
28a83d2dcf check for stale TODOs
on by default, can be disabled
2025-11-21 12:09:01 +11:00
Dhanji Prasanna
5e08d6bbba --machine mode flag for verbose CLI output 2025-10-27 10:37:05 +11:00
Dhanji Prasanna
61d748034d replace tesseract with apple vision 2025-10-24 15:35:47 +11:00
Dhanji Prasanna
0be4829ca9 thinning message highlighted 2025-10-23 13:16:13 +11:00
Dhanji Prasanna
c5d6fbef08 control commands 2025-10-22 22:14:12 +11:00
Dhanji Prasanna
2ad0c9a3fd todo list formatting 2025-10-20 14:27:53 +11:00
Dhanji Prasanna
92bece957b colorizing tool calls 2025-10-18 16:09:30 +11:00
Dhanji Prasanna
347c9e1e00 colorize timing based on duration 2025-10-17 13:54:21 +11:00
Dhanji Prasanna
662748ed23 better formatting cli 2025-10-15 22:04:39 +11:00
Dhanji Prasanna
bb90cc7826 some fixes 2025-10-14 12:44:02 +11:00
Dhanji Prasanna
bfd256db3b fix tool output 2025-10-14 12:21:22 +11:00
Dhanji Prasanna
627fdcd9bf streaming tool call attempt 1 2025-10-13 20:25:12 +11:00
Dhanji Prasanna
5fb631d5c3 cosmetic fixes to tool call headers 2025-10-11 13:32:35 +11:00
Dhanji Prasanna
13236a1be5 ui writer fixes 2025-10-10 15:39:42 +11:00
Dhanji Prasanna
1bae19abd4 Revert "fix for tool args and missing msgs"
This reverts commit 1e9ff972d9.
2025-10-10 15:39:42 +11:00
Dhanji Prasanna
1e9ff972d9 fix for tool args and missing msgs 2025-10-10 14:28:02 +11:00
Dhanji Prasanna
57b7bcb0de cosmetic tool call stuff 2025-10-10 14:18:35 +11:00
Dhanji Prasanna
426a9b88a9 readme tweaks 2025-10-10 14:08:37 +11:00
Dhanji Prasanna
16216532d0 newline 2025-10-10 13:46:08 +11:00
Dhanji Prasanna
3ef7ec0d9f colorize 2025-10-10 13:38:38 +11:00
Dhanji Prasanna
0ad52a2eb2 tighten tool output in normal cli 2025-10-10 10:03:15 +11:00
Dhanji Prasanna
ed769bd58a some graphing updates 2025-10-07 15:13:45 +11:00
Dhanji Prasanna
1379af7159 tool headers working 2025-10-04 16:24:33 +10:00
Dhanji Prasanna
f562301aa2 tweaks to newline 2025-10-04 13:30:11 +10:00
Dhanji Prasanna
54e2a66b7d fixed newline character messup 2025-10-03 14:04:17 +10:00
Dhanji Prasanna
56e13ced64 tool calling boxes 2025-10-02 15:50:04 +10:00
Dhanji Prasanna
1faf16b23a tweaks 2025-10-02 15:34:37 +10:00
Dhanji Prasanna
57b1b51e65 retro mode ui! 2025-10-02 14:47:19 +10:00
Dhanji Prasanna
8c7dd146f8 UI writer abstraction instead of printlns everywhere 2025-10-02 11:06:14 +10:00