chore: 优化部份实现
This commit is contained in:
@@ -4,15 +4,6 @@ export function useChat() {
|
||||
const historyStore = useHistoryStore()
|
||||
|
||||
function addChat(message: string, args?: { reversal?: boolean; error?: boolean; options?: Chat.ChatOptions }) {
|
||||
if (historyStore.historyChat.length === 0) {
|
||||
historyStore.addHistory({
|
||||
title: message,
|
||||
isEdit: false,
|
||||
data: [],
|
||||
})
|
||||
historyStore.chooseHistory(historyStore.historyChat.length - 1)
|
||||
}
|
||||
|
||||
historyStore.addChat({
|
||||
dateTime: new Date().toLocaleString(),
|
||||
message,
|
||||
|
||||
Reference in New Issue
Block a user