feat: AI对话

This commit is contained in:
zhangyh
2025-10-28 11:33:20 +08:00
parent 2a1023aea0
commit 0ce0c41dac
12 changed files with 358 additions and 111 deletions

View File

@@ -67,6 +67,11 @@ service.interceptors.response.use(
* 如通过xmlhttprequest 状态码标识 逻辑可写在下面error中
*/
(response: any) => {
// 如果是llm/streamChat这样的流式接口,不走这样的处理
if (response.config.url.includes('llm/streamChat')) {
return response
}
// 已完成请求的删除请求中数组
removePending(response.config)
// 关闭loading
@@ -81,8 +86,8 @@ service.interceptors.response.use(
message: res.errMsg || res.message,
// type: 'fail',
duration: 5000,
position:'top',
icon:'none'
position: 'top',
icon: 'none'
})
return Promise.reject(new Error('error'))