Fix build break (tool -> tools).
- Without this we'd get a TS1261 about the name "tool" only differeing from "Tool" (the class) by case.
This commit is contained in:
parent
ece8630c33
commit
d970882428
|
@ -10,7 +10,7 @@ import { CoreSystemPrompt } from './prompts.js';
|
||||||
import { type ToolCallEvent, type ToolCallConfirmationDetails, ToolCallStatus } from '../ui/types.js';
|
import { type ToolCallEvent, type ToolCallConfirmationDetails, ToolCallStatus } from '../ui/types.js';
|
||||||
import process from 'node:process';
|
import process from 'node:process';
|
||||||
import { toolRegistry } from '../tools/tool-registry.js';
|
import { toolRegistry } from '../tools/tool-registry.js';
|
||||||
import { ToolResult } from '../tools/tool.js';
|
import { ToolResult } from '../tools/tools.js';
|
||||||
import { getFolderStructure } from '../utils/getFolderStructure.js';
|
import { getFolderStructure } from '../utils/getFolderStructure.js';
|
||||||
import { GeminiEventType, GeminiStream } from './gemini-stream.js';
|
import { GeminiEventType, GeminiStream } from './gemini-stream.js';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Part } from "@google/genai";
|
import { Part } from "@google/genai";
|
||||||
import { toolRegistry } from "../tools/tool-registry.js";
|
import { toolRegistry } from "../tools/tool-registry.js";
|
||||||
import { HistoryItem, IndividualToolCallDisplay, ToolCallEvent, ToolCallStatus, ToolConfirmationOutcome, ToolEditConfirmationDetails, ToolExecuteConfirmationDetails } from "../ui/types.js";
|
import { HistoryItem, IndividualToolCallDisplay, ToolCallEvent, ToolCallStatus, ToolConfirmationOutcome, ToolEditConfirmationDetails, ToolExecuteConfirmationDetails } from "../ui/types.js";
|
||||||
import { ToolResultDisplay } from "../tools/tool.js";
|
import { ToolResultDisplay } from "../tools/tools.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Processes a tool call chunk and updates the history state accordingly.
|
* Processes a tool call chunk and updates the history state accordingly.
|
||||||
|
|
|
@ -2,7 +2,7 @@ import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import * as Diff from 'diff';
|
import * as Diff from 'diff';
|
||||||
import { SchemaValidator } from '../utils/schemaValidator.js';
|
import { SchemaValidator } from '../utils/schemaValidator.js';
|
||||||
import { BaseTool, ToolResult } from './tool.js';
|
import { BaseTool, ToolResult } from './tools.js';
|
||||||
import { ToolCallConfirmationDetails, ToolConfirmationOutcome, ToolEditConfirmationDetails } from '../ui/types.js';
|
import { ToolCallConfirmationDetails, ToolConfirmationOutcome, ToolEditConfirmationDetails } from '../ui/types.js';
|
||||||
import { makeRelative, shortenPath } from '../utils/paths.js';
|
import { makeRelative, shortenPath } from '../utils/paths.js';
|
||||||
import { ReadFileTool } from './read-file.tool.js';
|
import { ReadFileTool } from './read-file.tool.js';
|
||||||
|
|
|
@ -2,7 +2,7 @@ import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fg from 'fast-glob';
|
import fg from 'fast-glob';
|
||||||
import { SchemaValidator } from '../utils/schemaValidator.js';
|
import { SchemaValidator } from '../utils/schemaValidator.js';
|
||||||
import { BaseTool, ToolResult } from './tool.js';
|
import { BaseTool, ToolResult } from './tools.js';
|
||||||
import { shortenPath, makeRelative } from '../utils/paths.js';
|
import { shortenPath, makeRelative } from '../utils/paths.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,7 +4,7 @@ import path from 'path';
|
||||||
import { EOL } from 'os'; // Used for parsing grep output lines
|
import { EOL } from 'os'; // Used for parsing grep output lines
|
||||||
import { spawn } from 'child_process'; // Used for git grep and system grep
|
import { spawn } from 'child_process'; // Used for git grep and system grep
|
||||||
import fastGlob from 'fast-glob'; // Used for JS fallback file searching
|
import fastGlob from 'fast-glob'; // Used for JS fallback file searching
|
||||||
import { BaseTool, ToolResult } from './tool.js';
|
import { BaseTool, ToolResult } from './tools.js';
|
||||||
import { SchemaValidator } from '../utils/schemaValidator.js';
|
import { SchemaValidator } from '../utils/schemaValidator.js';
|
||||||
import { makeRelative, shortenPath } from '../utils/paths.js';
|
import { makeRelative, shortenPath } from '../utils/paths.js';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { BaseTool, ToolResult } from './tool.js';
|
import { BaseTool, ToolResult } from './tools.js';
|
||||||
import { SchemaValidator } from '../utils/schemaValidator.js';
|
import { SchemaValidator } from '../utils/schemaValidator.js';
|
||||||
import { makeRelative, shortenPath } from '../utils/paths.js';
|
import { makeRelative, shortenPath } from '../utils/paths.js';
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { SchemaValidator } from '../utils/schemaValidator.js';
|
import { SchemaValidator } from '../utils/schemaValidator.js';
|
||||||
import { makeRelative, shortenPath } from '../utils/paths.js';
|
import { makeRelative, shortenPath } from '../utils/paths.js';
|
||||||
import { BaseTool, ToolResult } from './tool.js';
|
import { BaseTool, ToolResult } from './tools.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parameters for the ReadFile tool
|
* Parameters for the ReadFile tool
|
||||||
|
|
|
@ -3,7 +3,7 @@ import path from 'path';
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
import crypto from 'crypto';
|
import crypto from 'crypto';
|
||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
import { BaseTool, ToolResult } from './tool.js';
|
import { BaseTool, ToolResult } from './tools.js';
|
||||||
import { SchemaValidator } from '../utils/schemaValidator.js';
|
import { SchemaValidator } from '../utils/schemaValidator.js';
|
||||||
import { ToolCallConfirmationDetails, ToolConfirmationOutcome, ToolExecuteConfirmationDetails } from '../ui/types.js'; // Adjust path as needed
|
import { ToolCallConfirmationDetails, ToolConfirmationOutcome, ToolExecuteConfirmationDetails } from '../ui/types.js'; // Adjust path as needed
|
||||||
import { BackgroundTerminalAnalyzer } from '../utils/BackgroundTerminalAnalyzer.js';
|
import { BackgroundTerminalAnalyzer } from '../utils/BackgroundTerminalAnalyzer.js';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ToolListUnion, FunctionDeclaration } from '@google/genai';
|
import { ToolListUnion, FunctionDeclaration } from '@google/genai';
|
||||||
import { Tool } from './tool.js';
|
import { Tool } from './tools.js';
|
||||||
|
|
||||||
class ToolRegistry {
|
class ToolRegistry {
|
||||||
private tools: Map<string, Tool> = new Map();
|
private tools: Map<string, Tool> = new Map();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { BaseTool, ToolResult } from './tool.js';
|
import { BaseTool, ToolResult } from './tools.js';
|
||||||
import { SchemaValidator } from '../utils/schemaValidator.js';
|
import { SchemaValidator } from '../utils/schemaValidator.js';
|
||||||
import { makeRelative, shortenPath } from '../utils/paths.js';
|
import { makeRelative, shortenPath } from '../utils/paths.js';
|
||||||
import { ToolCallConfirmationDetails, ToolConfirmationOutcome, ToolEditConfirmationDetails } from '../ui/types.js';
|
import { ToolCallConfirmationDetails, ToolConfirmationOutcome, ToolEditConfirmationDetails } from '../ui/types.js';
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||||
import { Box, Text } from 'ink';
|
import { Box, Text } from 'ink';
|
||||||
import Spinner from 'ink-spinner';
|
import Spinner from 'ink-spinner';
|
||||||
import { ToolCallStatus } from '../../types.js';
|
import { ToolCallStatus } from '../../types.js';
|
||||||
import { ToolResultDisplay } from '../../../tools/tool.js';
|
import { ToolResultDisplay } from '../../../tools/tools.js';
|
||||||
import DiffRenderer from './DiffRenderer.js';
|
import DiffRenderer from './DiffRenderer.js';
|
||||||
import { MarkdownRenderer } from '../../utils/MarkdownRenderer.js';
|
import { MarkdownRenderer } from '../../utils/MarkdownRenderer.js';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { ToolResultDisplay } from '../tools/tool.js';
|
import { ToolResultDisplay } from "../tools/tools.js";
|
||||||
|
|
||||||
export enum ToolCallStatus {
|
export enum ToolCallStatus {
|
||||||
Pending,
|
Pending,
|
||||||
|
|
Loading…
Reference in New Issue