This repository was archived by the owner on May 29, 2026. It is now read-only.
Fix Windows path handling in VSCode extension context menu (issue #1504)#1903
Merged
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix issue #1504
Fix Windows path handling in VSCode extension context menu (issue #1504)
Aug 20, 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.
Fixes an issue where running GenAIScript from the VSCode file explorer context menu on Windows would fail with "resource not found" errors, even when the files existed.
Problem
When users right-clicked on files or folders in VSCode's explorer on Windows and selected "Run GenAIScript...", the extension would fail with errors like:
The issue occurred because:
file:///c:/Users/...) when users select files.fsPath(e.g.,c:\Users\...)c:\Users\...as URIs with protocolc:c:is not a valid URI schemeSolution
Changed the VSCode extension to pass proper file URIs instead of filesystem paths:
This ensures that:
file://URIs are sent to the serverTesting
Added regression tests to verify:
The fix has been tested with the reproduction case from issue #1504 and resolves the problem completely.
Fixes #1504
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
cdn.sheetjs.com/home/REDACTED/.local/share/pnpm/.tools/@pnpm+linux-x64/10.12.3/bin/pnpm install(dns block)esm.ubuntu.com/usr/lib/apt/methods/https(dns block)https://api.github.com/markdownnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/branchesnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/contents/README.mdnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/contents/packages%2Fcore%2Fsrcnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/git/blobsnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/git/ref/heads%2Ftest-ignorenode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/issuesnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/labelsnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/languagesnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/pullsnode (vitest 3)(http block)node (vitest 1)(http block)https://api.github.com/repos/microsoft/genaiscript/pulls/999999node (vitest 2)(http block)microsoft.github.ionode (vitest 3)(dns block)node (vitest 2)(dns block)telemetry.astro.buildIf you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.