From 1969d805f2fd559e2227a8822de5be66d3d8a184 Mon Sep 17 00:00:00 2001 From: christine betts Date: Mon, 21 Jul 2025 20:52:02 +0000 Subject: [ide-mode] Use active files and selected text in user prompt (#4614) --- packages/core/src/tools/mcp-client.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/core/src/tools') 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); }, ); } -- cgit v1.2.3