refactor: streamline MCP service handling and improve IPC registration

* Refactored MCPService to implement a singleton pattern for better instance management.
* Updated IPC registration to utilize the new getMcpInstance method for handling MCP-related requests.
* Removed redundant IPC handlers from the main index file and centralized them in the ipc module.
* Added background throttling option in WindowService configuration to enhance performance.
* Introduced delays in MCPToolsButton to optimize resource and prompt fetching after initial load.
This commit is contained in:
kangfenmao
2025-05-18 18:47:01 +08:00
committed by 亢奋猫
parent 4b2417ce37
commit 8bfbbd497c
7 changed files with 320 additions and 252 deletions
+2 -1
View File
@@ -446,7 +446,8 @@ export class WindowService {
preload: join(__dirname, '../preload/index.js'),
sandbox: false,
webSecurity: false,
webviewTag: true
webviewTag: true,
backgroundThrottling: false
}
})