fix(core): Ensure read_many_files tool is available to zed. (#13338)

This commit is contained in:
joshualitt
2025-11-18 14:58:12 -08:00
committed by GitHub
parent b916d79fe2
commit 10003a6490
@@ -31,6 +31,7 @@ import {
DEFAULT_GEMINI_MODEL_AUTO, DEFAULT_GEMINI_MODEL_AUTO,
DEFAULT_GEMINI_FLASH_MODEL, DEFAULT_GEMINI_FLASH_MODEL,
debugLogger, debugLogger,
ReadManyFilesTool,
} from '@google/gemini-cli-core'; } from '@google/gemini-cli-core';
import * as acp from './acp.js'; import * as acp from './acp.js';
import { AcpFileSystemService } from './fileSystemService.js'; import { AcpFileSystemService } from './fileSystemService.js';
@@ -570,7 +571,7 @@ class Session {
const ignoredPaths: string[] = []; const ignoredPaths: string[] = [];
const toolRegistry = this.config.getToolRegistry(); const toolRegistry = this.config.getToolRegistry();
const readManyFilesTool = toolRegistry.getTool('read_many_files'); const readManyFilesTool = new ReadManyFilesTool(this.config);
const globTool = toolRegistry.getTool('glob'); const globTool = toolRegistry.getTool('glob');
if (!readManyFilesTool) { if (!readManyFilesTool) {
@@ -734,7 +735,7 @@ class Session {
if (pathSpecsToRead.length > 0) { if (pathSpecsToRead.length > 0) {
const toolArgs = { const toolArgs = {
paths: pathSpecsToRead, include: pathSpecsToRead,
}; };
const callId = `${readManyFilesTool.name}-${Date.now()}`; const callId = `${readManyFilesTool.name}-${Date.now()}`;