import { Button } from "@/components/ui/button"; import { X, SkipBack, SkipForward } from "lucide-react"; import { Project } from "@/lib/api"; import { getToolIcon } from "@/components/thread/utils"; import React from "react"; // Simple input interface export interface ToolCallInput { assistantCall: { content?: string; name?: string; }; toolResult?: { content?: string; isSuccess?: boolean; }; } // Simplified generic tool view function GenericToolView({ name, assistantContent, toolContent, isSuccess = true }: { name?: string; assistantContent?: string; toolContent?: string; isSuccess?: boolean; }) { const toolName = name || 'Unknown Tool'; return (
{React.createElement(getToolIcon(toolName), { className: "h-4 w-4" })}

{toolName}

{toolContent && (
{isSuccess ? 'Success' : 'Failed'}
)}
{/* Assistant Message */}
Assistant Message
{assistantContent}
{/* Tool Result */} {toolContent && (
Tool Result
{toolContent}
)}
); } interface ToolCallSidePanelProps { isOpen: boolean; onClose: () => void; toolCalls: ToolCallInput[]; currentIndex: number; onNavigate: (newIndex: number) => void; project?: Project; } export function ToolCallSidePanel({ isOpen, onClose, toolCalls, currentIndex, onNavigate, project }: ToolCallSidePanelProps) { if (!isOpen) return null; const currentToolCall = toolCalls[currentIndex]; const totalCalls = toolCalls.length; const renderContent = () => { if (!currentToolCall) { return (

No tool call selected

); } return ( ); }; return (

Tool Details

{renderContent()}
{totalCalls > 1 && (
{currentIndex + 1} of {totalCalls}
)}
); }