From d8655e829a6d8b1692f438b7db102ef1ffb8c4c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Wed, 22 Jul 2026 19:02:58 +0800 Subject: [PATCH] clean: use updated data structure --- packages/shared/src/contracts/editorAgent.ts | 4 +--- .../EditorAgentConversation/useConversationAttachments.ts | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/shared/src/contracts/editorAgent.ts b/packages/shared/src/contracts/editorAgent.ts index 63fb8e5a9..849a0c0a2 100644 --- a/packages/shared/src/contracts/editorAgent.ts +++ b/packages/shared/src/contracts/editorAgent.ts @@ -76,9 +76,7 @@ export interface EditorAgentAttachmentRef { } export function createEditorAgentAttachmentRef( - input: Omit & { - label?: string | null; - }, + input: EditorAgentAttachmentRef, fallbackLabel: string = input.referenceId, ) { return { diff --git a/src/components/image-editor/EditorAgentConversation/useConversationAttachments.ts b/src/components/image-editor/EditorAgentConversation/useConversationAttachments.ts index 1e7ad433f..aca7da5a6 100644 --- a/src/components/image-editor/EditorAgentConversation/useConversationAttachments.ts +++ b/src/components/image-editor/EditorAgentConversation/useConversationAttachments.ts @@ -152,11 +152,11 @@ async function createPastedAgentImageAttachment( objectKey: resource.objectKey ?? upload.objectKey, imageSrc: resource.imageSrc, thumbnailSrc: null, - label: resource.label ?? file.name, + // pasted file.name does not give more information + label: resource.label ?? '粘贴图片', width: resource.width, height: resource.height, }, - '粘贴图片', ); }