前端:
增加会话缓存 后端: 增加触发消息创建事件 增加消息创建事件触发后的处理函数
This commit is contained in:
@@ -24,7 +24,6 @@ export const useChatStore = defineStore('chat', {
|
||||
this.messages = [];
|
||||
//先从浏览器缓存加载一部分消息列表
|
||||
const localHistory = await messagesDb.getPageMessages(sessionId, new Date().toISOString(), this.pageSize);
|
||||
console.log(localHistory)
|
||||
if (localHistory.length > 0) {
|
||||
this.messages = localHistory;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user