Skip to content

The agent that grows with you

fix(desktop): retryAttachmentIds reads a readonly attachment list

Teknium422a0994a396
diff --git a/apps/desktop/src/store/composer-draft-retry.ts b/apps/desktop/src/store/composer-draft-retry.ts
index bd1bd3d18e1..c1402ce8258 100644
--- a/apps/desktop/src/store/composer-draft-retry.ts
+++ b/apps/desktop/src/store/composer-draft-retry.ts
@@ -17,7 +17,7 @@ export interface ComposerDraftRetry {
const RETRY_PREFIX = 'hermes:composer-draft-retry:v1:'
/** The identity half of a draft's attachments (what `matchingDraftRetry` compares). */
-export const retryAttachmentIds = (attachments: ComposerAttachment[]) => attachments.map(a => a.occurrenceId ?? a.id)
+export const retryAttachmentIds = (attachments: readonly ComposerAttachment[]) => attachments.map(a => a.occurrenceId ?? a.id)
export function draftRetry(id: string, text: string, attachments: ComposerAttachment[]): ComposerDraftRetry {
return { id, text, attachmentIds: retryAttachmentIds(attachments) }