diff --git a/frontend/src/components/thread/tool-views/WebScrapeToolView.tsx b/frontend/src/components/thread/tool-views/WebScrapeToolView.tsx index 09f64a1c..19bb4e2e 100644 --- a/frontend/src/components/thread/tool-views/WebScrapeToolView.tsx +++ b/frontend/src/components/thread/tool-views/WebScrapeToolView.tsx @@ -34,6 +34,7 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/comp function truncateText(text: string, maxLength: number = 40) { return text.length > maxLength ? text.substring(0, maxLength) + '...' : text; } + export function WebScrapeToolView({ name = 'scrape-webpage', assistantContent, diff --git a/frontend/src/components/thread/tool-views/WebSearchToolView.tsx b/frontend/src/components/thread/tool-views/WebSearchToolView.tsx index 73fc79a8..87bf645a 100644 --- a/frontend/src/components/thread/tool-views/WebSearchToolView.tsx +++ b/frontend/src/components/thread/tool-views/WebSearchToolView.tsx @@ -32,6 +32,10 @@ import { Progress } from '@/components/ui/progress'; import { ScrollArea } from "@/components/ui/scroll-area"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; +function truncateText(text: string, maxLength: number = 70) { + return text.length > maxLength ? text.substring(0, maxLength) + '...' : text; +} + export function WebSearchToolView({ name = 'web-search', assistantContent, @@ -278,7 +282,7 @@ export function WebSearchToolView({
- {cleanUrl(result.url)} + {truncateText(cleanUrl(result.url))}