Commit Graph
16 Commits
Author SHA1 Message Date
hy f7aa26ba01 Archive improve-human-test-eval 2026-03-12 17:48:11 +08:00
huangyuan fa228c680b new workspace 2026-03-10 18:31:29 +08:00
hy 179a631b9a feat: implement human task execution and context management nodes
- Added `toolExecNode.ts` for executing tools in human tasks, handling tool responses, and managing task states.
- Introduced `types.ts` to define types related to human run states and phases.
- Created `contextDispatchNode.ts` for dispatching context enrichment tasks.
- Developed `contextGateNode.ts` to manage context decision-making and transitions.
- Implemented `dispatchNode.ts` for handling task dispatching and state updates.
- Added `finalizeNode.ts` to generate final answers based on task outcomes.
- Created helper functions in `helpers.ts` for managing context evidence and task planning.
- Implemented `planNode.ts` for generating task plans based on user input and context.
- Updated `types.ts` to include new types for human tasks and context management.
- Refactored utility functions in `aiCapabilityUtils.ts` to streamline task handling.
- Enhanced `ChatPage.tsx` to support new event types and display human step tracking.
- Updated shared types to include new event stages and task definitions.
2026-03-03 17:20:17 +08:00
hy 3a747294a1 feat: add terminal execution capability with boundary checks and risk classification
- Implemented terminal command execution with safety checks and approval gating.
- Added tools for running commands and marking completion.
- Introduced policies for workspace boundary checks and command risk classification.
- Enhanced artifact tracking for file operations resulting from terminal commands.
- Created utility functions for managing task execution and event emissions.
- Developed a local knowledge base retrieval system with hybrid, vector, and FTS search capabilities.
2026-03-02 15:07:31 +08:00
hy 9d7cfed144 feat: implement terminal execution capabilities with safety checks and artifact management
- Added terminalExec.ts for running shell commands with timeout and output management.
- Introduced terminalPolicy.ts for workspace boundary checks and command risk classification.
- Developed terminalTools.ts to handle command execution, artifact detection, and event emission.
- Removed outdated test files related to previous implementations.
- Added utility functions for bounded loops and file artifact event emission.
2026-03-02 14:23:57 +08:00
hy 34c9fa3155 Refactor AI graph processing and utility functions
- Introduced utility functions for handling carrier content and tool calls in `graph.ts`.
- Simplified task mapping logic by creating a dedicated `toPlannedTask` function.
- Enhanced error handling in `ModelService` and `EmbeddingService` for better clarity.
- Added new utility functions in `decoder.ts` for type-safe conversions.
- Improved document handling in `DocumentsStore` with better type checks and normalization.
- Updated preload API to streamline communication between renderer and main process.
- Enhanced type definitions for better clarity and maintainability in global types.
- Refactored components to improve type safety and reduce TypeScript errors.
2026-02-28 17:57:39 +08:00
hy 537915d067 refactor: remove deprecated writing workflow types and methods
- Removed WritingFolderRecord, WritingDocumentRecord, and related methods from global types.
- Cleaned up legacy writing workflow types and events from shared types.
- Updated serialization utility to improve type safety for IPC results.
- Changed input and output types in AiRunEvent to use 'unknown' for better type handling.
2026-02-28 17:09:35 +08:00
hy 8bcbe7980e feat: add terminal execution capabilities and approval workflow
- Implemented a new terminal execution service in `terminalExec.ts` to run shell commands with configurable options.
- Removed deprecated writing tools from `writingTools.ts`.
- Updated AI task types to include 'terminal_exec' and 'local_kb_retrieval'.
- Enhanced AI run context and state management to support document selection and workspace configuration.
- Added approval request and decision types to the AI run event system.
- Modified the ChatPage component to handle terminal execution events and display results.
- Introduced UI elements for selecting documents and specifying workspace paths.
2026-02-28 15:42:52 +08:00
hy 3d2b30c713 feat(ai-runtime): 引入基于LangGraph的AI运行时以重构聊天模式
- 新增LangGraph状态机,包含host、retrieval、writer和answer四个节点,支持多步骤任务执行
- 实现AI运行事件流,通过IPC向渲染进程发送计划、任务和工具调用等执行详情
- 添加会话记忆存储,支持加载最近对话轮次和生成紧凑的会话摘要
- 提供检索工具集(混合/向量/全文搜索)和写作工具集(创建/更新/搜索替换文档)
- 弃用旧版写作工作流,默认禁用其IPC端点并引导使用新运行时
- 更新渲染进程类型定义和预加载API,支持新的AI运行事件订阅
- 在写作工作空间页面添加通过URL参数直接打开文档的支持
- 统一使用@langchain/openai创建LLM客户端,将模型调用移至主进程
2026-02-27 19:12:50 +08:00
hy 3b86747970 feat(web-import): 支持从网页 URL 导入内容并集成到搜索
新增网页 URL 导入能力,使用 CheerioWebBaseLoader 抓取网页正文,并通过 include/exclude selectors 过滤噪声内容。网页内容进入与文件一致的分段、嵌入和索引管线,使其可参与混合搜索。在 UI 中区分网页与文件类型,为网页结果提供打开链接功能,并支持按来源类型过滤搜索结果。
2026-02-10 14:44:20 +08:00
hy a16b25b14d feat: 添加 IPC 数据序列化工具函数
在渲染进程和主进程之间传输数据时,确保 metadata 字段的正确序列化和反序列化。
新增 normalizeForIpc 函数用于主进程发送前序列化 metadata 并移除 vector 字段,
新增 parseIpcResult 函数用于渲染进程接收后解析 metadata 字符串为对象。
更新相关页面和 IPC 处理器以使用新的序列化函数,并调整类型定义以支持序列化格式。
2026-01-23 10:24:03 +08:00
hy 6c8536af88 feat(文档管理): 实现文档存储和关联功能
- 添加DOCUMENTS_PATH常量用于文档存储路径
- 在store.d.ts中新增DocumentRecord和DocumentSourceType类型
- 修改ChunkInput和SearchResult接口以关联文档ID和名称
- 在文件处理流程中添加文档存储和记录功能
- 移除HybridSearch类并简化全文搜索逻辑
- 在UnifiedStore中添加文档表和相关操作方法
2026-01-08 16:50:53 +08:00
hy c853432c5f feat(分词): 添加中文停用词过滤并优化分词逻辑
在中文分词处理中增加停用词过滤功能,提升文本处理质量
同时将默认分词模式从精确模式改为搜索引擎模式
2026-01-07 17:28:48 +08:00
hy 3ae6e2cf5c refactor: Rename VECTOR_DB_PATH to LANCE_DB_PATH and remove FULL_TEXT_DB_PATH. 2025-12-26 11:12:17 +08:00
hy 2b40607812 feat(数据管道): 实现文档分片和向量存储的双重处理机制
添加大块和小块文档分片功能,优化向量存储和全文搜索的数据结构
重构文件加载和分片逻辑,使用常量配置分片参数
更新向量存储和全文搜索服务以支持新的数据结构
2025-12-23 18:52:42 +08:00
hy 5eed07ee7a feat: 实现本地文档搜索功能
添加文档上传、向量嵌入和混合搜索功能
- 新增文件加载、文本分割和向量嵌入服务
- 实现基于LanceDB的向量存储和FlexSearch的关键词搜索
- 添加混合搜索算法结合向量和关键词结果
- 提供IPC接口供渲染进程调用
- 更新前端界面支持文档上传和搜索展示
2025-12-23 12:51:54 +08:00