Skip to content

Conversation

@davidwengier
Copy link
Member

@davidwengier davidwengier commented Jul 17, 2025

Bug: microsoft/vscode-dotnettools#2151
(deliberately not marking this PR as a fix due to DevKit process)

When an active agent chat session is open, VS Code will send LSP requests for files with the chat-editing-text-model:// scheme, similar to how the left hand side of a diff view uses git://. This causes problems during editing because we end up getting didChange messages for Uris with that scheme, and Uris with the file scheme, which means we end up with two didChanges for the same physical file.

This PR expands the fix we previously had specifically for git:// Uris, to apply to any non-file Uri. It essentially ensures these documents are always in the misc files project, so we'll still be able to generally deal with them, we just won't get confused by them. As I noted in a comment, a better fix would be to stop using file paths, but instead use the Uris provided by the LSP client as the source of truth, but given the size and risk of that change (would mean Uri/DocumentUri as a key in ProjectSnapshotManager) and the fact that cohosting effectively delivers this via Roslyn anyway, it didn't seem prudent or worth it for this specific issue.

Copy link
Contributor

@alexgav alexgav left a comment

Choose a reason for hiding this comment

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

:shipit:

@davidwengier davidwengier merged commit dd265d9 into dotnet:main Jul 17, 2025
11 checks passed
@davidwengier davidwengier deleted the AllowPeopleToChat branch July 17, 2025 07:13
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jul 17, 2025
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 20, 2025
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.

3 participants