MCPcopy
hub / github.com/ZToolsCenter/ZTools / launchDirectCommand

Method launchDirectCommand

src/main/api/index.ts:381–390  ·  view source on GitHub ↗

* 启动系统应用或系统设置(direct 类型指令)

(command: any, context?: ShortcutLaunchContext)

Source from the content-addressed store, hash-verified

379 * 启动系统应用或系统设置(direct 类型指令)
380 */
381 private async launchDirectCommand(command: any, context?: ShortcutLaunchContext): Promise<void> {
382 console.log('[API] 通过全局快捷键启动系统应用:', command.name, command.path)
383 await appsAPI.launch({
384 path: command.path,
385 type: 'direct',
386 name: command.name,
387 cmdType: command.cmdType || 'text',
388 param: this.buildShortcutLaunchParam(command.cmdType || 'text', context)
389 })
390 }
391
392 /**
393 * 处理全局快捷键触发(供 windowManager 调用)

Callers 1

handleGlobalShortcutMethod · 0.95

Calls 2

launchMethod · 0.80

Tested by

no test coverage detected