- Added delete button with trash icon to MCP server rows
- Implemented confirmation dialog using existing Dialog component
- Added "deleteMcpServer" message type to WebviewMessage interface
- Added handler in ClineProvider to process deletion:
- Removes server from MCP settings file
- Closes server connection
- Updates UI to reflect changes
- Added user feedback with success/error notifications
- Ensured consistent modal design with rest of application
- Add proper change detection for refreshValues using deep comparison
- Increase debounce timing from 50ms to 100ms for better performance
- Add proper error handling for missing Requesty API key
- Fix apiConfiguration update to properly merge with existing state
- Remove debug console logs
- Add RequestyHandler implementation for API integration
- Add RequestyModelPicker component for model selection
- Update shared types and messages for Requesty support
- Update API options to include Requesty provider
When the MCP server was initialized before opening RooCode, disabled servers
would not appear in the settings UI. This was fixed by:
1. Using getAllServers() instead of getServers() in ClineProvider.ts for UI
state updates, ensuring all servers (including disabled ones) are shown
2. Maintaining getServers() for operational use (AI prompts, tool calls)
where disabled servers should be filtered out
The fix maintains clean separation between UI display and operational
server filtering.
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.
Problem:
- Multiple instances of the Roo Code application were launching separate MCP server instances
- This led to unnecessary resource consumption and potential conflicts between instances
Solution:
1. Created new McpServerManager singleton class to manage MCP server instances:
- Static getInstance() method ensures only one McpHub instance exists
- Tracks registered ClineProvider instances
- Handles cleanup on extension deactivation
2. Modified ClineProvider class:
- Changed mcpHub from private to protected
- Added getMcpHub() public getter method
- Updated initialization to use McpServerManager
- Added unregister logic in dispose()
3. Updated extension.ts to handle cleanup:
- Added McpServerManager cleanup in deactivate()
Technical Implementation:
- Uses WeakRef for provider tracking to allow proper garbage collection
- Maintains global state to track instance IDs
- Implements proper cleanup of resources on disposal
- Ensures backward compatibility with existing code
This change significantly improves resource usage and prevents potential conflicts
between multiple instances of the application while maintaining all existing
functionality.