-
Notifications
You must be signed in to change notification settings - Fork 501
Description
Describe the bug
When creating a new Sanity project, I see the following output:
⚠ No supported AI editors detected (Cursor, VS Code, Claude Code)
This happens even though I am running the command inside a terminal window inside VS Code Insiders. I believe VS Code Insiders should be detected the same way as VS Code stable.
To Reproduce
- Install VS Code Insiders (nightly build) instead of the regular VS Code:
https://code.visualstudio.com/insiders - Run
sanity initfrom a terminal inside VS Code Insiders.
Variant (WSL / Remote case)
-
On Windows, install VS Code Insiders.
-
Enable WSL.
-
From WSL, run:
code-insiders . -
Open the integrated terminal in VS Code Insiders.
-
Run
sanity init.
Expected behavior
VS Code Insiders should be detected as a supported editor, just like VS Code stable — including when running remotely via WSL.
Actual behavior
The CLI reports that no supported AI editors are detected.
Screenshots
This screenshot shows the two locations in the codebase where the editor detection output is processed differently:
While touching this code, it might be worth refactoring so the messaging is derived from the same source as detectAvailableEditors. Right now:
- One location suggests where to go next
- The other only reports the absence of editors
If the list of supported editors changes, this duplication could easily drift.
Versions
- Sanity: 5.1.0 (latest)
- OS: Windows 10
Additional context
There appear to be two related but distinct issues:
1. VS Code Insiders on Windows
The current detection logic looks for VS Code config folders such as:
path.join(process.env.APPDATA, 'Code/User')However, VS Code Insiders uses:
Code - Insiders/User
As a result, Insiders is not detected even on a standard Windows setup.
2. VS Code Insiders + WSL (remote case)
In the WSL scenario, the problem is deeper:
- VS Code runs on Windows
- The Sanity CLI runs in Linux (WSL)
- Editor config folders do not exist in the Linux filesystem
So even expanding the folder check to include Code - Insiders would not work reliably for WSL or other remote scenarios.
Suggested improvements
Relying solely on the presence of editor config directories seems brittle, especially for:
- Insiders builds
- WSL / SSH / containerized remote development
- Portable or nonstandard installs
A more robust detection strategy might be:
-
If running inside a VS Code integrated terminal, assume VS Code is available
- e.g.
TERM_PROGRAM=vscode
- e.g.
-
Otherwise, check for
codeorcode-insiderson$PATH -
On Windows, optionally fall back to registry entries or known install locations
-
Treat config-directory checks as a best-effort signal rather than a requirement
This would allow VS Code (stable and Insiders) to be detected correctly across local and remote environments.
FYI this came in 3 weeks ago via PR #11434 by @jwoods02
Summary
- VS Code Insiders is not detected due to hard-coded assumptions about config paths
- The issue is more pronounced (and not solvable via paths alone) in WSL
- Environment-based detection would be more reliable and future-proof
Happy to help test or validate a fix if needed.