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

Method isToolRegistered

src/main/api/plugin/tools.ts:190–192  ·  view source on GitHub ↗

* 检查某个工具是否已在指定 WebContents 中注册。

(webContents: WebContents, toolName: string)

Source from the content-addressed store, hash-verified

188 * 检查某个工具是否已在指定 WebContents 中注册。
189 */
190 public isToolRegistered(webContents: WebContents, toolName: string): boolean {
191 return this.registeredTools.get(webContents.id)?.has(toolName) ?? false
192 }
193
194 /**
195 * 在插件上下文中执行已注册的工具处理器。

Callers 3

ensurePluginToolReadyMethod · 0.95
executeRegisteredToolMethod · 0.95

Calls 1

getMethod · 0.65

Tested by

no test coverage detected