open-in-editor guesses `code` and opens VS Code instead of the session IDE
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, node.js
- Ambito
- developer-experience
Direzione di ricerca
Start by reading launchEditor and guessEditor, especially the Linux editor list and the code that launches the selected binary. Check how the process environment exposes VSCODE_GIT_ASKPASS_NODE and how the project tests editor detection. Done means the session’s remote CLI is preferred when available, cursor is not shadowed by code, and a Windows shim is avoided when a Linux remote CLI exists.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
launchEditor(target) with no editor argument opens Windows VS Code when the dev server is running in WSL from Cursor.
What happens
Vite DevTools Pick element calls launchEditor(path) and does not pass an editor. On Linux, guessEditor scans ps and returns the first name in COMMON_EDITORS_LINUX that occurs as a substring. code is listed before cursor. The binary that then runs is code on PATH.
In this WSL session that binary is the Windows shim:
/mnt/c/Program Files/Microsoft VS Code/bin/code
So Pick element opens VS Code.
Why the session IDE is invisible
The Cursor window is on Windows. ps inside WSL does not show it, so the scan cannot pick cursor.
The editor for this session is the remote CLI next to VSCODE_GIT_ASKPASS_NODE:
$VSCODE_GIT_ASKPASS_NODE → <commit>/node
remote CLI → <commit>/bin/remote-cli/cursor
launch-editor never reads VSCODE_GIT_ASKPASS_NODE. A cursor remote CLI on PATH is also ignored, because detection uses ps, not command -v.
LAUNCH_EDITOR does select the right program when it is set to that remote CLI. Nothing sets it automatically.
Expected
Open-in-editor should use the IDE that owns the session.
- Prefer the remote CLI beside
VSCODE_GIT_ASKPASS_NODEwhen that file exists (cursororcode). - Do not let a substring match of
codewin overcursor. - Do not run a
/mnt/.../codeWindows shim when a Linux remote CLI for the current session exists.
This is not a request to hard-code Cursor. The same gap exists for any editor whose UI runs on the Windows side of WSL while the dev server runs in Linux.
- Lingua principale
- JavaScript
- Stelle
- 726
- Fork
- 102
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di vitejs/launch-editor
-
Better support for terminal editors (nvim, helix): avoid `stdio: 'inherit'`, reuse running instancesAperta
Difficoltà 2/5 Mezza giornata Idoneità per principianti 50/100
vitejs/launch-editor#161 ·
-
Dependency DashboardAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 20/100
vitejs/launch-editor#121 ·
-
Google Antigravity无法使用Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
vitejs/launch-editor#115 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
vitejs/launch-editor#107 ·
-
Zed editor binary can also be called `zeditor` on some linux distros since `zed` is already takenForse già presa @0froq l’ha presa 9 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
vitejs/launch-editor#103 · 6 reazioni ·
Tutte le issue di vitejs/launch-editor
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
web-platform-tests/wpt#65844 ·
I maintainer di solito rispondono entro 1 giorno
-
marketing
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Kanevry/session-orchestrator#108 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
awesomemotive/all-in-one-seo-pack#3238 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
andromarces/agent-loops#2055 ·
I maintainer di solito rispondono entro 1 giorno