Can't use more than one context provider on a MCP server
This commit is contained in:
parent
62978d19ee
commit
73ee9f22ab
2 changed files with 4 additions and 2 deletions
|
|
@ -164,6 +164,7 @@ class MCPConnection {
|
|||
config.contextProviders.push(
|
||||
new MCPContextProvider({
|
||||
submenuItems,
|
||||
mcpId,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import {
|
|||
import { MCPManagerSingleton } from "../mcp";
|
||||
|
||||
interface MCPContextProviderOptions {
|
||||
mcpId: string;
|
||||
submenuItems: ContextSubmenuItem[];
|
||||
}
|
||||
|
||||
|
|
@ -74,10 +75,10 @@ class MCPContextProvider extends BaseContextProvider {
|
|||
args: LoadSubmenuItemsArgs,
|
||||
): Promise<ContextSubmenuItem[]> {
|
||||
return (this.options as MCPContextProviderOptions).submenuItems.map(
|
||||
(item, index) => ({
|
||||
(item) => ({
|
||||
...item,
|
||||
id: JSON.stringify({
|
||||
mcpId: String(index),
|
||||
mcpId: (this.options as MCPContextProviderOptions).mcpId,
|
||||
uri: item.id,
|
||||
}),
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue