refactor(data): add mock API adapters, id utility, and toast feedback
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { useChatStore } from "@/store/chat"
|
||||
|
||||
export function listChatSessions() {
|
||||
return useChatStore.getState().sessions
|
||||
}
|
||||
|
||||
export function getChatSessionById(sessionId: string) {
|
||||
return useChatStore.getState().sessions.find((session) => session.id === sessionId)
|
||||
}
|
||||
|
||||
export function listChatMessages(sessionId: string) {
|
||||
return useChatStore.getState().messages.filter((message) => message.sessionId === sessionId)
|
||||
}
|
||||
Reference in New Issue
Block a user