feat: add conversation transcript lookup after summarization (#4475)

* feat: add conversation transcript lookup after summarization

After conversation history is compacted, inform the model it can look up
the full pre-compaction transcript via read_file. The transcript is a JSONL
file produced by ISessionTranscriptService.

Key changes:
- Add isTranscriptUri() to ISessionTranscriptService for read_file allowlisting
- Allowlist transcript URIs in assertFileOkForTool and isFileExternalAndNeedsConfirmation
- Lazily start transcript session in SummarizedConversationHistory before
  summarization runs (idempotent if hooks already started it)
- After summarization, flush transcript and pass path to SummaryMessageElement
  which tells the model about the file
- Gate behind ConfigKey.ConversationTranscriptLookup (ExperimentBased, default off)
- Add setting in package.json preview section with onExp tag

* fix: update transcript lookup instruction to use ToolName.ReadFile
This commit is contained in:
Bhavya U
2026-03-17 23:06:21 -07:00
committed by GitHub
parent 8ab4b1ac24
commit 35e83ba656
7 changed files with 102 additions and 2 deletions
@@ -242,6 +242,12 @@ export interface ISessionTranscriptService {
* keeping at most `maxRetained` most-recent ended sessions.
*/
cleanupOldTranscripts(maxRetained?: number): Promise<void>;
/**
* Check whether a URI is under the transcripts storage directory.
* Used by {@link assertFileOkForTool} to allowlist tool reads.
*/
isTranscriptUri(uri: URI): boolean;
}
export class NullSessionTranscriptService implements ISessionTranscriptService {
@@ -258,4 +264,5 @@ export class NullSessionTranscriptService implements ISessionTranscriptService {
async endSession(): Promise<void> { }
getTranscriptPath(): URI | undefined { return undefined; }
async cleanupOldTranscripts(): Promise<void> { }
isTranscriptUri(): boolean { return false; }
}