feat: add conversation transcript lookup after summarization#4475
Merged
feat: add conversation transcript lookup after summarization#4475
Conversation
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
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an experiment-gated “transcript lookup” capability so that after agent conversation history is compacted/summarized, the model can be told where to find the full pre-compaction transcript (and the read_file tool can be permitted to access that transcript location).
Changes:
- Introduces
ConfigKey.ConversationTranscriptLookupand surfaces it inpackage.json/package.nls.json. - Extends
ISessionTranscriptServicewithisTranscriptUri()and implements it in the VS Code Node service. - Allowlists transcript URIs for tool file reads and injects a transcript-path hint into the summary message when enabled.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/platform/configuration/common/configurationService.ts | Adds experiment-based config key for transcript lookup. |
| src/platform/chat/common/sessionTranscriptService.ts | Extends transcript service interface with isTranscriptUri. |
| src/extension/chat/vscode-node/sessionTranscriptService.ts | Implements isTranscriptUri by checking against the transcripts storage directory. |
| src/extension/tools/node/toolUtils.ts | Allows tool reads of transcript URIs (and treats them as non-external). |
| src/extension/prompts/node/agent/summarizedConversationHistory.tsx | Starts/flushes transcript session around summarization and appends transcript lookup hint to summary message. |
| package.json | Exposes the new setting in the extension configuration schema. |
| package.nls.json | Adds the localized description string for the new setting. |
Comments suppressed due to low confidence (1)
src/extension/tools/node/toolUtils.ts:302
isFileExternalAndNeedsConfirmationnow treats transcript URIs as non-external, but there’s no test coverage for this new branch. Consider adding a unit test alongside the existing external-file confirmation tests to verify transcript paths returnfalse(no confirmation) and don’t accidentally fall through to the external-file existence check.
if (sessionTranscriptService.isTranscriptUri(normalizedUri)) {
return false;
}
src/extension/prompts/node/agent/summarizedConversationHistory.tsx
Outdated
Show resolved
Hide resolved
bpasero
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After conversation history is compacted, inform the model it can look up the full pre-compaction transcript via read_file.