From 2d4cf55c393121570ff2c4459c6942e124bc88dd Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 13 Jul 2025 18:14:43 -0700 Subject: [PATCH] fix: delete hallucinated tools --- src/intro.ts | 3 +-- src/ui/TUIChat.tsx | 29 ---------------------- src/ui/ToolResultSummary.tsx | 48 ------------------------------------ 3 files changed, 1 insertion(+), 79 deletions(-) diff --git a/src/intro.ts b/src/intro.ts index 44fc37f81..74cda0e5f 100644 --- a/src/intro.ts +++ b/src/intro.ts @@ -1,9 +1,8 @@ +import { Assistant, type AssistantConfig } from "@continuedev/sdk"; import chalk from "chalk"; -import * as fs from "fs"; import { CONTINUE_ASCII_ART } from "./asciiArt.js"; import { MCPService } from "./mcp.js"; import { getAllTools } from "./streamChatResponse.js"; -import { Assistant, type AssistantConfig } from "@continuedev/sdk"; export function loadSystemMessage( assistant: AssistantConfig diff --git a/src/ui/TUIChat.tsx b/src/ui/TUIChat.tsx index b570f0807..90e753e13 100644 --- a/src/ui/TUIChat.tsx +++ b/src/ui/TUIChat.tsx @@ -135,35 +135,6 @@ const TUIChat: React.FC = ({ return `Terminal(${args.command || ""})`; case "view_diff": return `Diff(${args.path || "."})`; - - // External Claude Code Tools (PascalCase) - case "Read": - return `Read(${args.file_path || args.path || ""})`; - case "Write": - return `Write(${args.file_path || ""})`; - case "Edit": - case "MultiEdit": - return `Edit(${args.file_path || ""})`; - case "Bash": - return `Terminal(${args.command || ""})`; - case "Glob": - return `Find(${args.pattern || ""})`; - case "Grep": - return `Search(${args.pattern || ""})`; - case "LS": - return `List(${args.path || ""})`; - case "NotebookRead": - return `Notebook(${args.notebook_path || ""})`; - case "NotebookEdit": - return `Notebook(${args.notebook_path || ""})`; - case "WebFetch": - return `Web(${args.url || ""})`; - case "WebSearch": - return `Search(${args.query || ""})`; - case "TodoWrite": - return `Todo(${args.todos?.length || 0} items)`; - case "Task": - return `Task(${args.description || ""})`; default: // Handle MCP tools or unknown tools if (name.startsWith("mcp__")) { diff --git a/src/ui/ToolResultSummary.tsx b/src/ui/ToolResultSummary.tsx index 7ae6646ac..0605d1144 100644 --- a/src/ui/ToolResultSummary.tsx +++ b/src/ui/ToolResultSummary.tsx @@ -43,54 +43,6 @@ const ToolResultSummary: React.FC = ({ case "view_diff": return `Diff output (${lines} lines)`; - // External Claude Code Tools (PascalCase) - case "Read": - // Try to extract file path from content if it contains line numbers - if (content.includes("→")) { - const pathMatch = content.match(/^(.+?):/); - const filePath = pathMatch ? pathMatch[1] : "file"; - return `Read ${filePath} (${lines} lines)`; - } - return `Read tool output (${lines} lines)`; - - case "Bash": - return `Command output (${lines} lines)`; - - case "Glob": - const fileCount = lines; - return `Found ${fileCount} ${fileCount === 1 ? "file" : "files"}`; - - case "Grep": - return `Found ${lines} ${lines === 1 ? "match" : "matches"}`; - - case "LS": - return `Listed ${lines} ${lines === 1 ? "item" : "items"}`; - - case "Write": - return "File written successfully"; - - case "Edit": - case "MultiEdit": - return "File edited successfully"; - - case "NotebookRead": - return `Read notebook (${lines} lines)`; - - case "NotebookEdit": - return "Notebook edited successfully"; - - case "WebFetch": - return `Fetched web content (${lines} lines)`; - - case "WebSearch": - return `Search results (${lines} lines)`; - - case "TodoWrite": - return "Todo list updated"; - - case "Task": - return `Task completed (${lines} lines)`; - default: // Handle MCP tools or unknown tools if (toolName?.startsWith("mcp__")) {