Dhanji R. Prasanna
381b852869
refactor(g3-core): Extract streaming utilities into dedicated module
Extract reusable utilities from the massive stream_completion_with_tools
function into a new streaming.rs module for improved readability:
- format_duration, format_timing_footer: timing display helpers
- clean_llm_tokens: consolidates 4 duplicate token-cleaning call sites
- log_stream_error: extracts 70+ lines of error logging
- is_empty_response, is_connection_error: predicate helpers
- truncate_for_display, truncate_line: string truncation utilities
- StreamingState, IterationState: state structs for future refactoring
Results:
- lib.rs reduced from 2978 to 2840 lines (138 lines, ~5%)
- New streaming.rs: 309 lines with 5 unit tests
- All 98+ tests pass
Agent: carmack
2026-01-08 13:20:11 +11:00
..
2026-01-08 12:54:03 +11:00
2025-12-22 16:27:35 +11:00
2026-01-03 17:38:25 +11:00
2026-01-08 13:20:11 +11:00
2025-12-22 16:27:35 +11:00
2025-12-22 16:27:35 +11:00
2025-12-25 18:47:22 +11:00
2026-01-07 13:01:03 +11:00