refactor(g3-core): extract streaming logic to agent_streaming.rs

Reduce lib.rs complexity by extracting the streaming completion logic:

- Extract stream_completion_with_tools (~1080 lines) to agent_streaming.rs
- Extract stream_with_retry helper method
- Extract parse_diff_stats helper function
- Add handle_pre_stream_compaction helper for cleaner pre-stream logic
- Add format_tool_output helper for tool output formatting
- Remove 3 unused constructor variants:
  - new_with_readme
  - new_autonomous_with_readme
  - new_with_quiet

Results:
- lib.rs reduced from 2974 to 1791 lines (40% reduction)
- Streaming logic cleanly separated into dedicated module
- All tests pass, no behavior changes

Agent: fowler
This commit is contained in:
Dhanji R. Prasanna
2026-01-13 06:14:56 +05:30
parent 5c9404e292
commit a2e51cf075
2 changed files with 1217 additions and 1184 deletions

File diff suppressed because it is too large Load Diff