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

Method subInputSelect

src/main/api/plugin/ui.ts:296–315  ·  view source on GitHub ↗
(event?: Electron.IpcMainEvent | Electron.IpcMainInvokeEvent)

Source from the content-addressed store, hash-verified

294 }
295
296 private subInputSelect(event?: Electron.IpcMainEvent | Electron.IpcMainInvokeEvent): boolean {
297 try {
298 const targetWindow = event
299 ? detachedWindowManager.getWindowByPluginWebContents(event.sender.id) || this.mainWindow
300 : this.mainWindow
301
302 if (!targetWindow) {
303 console.warn('[PluginUI] 无法找到目标窗口')
304 return false
305 }
306
307 targetWindow.webContents.focus()
308 targetWindow.webContents.send('select-sub-input')
309
310 return true
311 } catch (error: unknown) {
312 console.error('[PluginUI] 选中子输入框失败:', error)
313 return false
314 }
315 }
316
317 private hidePlugin(): void {
318 if (this.pluginManager) {

Callers 2

setupIPCMethod · 0.95
focusSubInputFunction · 0.80

Calls 2

focusMethod · 0.80

Tested by

no test coverage detected