fix(P2): chip hover对比度 + 统一复制按钮 + 统一时间戳
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 22s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 49s

This commit is contained in:
gongzhiyong
2026-04-15 02:49:54 +08:00
parent 96aafcebac
commit 1c82092735
2 changed files with 23 additions and 5 deletions
+20 -2
View File
@@ -332,9 +332,9 @@ export function ChatMessages({
/>
)}
{(plainTextContent || hasThinking) && !hasToolCalls && (
{(plainTextContent || hasThinking) && (
<div className="group relative max-w-[85%] rounded-2xl rounded-bl-sm bg-muted text-foreground px-4 py-2.5 text-sm">
<MessageBubble content={bubbleContent} role="ai" isStreaming={thread.isLoading && isLastAi} />
<MessageBubble content={bubbleContent} role="ai" isStreaming={thread.isLoading && isLastAi} messageIndex={idx} createdAt={(message as any).created_at} />
{thread.isLoading && isLastAi && (
<span className="typing-cursor" aria-hidden="true" />
)}
@@ -345,6 +345,24 @@ export function ChatMessages({
</div>
)}
{/* Timestamp for tool-only messages (no text bubble) */}
{hasToolCalls && !plainTextContent && !hasThinking && (
<span className="text-xs text-muted-foreground/50 tabular-nums pl-1 select-none">
{(() => {
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}`;
})()}
</span>
)}
{/* Stopped indicator: shown when AI produced no content and generation was interrupted */}
{!plainTextContent && !hasThinking && !hasToolCalls && !thread.isLoading && isLastAi && (
<p className="text-xs text-muted-foreground/70 italic pl-1">回复已停止</p>
+3 -3
View File
@@ -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",
)}
>
<Icon className="size-3" />
@@ -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",
)}
>
<Sparkles className="size-3" />
@@ -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",
)}
>
<Icon className="size-3" />