Commit ef95562
committed
fix: ensure MCP server list appears in settings when server starts first
When the MCP server was initialized before opening RooCode, the server list
would not appear in the settings. This was fixed by:
1. Adding proper server list initialization in ClineProvider.ts when the
webview launches, checking if mcpHub exists and sending its current
servers to the webview:
```typescript
if (this.mcpHub) {
this.postMessageToWebview({
type: "mcpServers",
mcpServers: this.mcpHub.getServers()
})
}
```
2. Using the public getServers() method from McpHub instead of relying on
internal state updates, ensuring consistent server list state across
the application.
The fix maintains clean separation of concerns and follows existing patterns
for state management between the extension and webview.1 parent b2b5e1f commit ef95562
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
616 | 625 | | |
617 | 626 | | |
618 | 627 | | |
| |||
2115 | 2124 | | |
2116 | 2125 | | |
2117 | 2126 | | |
| 2127 | + | |
2118 | 2128 | | |
2119 | 2129 | | |
2120 | 2130 | | |
| |||
0 commit comments