agent: Use compaction boundaries when generating summaries and titles (#60141)

Summary:

- Use the compaction-aware request history when generating thread
summaries.
- Reuse the same compaction boundary logic for thread title generation,
including saved-thread title regeneration.
- Add regression tests for summary and title request construction with
compacted history.

Tests:

- `cargo test -p agent uses_compacted_history`

Release Notes:

- Improved agent thread summary and title generation to respect
compaction boundaries.

Co-authored-by: gaauwe <gaauwe@users.noreply.github.com>
6a1ced4a8eBennet Bo Fenner committed on 6/30/2026, 9:35:16 AM· committed by GitHubparent04efe79
1 file changedLine totals unavailable