继续填充多语言处理

This commit is contained in:
xintaofei
2026-03-07 14:00:29 +08:00
parent a356b813a6
commit 47189318e5
11 changed files with 322 additions and 69 deletions

View File

@@ -1,6 +1,7 @@
"use client"
import { memo, useMemo } from "react"
import { useTranslations } from "next-intl"
import type { LiveMessage } from "@/contexts/acp-connections-context"
import { ContentPartsRenderer } from "@/components/message/content-parts-renderer"
import { adaptLiveMessageFromAcp } from "@/lib/adapters/ai-elements-adapter"
@@ -13,6 +14,7 @@ interface LiveMessageBlockProps {
export const LiveMessageBlock = memo(function LiveMessageBlock({
message,
}: LiveMessageBlockProps) {
const t = useTranslations("Folder.chat.liveMessageBlock")
const hasContent = message.content.length > 0
const adapted = useMemo(() => adaptLiveMessageFromAcp(message), [message])
@@ -24,7 +26,7 @@ export const LiveMessageBlock = memo(function LiveMessageBlock({
) : (
<div
className="flex items-center gap-1.5 text-muted-foreground py-1"
aria-label="Assistant is thinking"
aria-label={t("assistantThinkingAria")}
>
<span className="h-2 w-2 rounded-full bg-primary animate-bounce [animation-delay:-0.3s]" />
<span className="h-2 w-2 rounded-full bg-primary animate-bounce [animation-delay:-0.15s]" />