Skip to content

fix: pass pre-read content to RegistryClient for WSL compatibility - #9739

Merged
RomneyDa merged 1 commit into
continuedev:mainfrom
shanevcantwell:fix/wsl-path-construction
Jan 31, 2026
Merged

RomneyDa merged 1 commit into
continuedev:mainfrom
shanevcantwell:fix/wsl-path-construction

Conversation

@shanevcantwell

@shanevcantwell shanevcantwell commented Jan 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fixes workspace .continue/ files failing to load when Windows VS Code connects to WSL
  • Root cause: loadYaml.ts discarded pre-read content and passed only URIs to RegistryClient, which tried fs.readFileSync() (fails for vscode-remote:// URIs)
  • Solution: Added ContentIdentifier type to pass pre-read content directly through the loading pipeline

Fixes #6242, Fixes #7810

Test plan

  • Unit tests pass (297 tests in config-yaml)
  • Built Linux vsix, installed in WSL via code --install-extension
  • Created .continue/docs/test.yaml in WSL workspace
  • Verified config loads without ENOENT errors

🤖 Generated with Claude Code


Continue Tasks: ▶️ 2 queued · ▶️ 1 not started — View all


Summary by cubic

Fixes WSL config loading by passing pre-read YAML content through the pipeline to avoid fs reads on vscode-remote:// URIs (Fixes #6242, #7810).

  • Bug Fixes
    • Added optional content field to FileIdentifier; loadYaml now includes it.
    • RegistryClient.getContent returns pre-read content when present.
    • Added tests for file identifiers using pre-read content.

Written for commit 1c74659. Summary will update on new commits.

@shanevcantwell
shanevcantwell requested a review from a team as a code owner January 21, 2026 08:20
@shanevcantwell
shanevcantwell requested review from Patrick-Erichsen and removed request for a team January 21, 2026 08:20
@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jan 21, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 18 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="core/llm/index.ts">

<violation number="1" location="core/llm/index.ts:1124">
P2: Tool prompt overrides are skipped when tools are only defined in the model’s default completionOptions, so per-model overrides never apply to default tools.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread core/llm/index.ts Resolved
@shanevcantwell
shanevcantwell force-pushed the fix/wsl-path-construction branch from 36b953b to 75d9d05 Compare January 21, 2026 19:04
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jan 21, 2026

@RomneyDa RomneyDa left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@shanevcantwell to clarify, is there a case where it loads content from not a file or slug? I'm thinking that we could just add the content field and check if it's present rather than adding a new uriType. This would simplify the PR significantly e.g. getContent could just check if content is present and if so return it, and most other changes could be reverted.

I would also be able to merge this faster since we use this type on our backend (and other people might too) and adding a new uriType could be a breaking change

Fixes continuedev#6242, continuedev#7810

When Windows VS Code connects to WSL, workspace files are accessed via
vscode-remote:// URIs. Previously, getAllDotContinueDefinitionFiles()
correctly read content via ide.readFile(), but loadYaml.ts discarded
the content and passed only the URI path to RegistryClient, which then
tried to re-read using fs.readFileSync() - failing for remote URIs.

Changes:
- Add optional content field to FileIdentifier (non-breaking)
- RegistryClient.getContent() returns pre-read content when present
- loadYaml.ts passes content along with file identifiers

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@shanevcantwell
shanevcantwell force-pushed the fix/wsl-path-construction branch from a9a9ebb to 1c74659 Compare January 26, 2026 22:53
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jan 26, 2026
@shanevcantwell

Copy link
Copy Markdown
Contributor Author

@shanevcantwell to clarify, is there a case where it loads content from not a file or slug? I'm thinking that we could just add the content field and check if it's present rather than adding a new uriType. This would simplify the PR significantly e.g. getContent could just check if content is present and if so return it, and most other changes could be reverted.

I would also be able to merge this faster since we use this type on our backend (and other people might too) and adding a new uriType could be a breaking change

That was definitely an excessive solution. This is much cleaner.

@RomneyDa RomneyDa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks clean!

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jan 26, 2026
@RomneyDa

Copy link
Copy Markdown
Contributor

@shanevcantwell this is great thanks again!

@RomneyDa
RomneyDa merged commit 38aae62 into continuedev:main Jan 31, 2026
52 of 58 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 31, 2026
@sestinj

sestinj commented Jan 31, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.40.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm This PR has been approved by a maintainer released size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WSL Docs cannot be added with Ubuntu on WSL (Windows 11)

3 participants