edits: migrate to use chat resource uris#277907
Merged
Merged
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @jriekenMatched files:
@bpaseroMatched files:
|
0f1a6ae to
81d3ca2
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request migrates the chat editing system from using session IDs (strings) to session resources (URIs) throughout the codebase. This change provides a more flexible and type-safe way to reference chat sessions by using URIs instead of plain string identifiers.
Key Changes:
- Replaced
chatSessionId: stringwithchatSessionResource: URIacross interfaces, classes, and function parameters - Updated telemetry info structures to use
sessionResourceinstead ofsessionId - Modified storage and snapshot URI generation to work with session resources
- Added utility function
getKeyForChatSessionResourceto convert URIs to storage keys
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts |
Added hasError field to ChatToolResult (unrelated to main PR purpose) |
src/vs/workbench/api/common/extHostTypes.ts |
Added hasError field to ExtendedLanguageModelToolResult |
src/vs/workbench/contrib/chat/test/browser/chatEditingSessionStorage.test.ts |
Updated test to use sessionResource URI instead of sessionId string |
src/vs/workbench/contrib/chat/test/browser/chatEditingService.test.ts |
Updated assertion to compare sessionResource URIs |
src/vs/workbench/contrib/chat/test/browser/chatEditingCheckpointTimeline.test.ts |
Updated test constants and instantiation to use session resources |
src/vs/workbench/contrib/chat/common/chatEditingService.ts |
Updated interfaces and utility functions to use URIs; added hex encoding for multi-diff URIs |
src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.ts |
Changed disposables map from string keys to ResourceMap with URI keys |
src/vs/workbench/contrib/chat/browser/chatInputPart.ts |
Updated menu arguments to use sessionResource |
src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.ts |
Updated snapshot URI generation to use session resources |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.ts |
Updated content providers to use session resources; removed LocalChatSessionUri import |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.ts |
Updated storage to use session resources; added storageKey computation; removed sessionId from DTO |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts |
Removed chatSessionId parameter from constructor; updated all usages |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.ts |
Updated session creation and comparison to use URIs with isEqual |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.ts |
Added getKeyForChatSessionResource utility function with SHA1 hashing |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.ts |
Updated snapshot creation to use session resources |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.ts |
Updated telemetry info and snapshot creation; removed LocalChatSessionUri usage |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.ts |
Updated URI generation and snapshot creation to use session resources |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.ts |
Updated constructor and content URI generation to use session resources |
dmitrivMS
approved these changes
Nov 17, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Refs #274403