Commit Graph
15 Commits
Author SHA1 Message Date
lintsinghuaandClaude Opus 4.6 f86a34f038 修复:退出登录不跳转 (#142) 和 batch_size 设置不生效 (#91)
- Account.tsx: handleLogout 和 handleSwitchAccount 改为调用
  AuthContext.logout() 清除认证状态,确保退出后重定向到登录页
- agent_tasks.py: 创建 EmbeddingService 后设置用户配置的 batch_size
- indexer.py: batch_size 默认值从 50 改为 100,与 EmbeddingConfig 一致

Fixes #142, Fixes #91

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:37:43 +08:00
lintsinghuaandClaude Opus 4.5 8198f2f390 fix: 嵌入模型向量维度可配置,解决 Ollama 不同参数规模模型维度不匹配问题
Fixes #123

问题:qwen3-embedding:8b 实际维度 4096,但代码硬编码为 1024(只适用于 0.6b 版本),导致 RAG 系统初始化失败

修改内容:
- OllamaEmbedding: 构造函数添加 dimension 参数,用户配置优先
- EmbeddingService: 支持传递自定义维度到各提供商
- embedding_config.py:
  - 补充 _get_model_dimensions 缺失的模型映射
  - get_current_config 优先使用用户配置的维度
  - test_embedding 支持传递自定义维度
- 前端 EmbeddingConfig: 添加"自定义向量维度"输入框

使用方式:
在"系统配置-嵌入模型"页面,输入自定义向量维度(如 4096)即可覆盖默认值

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 14:42:31 +08:00
ArcueId e06126482c perf(rag): 优化嵌入服务性能并改进批处理大小配置
- 优化本地嵌入服务(Ollama)性能,移除不必要的延迟
- 改进批处理大小配置,使用动态获取替代硬编码
- 保持云端服务的限流逻辑不变
2025-12-28 10:15:58 +08:00
lintsinghua c7632afdab feat: 为文件操作和代码解析添加异步支持
将同步的文件读取、代码解析和分块操作改为异步实现,使用 asyncio.to_thread 将 CPU 密集型操作放到线程池执行,避免阻塞事件循环。主要修改包括:
- 在 TreeSitterParser 和 CodeSplitter 中添加异步解析方法
- 修改 CodeIndexer 使用异步文件读取和分块
- 为 FileReadTool 和 FileSearchTool 添加异步文件读取支持
2025-12-25 17:20:42 +08:00
vinland100 05b3842536 fix: 修正 Tree-sitter C# 解析器的语言标识符命名以消除加载警告 2025-12-25 15:38:00 +08:00
lintsinghua 4d7abae245 feat(embedding): 支持 OpenAI 兼容 API 并增强错误处理
- 更新 OpenAI 提供商描述以支持兼容 API 服务商
- 前端添加兼容 API 使用引导说明
- 后端 QwenEmbedding 添加 API 密钥验证和错误处理
2025-12-19 16:37:39 +08:00
w1_liamby d827ab8b03 [feat] 添加 qwen 嵌入模型提供商 2025-12-19 15:14:39 +08:00
lintsinghua 1a720f7072 build: 更新 tree-sitter 依赖至 tree-sitter-language-pack
替换已弃用的 tree-sitter-languages 为 tree-sitter-language-pack,并升级 tree-sitter 至 0.23.0 以上版本以解决兼容性问题
2025-12-17 14:52:59 +08:00
lintsinghua f71b8da7df feat(embedding): 支持前端配置嵌入模型的API密钥
refactor(agent): 改进任务取消逻辑,确保子Agent被正确取消
- 移除asyncio.shield()以允许取消信号传播
- 增加更频繁的取消状态检查
- 添加日志记录子Agent取消情况

feat(nginx): 添加前端构建产物和nginx配置的挂载

refactor(rag): 优化代码索引器的日志输出和元数据处理
- 添加索引文件数量的调试日志
- 将元数据字段提升到顶级以便检索

fix(parser): 修复AST定义提取中的方法识别问题
- 区分函数和方法定义
- 优化遍历逻辑避免重复匹配
2025-12-16 19:42:44 +08:00
lintsinghua 7efb89d2d2 fix(rag): 修复代码块ID重复问题
在CodeIndexer中添加去重逻辑,确保没有重复ID的代码块被索引
使用完整内容生成hash作为ID,提高唯一性
2025-12-16 18:49:30 +08:00
lintsinghua 96560e6474 feat(RAG): 添加索引任务取消检查并支持目标文件过滤
在索引过程中添加取消检查功能,允许在嵌入批处理时取消任务
支持通过target_files参数限制索引范围
2025-12-16 18:46:34 +08:00
lintsinghua e0689245de feat(RAG): 添加嵌入进度显示和取消支持
为RAG索引过程添加嵌入进度回调功能,支持实时显示嵌入向量生成进度
新增取消检查机制,允许用户取消长时间运行的嵌入操作
更新前端依赖版本以保持兼容性
2025-12-16 18:41:30 +08:00
lintsinghua e2109647bf feat(agent): 增强任务执行流程和实时日志反馈
- 在任务执行流程中添加实时事件反馈,包括克隆进度和索引进度
- 实现 RAG v2.0 智能索引功能,支持模型变更检测和增量更新
- 改进文件工具兼容性,支持 path 参数作为 directory 别名
- 扩展前端事件处理逻辑,支持更多事件类型显示
- 修复 tree-sitter 版本兼容性问题
2025-12-16 16:56:09 +08:00
lintsinghua 17889dceee feat(retriever): 添加自动适配不同 embedding 配置的功能
支持自动检测 collection 的 embedding 配置并动态创建对应的 embedding 服务
新增从向量维度推断配置的功能,兼容旧的 collection
2025-12-16 15:28:03 +08:00
lintsinghua 9bc114af1f feat(agent): implement Agent audit module with LangGraph integration
- Introduce new Agent audit functionality for autonomous code security analysis and vulnerability verification.
- Add API endpoints for managing Agent tasks and configurations.
- Implement UI components for Agent mode selection and embedding model configuration.
- Enhance the overall architecture with a focus on RAG (Retrieval-Augmented Generation) for improved code semantic search.
- Create a sandbox environment for secure execution of vulnerability tests.
- Update documentation to include details on the new Agent audit features and usage instructions.
2025-12-11 19:09:10 +08:00