From 7076d917d4ffec77616af81e7cbd2f806716cef2 Mon Sep 17 00:00:00 2001 From: Soumyadas15 Date: Fri, 23 May 2025 13:25:35 +0530 Subject: [PATCH] chore(ui): payment dialog + live indicator fix --- .../src/components/thread/tool-views/WebScrapeToolView.tsx | 1 + .../src/components/thread/tool-views/WebSearchToolView.tsx | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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))}