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

Method killPlugin

src/main/api/renderer/plugins.ts:566–582  ·  view source on GitHub ↗
(pluginPath: string)

Source from the content-addressed store, hash-verified

564
565 // 终止插件
566 public killPlugin(pluginPath: string): { success: boolean; error?: string } {
567 try {
568 console.log('[Plugins] 终止插件:', pluginPath)
569 if (this.pluginManager) {
570 const result = this.pluginManager.killPlugin(pluginPath)
571 if (result) {
572 return { success: true }
573 } else {
574 return { success: false, error: '插件未运行' }
575 }
576 }
577 return { success: false, error: '功能不可用' }
578 } catch (error: unknown) {
579 console.error('[Plugins] 终止插件失败:', error)
580 return { success: false, error: error instanceof Error ? error.message : '未知错误' }
581 }
582 }
583
584 // 终止插件并返回搜索页面
585 private killPluginAndReturn(pluginPath: string): { success: boolean; error?: string } {

Callers 8

setupIPCMethod · 0.95
setupIPCMethod · 0.45
setupIPCMethod · 0.45
removeDevProjectMethod · 0.45
uninstallDevPluginMethod · 0.45
setPluginDisabledMethod · 0.45
deletePluginMethod · 0.45
killPluginAndReturnMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected