Skip to content

Bake transcript pointer into conversation summaries at creation time#311192

Merged
bhavyaus merged 2 commits intomainfrom
dev/bhavyau/transcript-hint-in-summary
Apr 19, 2026
Merged

Bake transcript pointer into conversation summaries at creation time#311192
bhavyaus merged 2 commits intomainfrom
dev/bhavyau/transcript-hint-in-summary

Conversation

@bhavyaus
Copy link
Copy Markdown
Collaborator

@bhavyaus bhavyaus commented Apr 18, 2026

For inline background compaction only (legacy background compaction already supports this) - Append a stable transcript-file hint (path + line-count snapshot) to every conversation summary, so after compaction the model can read the uncompacted transcript on disk via `read_file`.

Copilot AI review requested due to automatic review settings April 18, 2026 19:34
Append a stable transcript-file hint (path + line-count snapshot) to
every conversation summary, so after compaction the model can read
the uncompacted transcript on disk.

The hint is appended exactly once at summary-creation time and stored
on round.summary / turn metadata. Subsequent renders replay that
string byte-identically, preserving Anthropic prompt cache hits even
as the transcript keeps growing.

Covers all three summarization paths:
- Full / Simple via ConversationHistorySummarizer.summarizeHistory()
- Inline background via agentIntent.ts _startBackgroundSummarization
  (flushes the transcript before snapshotting the line count so the
  baked count matches the on-disk file)

Shared via new exported helper appendTranscriptHintToSummary.
@bhavyaus bhavyaus force-pushed the dev/bhavyau/transcript-hint-in-summary branch from 7d3e1d3 to 091a6de Compare April 18, 2026 19:36
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 18, 2026

Screenshot Changes

Base: a165340b Current: 76a31fe5

Changed (2)

chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Light
Before After
before after
peekReference/PeekReferences/Light
Before After
before after

Copy link
Copy Markdown
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 ensures every freshly-created conversation summary includes a stable hint to the on-disk session transcript (path + optional frozen line-count snapshot), so the model can recover uncompacted details later via read_file without breaking prompt-cache stability across subsequent renders.

Changes:

  • Adds appendTranscriptHintToSummary(...) helper and moves transcript-hint baking into summary creation time (full/simple summarization).
  • Updates background inline summarization to flush the transcript before baking the hint (to align on-disk content with the baked snapshot).
  • Adds a new unit test suite covering basic helper behavior (no path, path-only, path + line count).
Show a summary per file
File Description
extensions/copilot/src/extension/prompts/node/agent/summarizedConversationHistory.tsx Centralizes transcript-hint baking in a shared helper and applies it during summary creation (not during later renders).
extensions/copilot/src/extension/intents/node/agentIntent.ts Flushes transcript and appends the baked hint for the background inline summarization path.
extensions/copilot/src/extension/prompts/node/agent/test/summarization.spec.tsx Adds unit tests for appendTranscriptHintToSummary.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 1

@bhavyaus bhavyaus enabled auto-merge (squash) April 18, 2026 19:41
lszomoru
lszomoru previously approved these changes Apr 18, 2026
@bhavyaus bhavyaus merged commit b88bc8e into main Apr 19, 2026
26 checks passed
@bhavyaus bhavyaus deleted the dev/bhavyau/transcript-hint-in-summary branch April 19, 2026 01:13
@vs-code-engineering vs-code-engineering Bot added this to the 1.117.0 milestone Apr 19, 2026
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.

4 participants