e2445a5d22
- Extract check_duplicate_in_previous_message() helper to reduce nesting from 6+ levels to 2 levels in stream_completion_with_tools - Create do_thin_context() and do_thin_context_all() helpers to centralize context thinning with event tracking - Use provider_config::parse_provider_ref() in additional call sites - All 295 tests pass This continues the refactoring to eliminate code-path aliasing and reduce cyclomatic complexity in the Agent implementation.