From 1c82092735d89f5ae3bd841afd6fbe9bffff1106 Mon Sep 17 00:00:00 2001 From: gongzhiyong Date: Wed, 15 Apr 2026 02:49:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(P2):=20chip=20hover=E5=AF=B9=E6=AF=94?= =?UTF-8?q?=E5=BA=A6=20+=20=E7=BB=9F=E4=B8=80=E5=A4=8D=E5=88=B6=E6=8C=89?= =?UTF-8?q?=E9=92=AE=20+=20=E7=BB=9F=E4=B8=80=E6=97=B6=E9=97=B4=E6=88=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- langgraph/src/components/ChatMessages.tsx | 22 ++++++++++++++++++++-- langgraph/src/components/ConfigPanel.tsx | 6 +++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/langgraph/src/components/ChatMessages.tsx b/langgraph/src/components/ChatMessages.tsx index 4f1ffc2..f343054 100644 --- a/langgraph/src/components/ChatMessages.tsx +++ b/langgraph/src/components/ChatMessages.tsx @@ -332,9 +332,9 @@ export function ChatMessages({ /> )} - {(plainTextContent || hasThinking) && !hasToolCalls && ( + {(plainTextContent || hasThinking) && (
- + {thread.isLoading && isLastAi && (
)} + {/* Timestamp for tool-only messages (no text bubble) */} + {hasToolCalls && !plainTextContent && !hasThinking && ( + + {(() => { + const ts = (message as any).created_at; + const date = ts ? new Date(ts) : new Date(); + const now = new Date(); + const isToday = date.getFullYear() === now.getFullYear() && date.getMonth() === now.getMonth() && date.getDate() === now.getDate(); + const hh = String(date.getHours()).padStart(2, "0"); + const mm = String(date.getMinutes()).padStart(2, "0"); + if (isToday) return `${hh}:${mm}`; + const mo = String(date.getMonth() + 1).padStart(2, "0"); + const dd = String(date.getDate()).padStart(2, "0"); + return `${mo}/${dd} ${hh}:${mm}`; + })()} + + )} + {/* Stopped indicator: shown when AI produced no content and generation was interrupted */} {!plainTextContent && !hasThinking && !hasToolCalls && !thread.isLoading && isLastAi && (

回复已停止

diff --git a/langgraph/src/components/ConfigPanel.tsx b/langgraph/src/components/ConfigPanel.tsx index 706c1d1..ee8eec4 100644 --- a/langgraph/src/components/ConfigPanel.tsx +++ b/langgraph/src/components/ConfigPanel.tsx @@ -43,7 +43,7 @@ export function ConfigPanel({ "inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors", modelMode === value ? "bg-primary text-primary-foreground" - : "bg-muted text-muted-foreground hover:bg-accent hover:text-foreground", + : "bg-muted text-muted-foreground hover:bg-accent/80 hover:text-foreground hover:ring-1 hover:ring-border", )} > @@ -65,7 +65,7 @@ export function ConfigPanel({ "inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors", activeTools.size === 0 ? "bg-primary text-primary-foreground" - : "bg-muted text-muted-foreground hover:bg-accent hover:text-foreground", + : "bg-muted text-muted-foreground hover:bg-accent/80 hover:text-foreground hover:ring-1 hover:ring-border", )} > @@ -83,7 +83,7 @@ export function ConfigPanel({ "inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors", isOn ? "bg-primary text-primary-foreground" - : "bg-muted text-muted-foreground hover:bg-accent hover:text-foreground", + : "bg-muted text-muted-foreground hover:bg-accent/80 hover:text-foreground hover:ring-1 hover:ring-border", )} >