* 终止当前插件并返回搜索页面 * 用于 Cmd+Q / Ctrl+Q 快捷键
()
| 1171 | * 用于 Cmd+Q / Ctrl+Q 快捷键 |
| 1172 | */ |
| 1173 | public killCurrentPlugin(): void { |
| 1174 | if (!this.currentPluginPath) { |
| 1175 | console.log('[Plugin] 没有正在运行的插件') |
| 1176 | return |
| 1177 | } |
| 1178 | |
| 1179 | const pluginPath = this.currentPluginPath |
| 1180 | |
| 1181 | // 终止插件 |
| 1182 | const success = this.killPlugin(pluginPath) |
| 1183 | |
| 1184 | if (success && this.mainWindow) { |
| 1185 | windowManager.notifyBackToSearch() |
| 1186 | // 主窗口获取焦点 |
| 1187 | this.mainWindow.webContents.focus() |
| 1188 | console.log('[Plugin] 已终止插件并返回搜索页面') |
| 1189 | } |
| 1190 | } |
| 1191 | |
| 1192 | // 发送输入事件到当前插件(统一接口) |
| 1193 | public sendInputEvent( |
no test coverage detected