diff --git a/src/pages/Chat/ExecutionGraphCard.tsx b/src/pages/Chat/ExecutionGraphCard.tsx index 911a1a7..2941587 100644 --- a/src/pages/Chat/ExecutionGraphCard.tsx +++ b/src/pages/Chat/ExecutionGraphCard.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { CheckCircle2, ChevronDown, ChevronRight, CircleDashed, GitBranch, MessageSquare, Wrench, XCircle } from 'lucide-react'; +import { CheckCircle2, ChevronDown, ChevronRight, CircleDashed, GitBranch, Link, MessageSquare, Wrench, XCircle } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import { cn } from '@/lib/utils'; import type { TaskStep } from './task-visualization'; @@ -47,18 +47,17 @@ function StepDetailCard({ step }: { step: TaskStep }) { const isNarration = step.kind === 'message'; const isTool = step.kind === 'tool'; const isThinking = step.kind === 'thinking'; - const showRunningDots = isTool && step.status === 'running'; + const showRunningDots = (isTool || isThinking) && step.status === 'running'; const hideStatusText = isTool && step.status === 'completed'; const detailPreview = step.detail?.replace(/\s+/g, ' ').trim(); const canExpand = hasDetail; - const usePlainExpandedDetail = isTool || isThinking; - const displayLabel = isThinking ? t('executionGraph.thinkingLabel') : step.label; + const displayLabel = isThinking ? t('executionGraph.thinkingLabel') : step.label; return (
{displayLabel}
+ {isTool && step.label === 'web_fetch' && step.url && ( + e.stopPropagation()} + className="shrink-0 text-muted-foreground hover:text-foreground" + title={step.url} + > + + + )} {isTool && detailPreview && !expanded && ({detailPreview} @@ -104,10 +115,8 @@ function StepDetailCard({ step }: { step: TaskStep }) { className={cn( 'text-muted-foreground', isThinking - ? 'mt-0.5 text-[12px] leading-5 line-clamp-1' - : isNarration - ? 'text-[13px] leading-6 text-muted-foreground line-clamp-2' - : 'mt-0.5 text-[12px] leading-5 line-clamp-2', + ? 'mt-0.5 text-[13px] leading-5 line-clamp-2' + : 'text-[13px] leading-6 text-muted-foreground line-clamp-2', )} > {step.detail} @@ -120,29 +129,30 @@ function StepDetailCard({ step }: { step: TaskStep }) { )} - {step.detail && expanded && canExpand && ( - usePlainExpandedDetail ? ( -
- {step.detail}
-
- ) : (
-
- {step.detail}
-
-
+ {formatted}
+
+
+ {step.detail}
+
+