diff --git a/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx b/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx index 1be70ad8..126df985 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx @@ -925,9 +925,10 @@ const MCPServerComponent = ({ name, server }: { name: string, server: MCPServer
{name}
{/* Power toggle switch */} -
+
mcpService.toggleServerIsOn(name, !isOn)} /> @@ -964,16 +965,7 @@ const MCPServerComponent = ({ name, server }: { name: string, server: MCPServer )} {/* Error message if present */} - {server.error && ( -
- - - - - - {server.error} -
- )} + {server.error && ()}
); }; diff --git a/src/vs/workbench/contrib/void/common/mcpService.ts b/src/vs/workbench/contrib/void/common/mcpService.ts index f516822d..ca6d94a1 100644 --- a/src/vs/workbench/contrib/void/common/mcpService.ts +++ b/src/vs/workbench/contrib/void/common/mcpService.ts @@ -92,9 +92,14 @@ class MCPService extends Disposable implements IMCPService { super(); this.channel = this.mainProcessService.getChannel('void-channel-mcp') - this._register((this.channel.listen('onAdd_server') satisfies Event)(e => { this._setMCPServerState(e.response.name, e.response.newServer) })); - this._register((this.channel.listen('onUpdate_server') satisfies Event)(e => { this._setMCPServerState(e.response.name, e.response.newServer) })); - this._register((this.channel.listen('onDelete_server') satisfies Event)(e => { this._setMCPServerState(e.response.name, e.response.newServer) })); + + const onEvent = (e: MCPServerEventResponse) => { + console.log('GOT EVENT', e) + this._setMCPServerState(e.response.name, e.response.newServer) + } + this._register((this.channel.listen('onAdd_server') satisfies Event)(onEvent)); + this._register((this.channel.listen('onUpdate_server') satisfies Event)(onEvent)); + this._register((this.channel.listen('onDelete_server') satisfies Event)(onEvent)); this._initialize(); }