Skip to content

feat: add conversation transcript lookup after summarization#4475

Merged
bhavyaus merged 2 commits intomainfrom
dev/bhavyau/conversation-transcript-lookup
Mar 18, 2026
Merged

feat: add conversation transcript lookup after summarization#4475
bhavyaus merged 2 commits intomainfrom
dev/bhavyau/conversation-transcript-lookup

Conversation

@bhavyaus
Copy link
Contributor

After conversation history is compacted, inform the model it can look up the full pre-compaction transcript via read_file.

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
Copilot AI review requested due to automatic review settings March 18, 2026 04:57
@vs-code-engineering vs-code-engineering bot added this to the 1.113.0 milestone Mar 18, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ConversationTranscriptLookup and surfaces it in package.json/package.nls.json.
  • Extends ISessionTranscriptService with isTranscriptUri() 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

  • isFileExternalAndNeedsConfirmation now 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 return false (no confirmation) and don’t accidentally fall through to the external-file existence check.
	if (sessionTranscriptService.isTranscriptUri(normalizedUri)) {
		return false;
	}

@bhavyaus bhavyaus enabled auto-merge March 18, 2026 05:14
@bhavyaus bhavyaus added this pull request to the merge queue Mar 18, 2026
Merged via the queue into main with commit a52acb3 Mar 18, 2026
19 checks passed
@bhavyaus bhavyaus deleted the dev/bhavyau/conversation-transcript-lookup branch March 18, 2026 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants