From 67604ea95ac2cb6054e06310177d0b3c2f03ae39 Mon Sep 17 00:00:00 2001 From: Soumyadas15 Date: Mon, 19 May 2025 22:00:33 +0530 Subject: [PATCH] chore(ui): tool-panel ui revamp --- .../thread/content/ThreadSkeleton.tsx | 2 +- .../thread/tool-views/BrowserToolView.tsx | 258 ++++++---- .../thread/tool-views/CommandToolView.tsx | 440 +++++++++++------- .../thread/tool-views/ExposePortToolView.tsx | 355 ++++++++------ .../tool-views/FileOperationToolView.tsx | 58 ++- .../tool-views/wrapper/ToolViewRegistry.tsx | 19 +- 6 files changed, 695 insertions(+), 437 deletions(-) diff --git a/frontend/src/components/thread/content/ThreadSkeleton.tsx b/frontend/src/components/thread/content/ThreadSkeleton.tsx index 64a26588..01dc2c78 100644 --- a/frontend/src/components/thread/content/ThreadSkeleton.tsx +++ b/frontend/src/components/thread/content/ThreadSkeleton.tsx @@ -118,4 +118,4 @@ export function ThreadSkeleton({ )} ); -} \ No newline at end of file +} \ No newline at end of file diff --git a/frontend/src/components/thread/tool-views/BrowserToolView.tsx b/frontend/src/components/thread/tool-views/BrowserToolView.tsx index 2fcb45e9..6ca7c446 100644 --- a/frontend/src/components/thread/tool-views/BrowserToolView.tsx +++ b/frontend/src/components/thread/tool-views/BrowserToolView.tsx @@ -6,6 +6,9 @@ import { CheckCircle, AlertTriangle, CircleDashed, + ChevronDown, + ChevronUp, + Loader2 } from 'lucide-react'; import { ToolViewProps } from './types'; import { @@ -17,6 +20,12 @@ import { import { ApiMessageType } from '@/components/thread/types'; import { safeJsonParse } from '@/components/thread/utils'; import { cn } from '@/lib/utils'; +import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { Badge } from '@/components/ui/badge'; +import { Button } from '@/components/ui/button'; +import { Progress } from '@/components/ui/progress'; +import { ScrollArea } from "@/components/ui/scroll-area"; +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; export function BrowserToolView({ name = 'browser-operation', @@ -84,7 +93,6 @@ export function BrowserToolView({ browserStateMessage.content, {}, ); - console.log('Browser state content: ', browserStateContent) screenshotBase64 = browserStateContent?.screenshot_base64 || null; } } @@ -110,120 +118,180 @@ export function BrowserToolView({