提交 c2048b7c 编写于 作者: D DebugIsFalse

fix: 历史记录

上级 27350b1e
......@@ -87,10 +87,12 @@ function handleClickItem () {
Layout.handleCloseAside()
}
async function getUserHistory () {
const { data, error } = await useRequest('/v1/chat/completion/list', { server: false })
if (!error.value) {
searchHistory.value = data.value && data.value.data || []
}
const { data } = await useRequest('/v1/chat/completion/list')
searchHistory.value = data.value && data.value.data || []
}
getUserHistory()
onMounted(() => {
nextTick(() => {
getUserHistory()
})
})
</script>
......@@ -202,8 +202,8 @@ const handleMessage = (event) => {
handleFormFetchData(event.data)
}
const handleStopGenerate = () => {
asking.value && aiChatController && aiChatController.abort()
asking.value = false
aiChatController && aiChatController.abort()
Object.assign(askingData.value, {
ansLoading: false,
desLoading: false,
......@@ -211,8 +211,10 @@ const handleStopGenerate = () => {
})
}
const handleError = (event) => {
console.log(222)
handleStopGenerate()
if (event) {
throw event;
}
}
const fetchLinkedQuestion = (query) => {
const { gitPath, id } = state
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册