提交 93cee9d8 编写于 作者: View Design's avatar View Design

Merge branch 'main' of gitcode.com:git_bot/ai-fe

......@@ -87,10 +87,10 @@ function handleClickItem () {
Layout.handleCloseAside()
}
async function getUserHistory () {
const { data, error } = await useRequest('/v1/chat/completion/list', { server: false })
if (!error.value) {
const { data } = await useRequest('/v1/chat/completion/list')
searchHistory.value = data.value && data.value.data || []
}
}
getUserHistory()
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.
先完成此消息的编辑!
想要评论请 注册