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

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

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