Commit Graph

2 Commits

Author SHA1 Message Date
Bhavya U 35e83ba656 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
2026-03-18 06:06:21 +00:00
Rob Lourens 84b8b46bd5 Add session transcript service for hooks (#3545)
* Add session transcript service for hooks

Implement JSONL-based session transcript service that records
conversation turns, tool executions, and assistant messages for
hook consumers.

Key changes:
- New ISessionTranscriptService interface and SessionTranscriptService
  implementation with buffered writes and automatic old transcript cleanup
- Integrate transcript logging into tool calling loop: user messages,
  assistant messages, tool execution start/complete, turn boundaries
- Auto-flush transcript and inject transcript_path into hook input
- Race flush with 500ms timeout to avoid blocking hook execution
- Gate transcript creation on ChatRequest.hasHooksEnabled
- Include copilotVersion and vscodeVersion in session.start entry
- Add timestamp to IToolCallRound for transcript timing
- Add hasHooksEnabled to ChatRequest interface and all implementors

* Fixes
2026-02-07 02:04:46 +00:00