mirror of
https://github.com/ArthurDanjou/artchat.git
synced 2026-01-29 03:57:54 +01:00
feat: enhance chat message handling; add createdAt timestamp to messages and implement dynamic component rendering for various chat types
This commit is contained in:
@@ -32,6 +32,7 @@ export const useChatStore = defineStore('chat', () => {
|
||||
sender,
|
||||
state: ChatState.LOADING,
|
||||
fetchStates: [...fetchStates, ChatFetchState.DONE],
|
||||
createdAt: new Date(),
|
||||
}
|
||||
|
||||
messages.value.push(message)
|
||||
@@ -44,6 +45,7 @@ export const useChatStore = defineStore('chat', () => {
|
||||
sender,
|
||||
state: ChatState.SENT,
|
||||
fetchStates: [ChatFetchState.DONE],
|
||||
createdAt: new Date(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user