diff --git a/frontend/src/components/ai-elements/message.tsx b/frontend/src/components/ai-elements/message.tsx
index 9c36a669..24f8b5e9 100644
--- a/frontend/src/components/ai-elements/message.tsx
+++ b/frontend/src/components/ai-elements/message.tsx
@@ -8,6 +8,7 @@ import {
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
+import { useI18n } from "@/core/i18n/hooks";
import { cn } from "@/lib/utils";
import type { FileUIPart, UIMessage } from "ai";
import {
@@ -333,6 +334,7 @@ export function MessageAttachment({
onRemove,
...props
}: MessageAttachmentProps) {
+ const { t } = useI18n();
const filename = data.filename || "";
const mediaType =
data.mediaType?.startsWith("image/") && data.url ? "image" : "file";
@@ -358,7 +360,7 @@ export function MessageAttachment({
/>
{onRemove && (
)}
>
@@ -386,7 +388,7 @@ export function MessageAttachment({
{onRemove && (
)}
diff --git a/frontend/src/components/ai-elements/prompt-input.tsx b/frontend/src/components/ai-elements/prompt-input.tsx
index dd96c28b..b0a844f3 100644
--- a/frontend/src/components/ai-elements/prompt-input.tsx
+++ b/frontend/src/components/ai-elements/prompt-input.tsx
@@ -290,6 +290,7 @@ export function PromptInputAttachment({
...props
}: PromptInputAttachmentProps) {
const attachments = usePromptInputAttachments();
+ const { t } = useI18n();
const filename = data.filename || "";
@@ -348,7 +349,7 @@ export function PromptInputAttachment({
{/* 删除按钮 - 右上角 */}