refactor(data): add mock API adapters, id utility, and toast feedback

This commit is contained in:
zetaloop
2026-02-22 08:02:48 +08:00
parent 5f25043923
commit 7bcb73f139
25 changed files with 219 additions and 47 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import { create } from "zustand"
import { generateId } from "@/lib/id"
import { mockChatMessages, mockChatSessions, mockUsers } from "@/lib/mock"
import type { ChatMessage, ChatSession, Order } from "@/lib/types"
@@ -76,7 +77,7 @@ export const useChatStore = create<ChatState>((set, get) => ({
const now = new Date().toISOString()
const message: ChatMessage = {
id: `msg-${Date.now()}`,
id: generateId("msg"),
sessionId,
senderId: sender.id,
senderName: sender.name,