feat(vscode): PyCharm 启动命令可配置(支持 ~/绝对路径),抽 expandTilde 复用

GUI 启动的 VS Code 扩展进程 PATH 常不含 JetBrains 启动器,裸 pycharm 易 ENOENT。
新增设置 pycharmCommand(默认 pycharm),贯穿 store/settings handler/messages/
KanbanPanel 与 webview,「钩子」分组在选 PyCharm 时显示「PyCharm 启动命令」输入框。
handleOpenWorktree 用该命令并经 expandTilde 展开 ~。expandTilde 从 resolveWorktreePath
抽出共用。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-24 05:29:19 +08:00
co-authored by Claude Opus 4.7
parent cacc60eb0e
commit 02b0aca891
10 changed files with 84 additions and 9 deletions
+4
View File
@@ -35,6 +35,7 @@ export interface SettingsValues {
autoBuildBranch: string
worktreeDirectory: string
worktreeOpenWith: 'vscode' | 'pycharm'
pycharmCommand: string
worktreePostCreateScript: string
worktreePreRemoveScript: string
implTabPreCreateScript: string
@@ -59,6 +60,7 @@ export interface SettingsOverlayState {
autoBuildBranch: string
worktreeDirectory: string
worktreeOpenWith: 'vscode' | 'pycharm'
pycharmCommand: string
worktreePostCreateScript: string
worktreePreRemoveScript: string
implTabPreCreateScript: string
@@ -271,6 +273,7 @@ export function useIssues(): UseIssuesResult {
autoBuildBranch: values.autoBuildBranch,
worktreeDirectory: values.worktreeDirectory,
worktreeOpenWith: values.worktreeOpenWith,
pycharmCommand: values.pycharmCommand,
worktreePostCreateScript: values.worktreePostCreateScript,
worktreePreRemoveScript: values.worktreePreRemoveScript,
implTabPreCreateScript: values.implTabPreCreateScript,
@@ -598,6 +601,7 @@ export function useIssues(): UseIssuesResult {
autoBuildBranch: msg.autoBuildBranch,
worktreeDirectory: msg.worktreeDirectory,
worktreeOpenWith: msg.worktreeOpenWith,
pycharmCommand: msg.pycharmCommand,
worktreePostCreateScript: msg.worktreePostCreateScript,
worktreePreRemoveScript: msg.worktreePreRemoveScript,
implTabPreCreateScript: msg.implTabPreCreateScript,