-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Open
Description
Does this issue occur when all extensions are disabled?: No — Copilot Chat extension is required to reproduce, but the link resolution failure is in VS Code's core markdown link handler, not the extension.
- VS Code Version: 1.98.0 (Insiders)
- OS Version: Windows 10
Summary
When Copilot Chat produces markdown links to local files using Windows absolute paths (e.g., [file.md](c:/Project/docs/file.md)), clicking them fails with:
ENOPRO: No file system provider found for resource 'c:/Project/docs/file.md'
VS Code interprets the drive letter c: as a URI scheme rather than a Windows drive path. Since no provider is registered for the scheme c, the link breaks.
Steps to Reproduce
- Open VS Code on Windows with a multi-root workspace
- Open Copilot Chat (Agent mode or Ask mode)
- Ask the agent to reference a file that exists in the workspace
- Agent produces a markdown link like:
[file.md](c:/MyProject/docs/file.md) - Click the rendered link in the chat response
- Error dialog appears: "ENOPRO: No file system provider found for resource 'c:/...'"
Expected Behavior
The file opens in the editor.
Why This Is Hard to Work Around
- Copilot's built-in system instructions tell agents to use workspace-relative paths, but agents consistently produce absolute Windows paths regardless. This happens across all models (Claude, GPT-4o, etc.).
- Users cannot instruct their way out via
copilot-instructions.md— I've tried explicit rules, constant reminders, alternate slash directives, and external research. Agents sporadically comply but frequently revert. - The
file:///URI scheme is prohibited by Copilot's system instructions, so agents can't produce working absolute links even if they wanted to. - Workspace-relative paths DO work when agents comply, but compliance is inconsistent.
Suggested Fix
Have VS Code's chat panel markdown link handler detect Windows drive letter patterns and normalize them:
// Before resolving the URI
if (/^[a-zA-Z]:[\\/]/.test(linkTarget)) {
linkTarget = "file:///" + linkTarget.replace(/\\/g, '/');
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels