Skip to content

The agent that grows with you

fix(desktop): mint an edited queued entry's id with randomUuid

Tekniume7a3d4af4dd4
diff --git a/apps/desktop/src/store/composer-queue.ts b/apps/desktop/src/store/composer-queue.ts
index 51f39e3f137..9d129b3ef33 100644
--- a/apps/desktop/src/store/composer-queue.ts
+++ b/apps/desktop/src/store/composer-queue.ts
@@ -1,4 +1,4 @@
-import { SLASH_COMMAND_RE } from '@hermes/shared'
+import { randomUuid, SLASH_COMMAND_RE } from '@hermes/shared'
import { atom } from 'nanostores'
import {
@@ -340,7 +340,7 @@ const attachmentKeys = (attachments: ComposerAttachment[]) => JSON.stringify(att
// An edited local entry is a new message: it drains under a fresh submission id (see `submissionId`).
const editedSubmission = (entry: QueuedPromptEntry, text: string, attachments: ComposerAttachment[]) =>
!entry.serverStatus && (entry.text !== text || attachmentKeys(entry.attachments) !== attachmentKeys(attachments))
- ? { submissionId: crypto.randomUUID() }
+ ? { submissionId: randomUuid() }
: {}
export const getQueuedPrompts = (key: string | null | undefined): QueuedPromptEntry[] => {