* 解析 IDE 命令:如果指定了 editorType 则使用对应命令,否则默认 cursor → code fallback
(editorType?: string | null)
| 36 | const openEditorSchema = z.object({ |
| 37 | editorType: z.enum(['cursor', 'vscode', 'vscode-insiders', 'windsurf', 'zed']).nullable().optional(), |
| 38 | }); |
| 39 | |
| 40 | /** |
| 41 | * 解析 IDE 命令:如果指定了 editorType 则使用对应命令,否则默认 cursor → code fallback |
| 42 | */ |
| 43 | function resolveEditorCommand(editorType?: string | null): string { |
| 44 | if (editorType && IDE_COMMANDS[editorType]) { |
| 45 | return IDE_COMMANDS[editorType]; |
| 46 | } |
| 47 | // 默认使用 cursor,fallback 到 code |