Skip to content

Conversation

@katriendg
Copy link
Contributor

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, 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:

  • 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)
  • 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)
  • 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

  • Documentation is updated (if applicable)
  • Files follow existing naming conventions
  • Changes are backwards compatible (if applicable)
  • Tests added for new functionality (if applicable)

AI Artifact Contributions

  • 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:

  • Markdown linting: npm run lint:md
  • Spell checking: npm run spell-check
  • Frontmatter validation: npm run lint:frontmatter
  • Link validation: npm run lint:md-links
  • PowerShell analysis: npm run lint:ps

Security Considerations

  • This PR does not contain any sensitive or NDA information
  • Any new dependencies have been reviewed for security issues
  • Security-related scripts follow the principle of least privilege

Additional Notes

The extension configuration change (extensionKind: ["workspace", "ui"]) should ensure that the extension works correctly in both direct workspace access scenarios and restricted UI-only scenarios. This is particularly important for resolving issue #390 where users reported instruction files not found errors in WSL environments.

…ify extension configuration and execution contexts

- add details on dual-mode configuration for workspace and UI
- explain script fallback patterns for different execution scenarios

🔧 - Generated by Copilot
@katriendg katriendg requested a review from a team as a code owner February 4, 2026 07:57
Copilot AI review requested due to automatic review settings February 4, 2026 07:57
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.93%. Comparing base (292ef51) to head (6bf17cd).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #407      +/-   ##
==========================================
- Coverage   60.96%   60.93%   -0.04%     
==========================================
  Files          19       19              
  Lines        3233     3233              
==========================================
- Hits         1971     1970       -1     
- Misses       1262     1263       +1     
Flag Coverage Δ
pester 60.93% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds the extensionKind configuration to the HVE Core VS Code extension and updates documentation to explain dual-mode execution contexts. The changes aim to address file accessibility issues reported in issue #390 where instruction files and scripts were not accessible in Windows/WSL environments.

Changes:

  • Added extensionKind: ["workspace", "ui"] to package.json to enable dual-mode extension execution
  • Added "Extension Configuration" section to PACKAGING.md documenting the extensionKind setting
  • Standardized unordered list formatting from hyphens to asterisks throughout PACKAGING.md

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
extension/package.json Added extensionKind configuration to support both workspace and UI execution modes
extension/PACKAGING.md Added documentation explaining extension execution contexts and standardized list formatting

…GING.md

- enhance descriptions for workspace and UI modes
- explain access to bundled files and path resolution
- detail declarative nature of the extension
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.

[Issue]: HVE-Core VS Code Extension Scripts Not Accessible to Agent Reasoning

3 participants