Files
gemini-cli/packages
Abhijit Balaji 389ed663ac fix(core): ensure chat compression summary persists across session resumes
- Modified ChatRecordingService.initialize to accept an optional initialHistory parameter.
- When initialHistory is provided during session resumption (e.g., after chat compression), it now overwrites the messages in the session file on disk.
- Updated GeminiChat constructor to pass the history to ChatRecordingService.initialize.
- Implemented apiContentToMessageRecords helper to convert API Content objects to storage-compatible MessageRecord objects.
- This ensures that the compressed chat history (the summary) is immediately synced to disk, preventing it from being lost when the session is closed and resumed.
- Added a unit test in chatRecordingService.test.ts to verify the new overwrite behavior.

Fixes #21335
2026-03-05 15:54:37 -08:00
..