feat(ai): 新增智能助手功能模块

feat(backend): 添加ChromaDB向量数据库支持
feat(backend): 实现智能体配置、知识库和文档管理
feat(backend): 重构WebSocket聊天服务为AgentService
feat(frontend): 实现完整的聊天界面组件
feat(frontend): 添加智能体配置、知识库和文档管理页面
fix(user): 修复用户导入时性别转换问题
style(import): 优化导入组件加载状态处理
This commit is contained in:
zhangtao
2026-02-09 01:22:48 +08:00
parent b4dcdfa1ab
commit 45dad1e256
34 changed files with 5803 additions and 1214 deletions
+2 -7
View File
@@ -47,7 +47,7 @@ export interface UseAiActionOptions {
*/
export function useAiAction(options: UseAiActionOptions = {}) {
const route = useRoute();
const { actionHandlers = {}, onRefresh, onAutoSearch, currentRoute = route.path } = options;
const { actionHandlers = {}, onRefresh, onAutoSearch } = options;
// 用于跟踪是否已卸载,防止在卸载后执行回调
let isUnmounted = false;
@@ -150,12 +150,7 @@ export function useAiAction(options: UseAiActionOptions = {}) {
confirmMessage?: string;
} = {}
) {
const {
originalCommand = "",
confirmMode = "manual",
needConfirm = false,
confirmMessage,
} = options;
const { originalCommand = "", needConfirm = false, confirmMessage } = options;
// 如果需要确认,先显示确认对话框
if (needConfirm && confirmMessage) {