fix: delete hallucinated tools

This commit is contained in:
Nate 2025-07-13 18:14:43 -07:00
parent 9d4ea20deb
commit 2d4cf55c39
3 changed files with 1 additions and 79 deletions

View file

@ -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

View file

@ -135,35 +135,6 @@ const TUIChat: React.FC<TUIChatProps> = ({
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__")) {

View file

@ -43,54 +43,6 @@ const ToolResultSummary: React.FC<ToolResultSummaryProps> = ({
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__")) {