feat: #920 migrate id to nanoid

This commit is contained in:
Yidadaa
2023-07-09 19:37:42 +08:00
parent 98ac7ee277
commit 8e4743e719
14 changed files with 189 additions and 92 deletions

View File

@@ -103,8 +103,7 @@ export function NewChat() {
useCommand({
mask: (id) => {
try {
const intId = parseInt(id);
const mask = maskStore.get(intId) ?? BUILTIN_MASK_STORE.get(intId);
const mask = maskStore.get(id) ?? BUILTIN_MASK_STORE.get(id);
startChat(mask ?? undefined);
} catch {
console.error("[New Chat] failed to create chat from mask id=", id);