(pluginPath: string)
| 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 } { |
no outgoing calls
no test coverage detected