summaryrefslogtreecommitdiff
path: root/packages/core/src/tools/mcp-client.ts
diff options
context:
space:
mode:
authorchristine betts <[email protected]>2025-07-21 20:52:02 +0000
committerGitHub <[email protected]>2025-07-21 20:52:02 +0000
commit1969d805f2fd559e2227a8822de5be66d3d8a184 (patch)
treee9a84b780a87a67778730b806fad0df770aebec6 /packages/core/src/tools/mcp-client.ts
parentd7a57d85a39535e84bba7e65eb02dcb627b9cb81 (diff)
[ide-mode] Use active files and selected text in user prompt (#4614)
Diffstat (limited to 'packages/core/src/tools/mcp-client.ts')
-rw-r--r--packages/core/src/tools/mcp-client.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/core/src/tools/mcp-client.ts b/packages/core/src/tools/mcp-client.ts
index cb191b0d..b1786af0 100644
--- a/packages/core/src/tools/mcp-client.ts
+++ b/packages/core/src/tools/mcp-client.ts
@@ -22,7 +22,7 @@ import { DiscoveredMCPTool } from './mcp-tool.js';
import { FunctionDeclaration, mcpToTool } from '@google/genai';
import { ToolRegistry } from './tool-registry.js';
import {
- ActiveFileNotificationSchema,
+ OpenFilesNotificationSchema,
IDE_SERVER_NAME,
ideContext,
} from '../services/ideContext.js';
@@ -217,15 +217,15 @@ export async function connectAndDiscover(
console.error(`MCP ERROR (${mcpServerName}):`, error.toString());
updateMCPServerStatus(mcpServerName, MCPServerStatus.DISCONNECTED);
if (mcpServerName === IDE_SERVER_NAME) {
- ideContext.clearActiveFileContext();
+ ideContext.clearOpenFilesContext();
}
};
if (mcpServerName === IDE_SERVER_NAME) {
mcpClient.setNotificationHandler(
- ActiveFileNotificationSchema,
+ OpenFilesNotificationSchema,
(notification) => {
- ideContext.setActiveFileContext(notification.params);
+ ideContext.setOpenFilesContext(notification.params);
},
);
}