feat: 对话增加历史记录

This commit is contained in:
wangdan-fit2cloud 2024-05-17 14:27:51 +08:00
parent e8f1bd9991
commit 3cb273faea

View File

@ -72,7 +72,7 @@ const paginationConfig = reactive({
})
const currentRecordList = ref<any>([])
const currentChatId = ref('0') // Id '0'
const currentChatId = ref('new') // Id 'new'
function getAccessToken(token: string) {
application
@ -128,7 +128,11 @@ function getChatRecord() {
.asyncChatRecordLog(applicationDetail.value.id, currentChatId.value, paginationConfig, loading)
.then((res: any) => {
paginationConfig.total = res.data.total
currentRecordList.value = [...currentRecordList.value, ...res.data.records]
const list = res.data.records
list.map((v: any) => {
v['write_ed'] = true
})
currentRecordList.value = [...currentRecordList.value, ...list]
})
}
const clickListHandle = (item: any) => {