Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode: Do not parse Windows file paths as URIs #2197

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

dominiccooney
Copy link
Contributor

Fixes #2184. Uri.parse parses URIs, Uri.file takes a file path and turns it into a URI. For UNIX-style paths, Uri.parse works fine, but for Windows file paths, parsing them as URIs is wrong; the the drive separator is URL-encoded and the URI is unusable, etc.

Extension.Development.Host.CODE_OF_CONDUCT.md.-.lexical.-.Visual.Studio.Code.2023-12-08.11-59-54.mp4

Test plan

  1. Open a workspace, start a chat
  2. @-mention a file in the workspace
  3. The file should be included in the chat context, Cody can see the content, etc.

@dominiccooney dominiccooney requested a review from a team December 8, 2023 03:10
@dominiccooney
Copy link
Contributor Author

Reviewed our other uses of Uri.parse and they appear correct. They may handle files, but they are file URIs.

Copy link
Contributor

@abeatrix abeatrix left a comment

Choose a reason for hiding this comment

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

Oops thanks for catching this

@dominiccooney dominiccooney merged commit ac90b0f into main Dec 8, 2023
13 checks passed
@dominiccooney dominiccooney deleted the dpc/issue-2184-chat-windows-file-path branch December 8, 2023 03:40
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.

bug: Cody not interpreting file path correctly on Windows OS
2 participants