mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-30 20:25:40 +01:00
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:
@@ -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; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user