Commit 8529725
fix(extension): resolve path resolution issues in Windows/WSL environments (#407)
## Description
This PR fixes critical installation issues where GitHub Copilot cannot
access instruction files and scripts in Windows/WSL environments. The
changes introduce dual-mode extension configuration with bundled
resources to ensure reliable file access across all VS Code execution
contexts.
### Backgrounder to provide resolution context
According to [VS Code Remote Extensions
documentation](https://code.visualstudio.com/api/advanced-topics/remote-extensions#architecture-and-extension-kinds),
**UI Extensions cannot directly access files in the remote workspace**,
which causes instruction files and scripts to become unavailable.
This dual-mode configuration with bundled resources solves critical
installation issues:
* **Instruction files not found**: In Windows/WSL environments, when
Copilot runs as a UI extension, it cannot access workspace files through
the remote workspace path. The documented behavior states UI extensions
"cannot directly access files in the remote workspace"—bundled
instruction files provide the required fallback.
* **Cross-platform path resolution failures**: Windows paths (e.g.,
`/Users/username/.vscode-insiders/extensions/...`) fail when referenced
from WSL Linux environments. VS Code Server runs standard Node.js (not
Electron) in remote contexts, requiring platform-independent access
patterns.
* **Remote workspace limitations**: In Codespaces, devcontainers, and
SSH hosts, workspace file access depends on extension kind. Bundling
ensures consistent access regardless of where the extension host
executes.
The extension prioritizes local workspace files when running in
workspace mode but seamlessly falls back to bundled copies when running
in UI mode or when path resolution fails across OS boundaries.
## Summary of Changes
* **fix(extension)**: Added `extensionKind` configuration to support
both workspace and UI execution modes
* Configured extension to run in workspace mode (direct file access) or
UI mode (local machine execution)
* Enables fallback patterns when workspace file access is restricted
* **docs(extension)**: Added documentation explaining extension
configuration and path resolution
* **style(extension)**: Standardized list formatting from hyphens to
asterisks throughout PACKAGING.md for consistency
## Related Issue(s)
Fixes #390
## Type of Change
Select all that apply:
**Code & Documentation:**
* [x] Bug fix (non-breaking change fixing an issue)
* [ ] New feature (non-breaking change adding functionality)
* [ ] Breaking change (fix or feature causing existing functionality to
change)
* [x] Documentation update
**Infrastructure & Configuration:**
* [ ] GitHub Actions workflow
* [ ] Linting configuration (markdown, PowerShell, etc.)
* [ ] Security configuration
* [ ] DevContainer configuration
* [ ] Dependency update
**AI Artifacts:**
* [ ] Reviewed contribution with `prompt-builder` agent and addressed
all feedback
* [ ] Copilot instructions (`.github/instructions/*.instructions.md`)
* [ ] Copilot prompt (`.github/prompts/*.prompt.md`)
* [ ] Copilot agent (`.github/agents/*.agent.md`)
**Other:**
* [ ] Script/automation (`.ps1`, `.sh`, `.py`)
* [x] Other (please describe): extension
## Testing
Tested by reviewing the changes against VS Code's official Remote
Extensions documentation and verifying that the configuration matches
documented patterns for dual-mode extensions.
## Checklist
### Required Checks
* [x] Documentation is updated (if applicable)
* [x] Files follow existing naming conventions
* [x] Changes are backwards compatible (if applicable)
* [ ] Tests added for new functionality (if applicable)
### AI Artifact Contributions
<!-- If contributing an agent, prompt, or instruction, complete these
checks -->
* [ ] Used `/prompt-analyze` to review contribution
* [ ] Addressed all feedback from `prompt-builder` review
* [ ] Verified contribution follows common standards and type-specific
requirements
### Required Automated Checks
The following validation commands must pass before merging:
* [x] Markdown linting: `npm run lint:md`
* [x] Spell checking: `npm run spell-check`
* [x] Frontmatter validation: `npm run lint:frontmatter`
* [ ] Link validation: `npm run lint:md-links`
* [ ] PowerShell analysis: `npm run lint:ps`
## Security Considerations
<!-- 1 parent 3587e6a commit 8529725
2 files changed
Lines changed: 40 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
26 | 39 | | |
27 | 40 | | |
28 | 41 | | |
| |||
65 | 78 | | |
66 | 79 | | |
67 | 80 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
73 | 86 | | |
74 | 87 | | |
75 | 88 | | |
| |||
94 | 107 | | |
95 | 108 | | |
96 | 109 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
104 | 117 | | |
105 | 118 | | |
106 | 119 | | |
| |||
145 | 158 | | |
146 | 159 | | |
147 | 160 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
157 | 170 | | |
158 | 171 | | |
159 | 172 | | |
| |||
243 | 256 | | |
244 | 257 | | |
245 | 258 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
251 | 264 | | |
252 | 265 | | |
253 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
0 commit comments