clean: use updated data structure
This commit is contained in:
@@ -76,9 +76,7 @@ export interface EditorAgentAttachmentRef {
|
||||
}
|
||||
|
||||
export function createEditorAgentAttachmentRef(
|
||||
input: Omit<EditorAgentAttachmentRef, 'label'> & {
|
||||
label?: string | null;
|
||||
},
|
||||
input: EditorAgentAttachmentRef,
|
||||
fallbackLabel: string = input.referenceId,
|
||||
) {
|
||||
return {
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
'粘贴图片',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user