feat:替换 Dify 为自建 RAG去实现

1、修复了若干无权限时的失败提示语
2、新增了一个生成后续建议问题的功能
3、重构了知识问答部分的权限管理模块
4、修复了若干渲染不恰当的样式渲染
This commit is contained in:
PingChuan
2026-04-10 16:20:32 +08:00
parent f525707358
commit 5bee9288b9
31 changed files with 407 additions and 304 deletions
+5
View File
@@ -159,6 +159,11 @@ export const difyClient = {
return { result: 'success' };
} catch (error: any) {
// 权限不足等明确错误需要抛出,不能吞掉
if (error.message?.includes('403') || error.message?.includes('401')) {
throw error;
}
// 网络超时等不确定错误才降级为成功(Dify 可能已执行删除)
console.warn('[Dify Chat] 删除会话请求失败,但可能已成功删除:', error.message);
return { result: 'success' };
}