Dhanji R. Prasanna
5104bd53b6
refactor(g3-core): improve stream_completion_with_tools readability
Extract and simplify the streaming completion function:
- Extract ensure_context_capacity() helper for pre-loop context management
(thinning + compaction logic now in dedicated async method)
- Simplify compact_summary generation block: flatten nested if/match,
remove redundant comments, reorder branches for clarity
- Remove dead code: unused _last_error variable and modified_tool_call
- Streamline duplicate detection block: reduce verbose logging
- Clean up text content display block: remove redundant comments,
tighten variable declarations
- Remove redundant is_todo_tool redefinition inside block expression
Net reduction: 79 lines (-187/+108)
Behavior unchanged, all unit tests pass.
Agent: carmack
2026-01-14 15:11:53 +05:30
..
2026-01-14 08:54:35 +05:30
2026-01-10 20:44:23 +11:00
2026-01-10 20:34:14 +11:00
2026-01-14 15:11:53 +05:30
2025-12-22 16:27:35 +11:00
2026-01-13 05:49:45 +05:30
2026-01-12 05:13:02 +05:30
2026-01-13 14:42:20 +05:30