You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure unique file paths for non-file Uris (#12037)
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.
0 commit comments