chore: version 2.8.3 (#175)

* feat: 保留已存在的内容直到手动操作

* feat: 支持复制文本

* chore: version 2.8.3
This commit is contained in:
Redon
2023-03-01 13:20:31 +08:00
committed by GitHub
parent 94e23bb916
commit 42e320fe35
12 changed files with 175 additions and 32 deletions

View File

@@ -3,6 +3,10 @@ import { useChatStore } from '@/store'
export function useChat() {
const chatStore = useChatStore()
const getChatByUuidAndIndex = (uuid: number, index: number) => {
return chatStore.getChatByUuidAndIndex(uuid, index)
}
const addChat = (uuid: number, chat: Chat.Chat) => {
chatStore.addChatByUuid(uuid, chat)
}
@@ -11,8 +15,14 @@ export function useChat() {
chatStore.updateChatByUuid(uuid, index, chat)
}
const updateChatSome = (uuid: number, index: number, chat: Partial<Chat.Chat>) => {
chatStore.updateChatSomeByUuid(uuid, index, chat)
}
return {
addChat,
updateChat,
updateChatSome,
getChatByUuidAndIndex,
}
}