Skip to content

Commit 3ec3a87

Browse files
committed
Add MCP provider refresh for @mention dropdown submenu items
1 parent cf54304 commit 3ec3a87

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

core/core.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,18 @@ export class Core {
147147

148148
MCPManagerSingleton.getInstance().onConnectionsRefreshed = () => {
149149
void this.configHandler.reloadConfig();
150+
151+
// Refresh @mention dropdown submenu items for MCP providers
152+
const mcpManager = MCPManagerSingleton.getInstance();
153+
const mcpProviderNames = Array.from(mcpManager.connections.keys()).map(
154+
(mcpId) => `mcp-${mcpId}`
155+
);
156+
157+
if (mcpProviderNames.length > 0) {
158+
this.messenger.send("refreshSubmenuItems", {
159+
providers: mcpProviderNames,
160+
});
161+
}
150162
};
151163

152164
this.codeBaseIndexer = new CodebaseIndexer(

0 commit comments

Comments
 (0)