diff --git a/src/components/business/Chat/hooks/useChat.ts b/src/components/business/Chat/hooks/useChat.ts index 270fe5e..7e7ea5e 100644 --- a/src/components/business/Chat/hooks/useChat.ts +++ b/src/components/business/Chat/hooks/useChat.ts @@ -3,14 +3,21 @@ import { useHistoryStore } from '@/store' export function useChat() { const historyStore = useHistoryStore() - function addChat(message: string, args?: { reversal?: boolean; error?: boolean; options?: Chat.ChatOptions }) { - historyStore.addChat({ - dateTime: new Date().toLocaleString(), - message, - reversal: args?.reversal ?? false, - error: args?.error ?? false, - options: args?.options ?? undefined, - }) + function addChat( + message: string, + args?: { reversal?: boolean; error?: boolean; options?: Chat.ChatOptions }, + uuid?: number | null, + ) { + historyStore.addChat( + { + dateTime: new Date().toLocaleString(), + message, + reversal: args?.reversal ?? false, + error: args?.error ?? false, + options: args?.options ?? undefined, + }, + uuid, + ) } function clearChat() { diff --git a/src/components/business/Chat/index.vue b/src/components/business/Chat/index.vue index c22942a..dfdceaf 100644 --- a/src/components/business/Chat/index.vue +++ b/src/components/business/Chat/index.vue @@ -1,5 +1,5 @@