MCPcopy Index your code
hub / github.com/ZToolsCenter/ZTools / findDirectCommandByName

Method findDirectCommandByName

src/main/api/renderer/commands.ts:84–87  ·  view source on GitHub ↗

* 根据名称查找直接启动指令(系统应用、系统设置等)

(name: string)

Source from the content-addressed store, hash-verified

82 * 根据名称查找直接启动指令(系统应用、系统设置等)
83 */
84 public async findDirectCommandByName(name: string): Promise<any | null> {
85 const { commands } = await this.getCommands()
86 return commands.find((cmd: any) => cmd.type === 'direct' && cmd.name === name) || null
87 }
88
89 private setupIPC(): void {
90 ipcMain.handle('get-apps', () => this.getApps())

Callers 1

handleGlobalShortcutMethod · 0.80

Calls 1

getCommandsMethod · 0.95

Tested by

no test coverage detected