MCPcopy Create free account
hub / github.com/agent-tower/core / resolveEditorCommand

Function resolveEditorCommand

packages/server/src/routes/workspaces.ts:38–44  ·  view source on GitHub ↗

* 解析 IDE 命令:如果指定了 editorType 则使用对应命令,否则默认 cursor → code fallback

(editorType?: string | null)

Source from the content-addressed store, hash-verified

36const 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 */
43function resolveEditorCommand(editorType?: string | null): string {
44 if (editorType && IDE_COMMANDS[editorType]) {
45 return IDE_COMMANDS[editorType];
46 }
47 // 默认使用 cursor,fallback 到 code

Callers 1

workspaceRoutesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected