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, }, - '粘贴图片', ); }