Dhanji R. Prasanna
4321503e89
Refactor streaming_parser.rs and context_window.rs for readability
streaming_parser.rs (879 → 806 lines, -8%):
- Extract CodeFenceTracker struct for cleaner fence state management
- Consolidate pattern matching into module-level functions
- Rename functions for clarity (find_json_object_end, parse_all_json_tool_calls)
- Add clear section headers with // === separators
- Simplify try_parse_json_tool_call state machine
context_window.rs (889 → 843 lines, -5%):
- Eliminate duplication: reset_with_summary now delegates to reset_with_summary_and_stub
- Extract PreservedMessages struct for cleaner message preservation
- Add ThinResult::no_changes() helper to reduce boilerplate
- Simplify should_compact() and should_thin() with early returns
- Add clear section headers for navigation
All 44 tests pass. Behavior unchanged.
Agent: carmack
2026-01-20 16:17:38 +05:30
..
2026-01-20 14:30:50 +05:30
2026-01-10 20:44:23 +11:00
2026-01-17 09:48:10 +05:30
2026-01-20 16:17:38 +05:30
2025-12-22 16:27:35 +11:00
2026-01-20 09:50:55 +05:30
2026-01-19 14:44:30 +05:30
2026-01-16 07:30:27 +05:30