From da841548daebeed0c507da2f93c6587f5b5efe53 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sun, 8 Nov 2026 20:43:20 +0900 Subject: [PATCH] refac --- src/lib/stores/chatViewStates.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() },