open-in-editor guesses `code` and opens VS Code instead of the session IDE
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, node.js
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- JavaScript
- スター
- 726
- フォーク
- 102
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vitejs/launch-editor のほかの issue
-
Better support for terminal editors (nvim, helix): avoid `stdio: 'inherit'`, reuse running instancesオープン
難易度 2/5 半日 初心者へのやさしさ 50/100
vitejs/launch-editor#161 ·
-
Dependency Dashboardオープン
難易度 3/5 1〜2日 初心者へのやさしさ 20/100
vitejs/launch-editor#121 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
vitejs/launch-editor#115 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
vitejs/launch-editor#107 ·
-
Zed editor binary can also be called `zeditor` on some linux distros since `zed` is already taken対応中かも @0froq が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
vitejs/launch-editor#103 · リアクション 6 件 ·
vitejs/launch-editor の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
web-platform-tests/wpt#65844 ·
メンテナーはふだん 1 日以内に返信
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Kanevry/session-orchestrator#108 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
awesomemotive/all-in-one-seo-pack#3238 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
andromarces/agent-loops#2055 ·
メンテナーはふだん 1 日以内に返信