Skip to content

edits: migrate to use chat resource uris#277907

Merged
connor4312 merged 1 commit into
mainfrom
connor4312/edits-to-uri
Nov 17, 2025
Merged

edits: migrate to use chat resource uris#277907
connor4312 merged 1 commit into
mainfrom
connor4312/edits-to-uri

Conversation

@connor4312

Copy link
Copy Markdown
Member

Refs #274403

Copilot AI review requested due to automatic review settings November 17, 2025 17:51
@connor4312 connor4312 enabled auto-merge (squash) November 17, 2025 17:51
@connor4312 connor4312 self-assigned this Nov 17, 2025
@vs-code-engineering

vs-code-engineering Bot commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@jrieken

Matched files:

  • src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.ts
  • src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.ts
  • src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.ts
  • src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.ts
  • src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.ts
  • src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.ts
  • src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts
  • src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.ts
  • src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.ts
  • src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.ts

@bpasero

Matched files:

  • src/vs/workbench/contrib/chat/browser/chatInputPart.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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: string with chatSessionResource: URI across interfaces, classes, and function parameters
  • Updated telemetry info structures to use sessionResource instead of sessionId
  • Modified storage and snapshot URI generation to work with session resources
  • Added utility function getKeyForChatSessionResource to 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

@connor4312 connor4312 merged commit 0f3dd9c into main Nov 17, 2025
28 checks passed
@connor4312 connor4312 deleted the connor4312/edits-to-uri branch November 17, 2025 18:18
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Jan 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants