diff --git a/src/lib/stores/chatViewStates.ts b/src/lib/stores/chatViewStates.ts index 397e5b4e43..1f7186910e 100644 --- a/src/lib/stores/chatViewStates.ts +++ b/src/lib/stores/chatViewStates.ts @@ -1,4 +1,5 @@ import { browser } from '$app/environment'; +import { v4 as uuidv4 } from 'uuid'; import { writable } from 'svelte/store'; import { getChatView, updateChatView } from '$lib/apis/chats/view'; import { terminalRequest, type TerminalConnection } from '$lib/apis/terminal'; @@ -83,7 +84,7 @@ export function chatViewEntry(userId: string, chatId: string | null, temporary = const existing = chatId && entries.get(key(userId, chatId)); if (existing) return existing; const entry: Entry = { - instanceId: crypto.randomUUID(), + instanceId: uuidv4(), userId, chatId, state: { schemaVersion: 1, selectedTerminalId: null, panels: emptyTabs() },