返回 DeepSeek-Reasonix
historyAttachmentRefs.ts
根目录 / desktop / frontend / src / lib / historyAttachmentRefs.ts
1 export function appendHistoryAttachmentRefs(
2 text: string,
3 items?: Array<{ digest?: string; name?: string; mime?: string }>,
4 ): string {
5 return text + (items?.map(item => item.digest
6 ? ` @[${item.name || "image"}](attachment:${item.digest})`
7 : "").join("") || "");
8 }
9
9 lines TYPESCRIPT