Migrate openMcpSettings protobus (#3778)

* migrate openMcpSettings

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
This commit is contained in:
EvanandElephant Lumps authored and GitHub committed 2025-05-23 14:46:53 -07:00
1 parent b9551c960a
commit cf0af8a3f0
8 files changed
+34 -15

No files matched your search

-7
View File
@@ -316,13 +316,6 @@ export class Controller {
await this.fetchUserCreditsData()
break
}
case "openMcpSettings": {
const mcpSettingsFilePath = await this.mcpHub?.getMcpSettingsFilePath()
if (mcpSettingsFilePath) {
await handleFileServiceRequest(this, "openFile", { value: mcpSettingsFilePath })
}
break
}
case "fetchMcpMarketplace": {
await this.fetchMcpMarketplace(message.bool)
break
@@ -0,0 +1,17 @@
import { Controller } from ".."
import { Empty, EmptyRequest } from "@shared/proto/common"
import { openFile as openFileIntegration } from "@integrations/misc/open-file"
/**
* Opens the MCP settings file in the editor
* @param controller The controller instance
* @param _request Empty request
* @returns Empty response
*/
export async function openMcpSettings(controller: Controller, _request: EmptyRequest): Promise<Empty> {
const mcpSettingsFilePath = await controller.mcpHub?.getMcpSettingsFilePath()
if (mcpSettingsFilePath) {
await openFileIntegration(mcpSettingsFilePath)
}
return Empty.create()
}