Commit Graph

75 Commits

Author SHA1 Message Date
wizardchen b2c009e61c feat(security): implement SSRF and path traversal protections in image handling and file downloads
- Added SSRF protection by stripping client-supplied URL and Caption fields from image attachments in the QA request handler.
- Introduced a validation function to ensure Feishu API path parameters contain only safe characters, preventing path traversal attacks.
- Enhanced the WeCom webhook adapter to reject internal/private URLs unless they are on an allowlist, improving security during file downloads.
- Implemented a mechanism to bypass SSRF checks for trusted IM platform API hosts.
2026-03-25 22:08:29 +08:00
Andy Yang 5c31a9123f fix: Adjust temperature validation to allow zero as a valid setting and default only for negative values. 2026-03-20 18:21:39 +08:00
wizardchen 8f1237d64f feat(agent): enhance event emission for final answers and fallback handling
- Updated the AgentEngine to emit final answer events even when the LLM stops without calling the final_answer tool, ensuring the frontend can render responses correctly.
- Added fallback logic in the AgentStreamHandler to emit final answers as fallback events when no answer events are streamed, improving robustness in edge cases.
2026-03-19 18:20:09 +08:00
wizardchen b6cbc412ba Merge remote-tracking branch 'wizard/main' 2026-03-16 11:13:53 +08:00
wizardchen c27740f739 feat: enhance input field and agent stream display with improved handling and sanitization
- Added blur handling for the textarea in the Input-field component to prevent errors when navigating away from the component.
- Improved the sanitization process in the AgentStreamDisplay component to preserve specific tags during markdown processing, ensuring accurate content display.
- Introduced new methods for handling FAQ-specific post-processing in the knowledge base service, optimizing retrieval and filtering of search results.

These changes enhance user experience by improving input handling and content rendering in the chat interface.
2026-03-16 02:26:47 +08:00
wizardchen 2984b21731 refactor: consolidate QA request handling and improve session service interface
- Introduced a new `QARequest` type to streamline parameters for KnowledgeQA and AgentQA service calls, replacing multiple parameters with a single structured request.
- Updated the `KnowledgeQA` and `AgentQA` methods in the session service interface to accept the new `QARequest` type, enhancing clarity and maintainability.
- Refactored the request parsing logic to utilize the new `buildQARequest` method, improving code organization and reducing redundancy.
- Implemented a new `resolveAgent` method to simplify custom agent resolution logic, enhancing readability and maintainability.

These changes improve the overall structure and usability of the QA request handling, facilitating easier updates and better code organization.
2026-03-16 02:26:47 +08:00
wizardchen 6896c7795d feat: add web search option to AgentQA functionality
- Introduced a new parameter `webSearchEnabled` to the `AgentQA` method, allowing for conditional web search capabilities.
- Updated the session service interface and handler to accommodate the new parameter, enhancing the flexibility of the AgentQA process.
- Adjusted the configuration to ensure that web search functionality can be toggled based on the provided input.

These changes improve the AgentQA feature by enabling users to control web search integration, enhancing the overall user experience.
2026-03-16 02:26:47 +08:00
wizardchen de0e93d9bb feat: add clear session messages functionality
- Implemented a new API endpoint to clear all messages in a session, enhancing session management capabilities.
- Updated the frontend to include a clear messages option in the session menu, allowing users to easily remove chat history.
- Added localization support for the new feature in English, Korean, Russian, and Chinese, improving accessibility for a broader audience.
- Enhanced the chat view to handle session message clearing events, ensuring a responsive user experience.

These changes significantly improve the user experience by providing a straightforward method to manage session messages effectively.
2026-03-16 02:26:47 +08:00
wizardchen 421c83452c feat: enhance multimodal image processing and session management
- Updated configuration to support three tasks in the assistant's prompt: rewriting questions, classifying intent for knowledge base retrieval, and analyzing attached images.
- Implemented backend functionality to update image descriptions in user messages, ensuring that image context is preserved across conversation history.
- Modified session handling to return complete session data after updates, improving the accuracy of session information provided to users.
- Enhanced the chat pipeline to include detailed image descriptions and manage image captions effectively, enriching user interactions with visual content.

These improvements significantly enhance the application's multimodal capabilities, providing a more robust and user-friendly experience when handling image-based queries.
2026-03-16 02:26:47 +08:00
wizardchen 5fe1ccd4f9 feat: enhance multimodal support and image handling
- Updated configuration to improve handling of multimodal queries, including clearer guidelines for when to use [NO_SEARCH] in responses.
- Enhanced the user interface to include dedicated sections for multimodal configuration, allowing users to manage image uploads and related settings more effectively.
- Added localization support for new multimodal features in both English and Chinese, improving accessibility for a broader audience.
- Implemented backend changes to support image analysis and extraction of OCR text, enriching the interaction experience for users.

These enhancements significantly improve the application's capability to process and respond to multimodal queries, fostering a more interactive and user-friendly environment.
2026-03-16 02:26:47 +08:00
wizardchen 991bd29a14 feat: implement image upload and multimodal support
- Added functionality for image uploads in chat, allowing users to attach images for multimodal Q&A.
- Enhanced the input field to handle image selection via drag-and-drop and paste, with validation for file types and sizes.
- Updated the backend to process images alongside text queries, including support for image analysis.
- Introduced new UI components for image previews and management, improving user interaction with uploaded content.
- Added localization strings for image upload features and error messages, enhancing accessibility for users in multiple languages.

These changes significantly improve the chat experience by enabling users to incorporate images into their queries, facilitating richer interactions and responses.
2026-03-16 02:26:47 +08:00
wizardchen 890dfb4bb3 feat: add clear session messages functionality
- Implemented a new API endpoint to clear all messages in a session, enhancing session management capabilities.
- Updated the frontend to include a clear messages option in the session menu, allowing users to easily remove chat history.
- Added localization support for the new feature in English, Korean, Russian, and Chinese, improving accessibility for a broader audience.
- Enhanced the chat view to handle session message clearing events, ensuring a responsive user experience.

These changes significantly improve the user experience by providing a straightforward method to manage session messages effectively.
2026-03-12 21:47:12 +08:00
wizardchen 4eed96f901 feat: enhance multimodal image processing and session management
- Updated configuration to support three tasks in the assistant's prompt: rewriting questions, classifying intent for knowledge base retrieval, and analyzing attached images.
- Implemented backend functionality to update image descriptions in user messages, ensuring that image context is preserved across conversation history.
- Modified session handling to return complete session data after updates, improving the accuracy of session information provided to users.
- Enhanced the chat pipeline to include detailed image descriptions and manage image captions effectively, enriching user interactions with visual content.

These improvements significantly enhance the application's multimodal capabilities, providing a more robust and user-friendly experience when handling image-based queries.
2026-03-12 13:17:47 +08:00
wizardchen bc2cb96d70 feat: enhance multimodal support and image handling
- Updated configuration to improve handling of multimodal queries, including clearer guidelines for when to use [NO_SEARCH] in responses.
- Enhanced the user interface to include dedicated sections for multimodal configuration, allowing users to manage image uploads and related settings more effectively.
- Added localization support for new multimodal features in both English and Chinese, improving accessibility for a broader audience.
- Implemented backend changes to support image analysis and extraction of OCR text, enriching the interaction experience for users.

These enhancements significantly improve the application's capability to process and respond to multimodal queries, fostering a more interactive and user-friendly environment.
2026-03-12 10:32:26 +08:00
wizardchen 3a197f3333 feat: implement image upload and multimodal support
- Added functionality for image uploads in chat, allowing users to attach images for multimodal Q&A.
- Enhanced the input field to handle image selection via drag-and-drop and paste, with validation for file types and sizes.
- Updated the backend to process images alongside text queries, including support for image analysis.
- Introduced new UI components for image previews and management, improving user interaction with uploaded content.
- Added localization strings for image upload features and error messages, enhancing accessibility for users in multiple languages.

These changes significantly improve the chat experience by enabling users to incorporate images into their queries, facilitating richer interactions and responses.
2026-03-12 10:32:26 +08:00
wizardchen 1fb2bedd2b feat: implement chat history and retrieval settings
- Added new API endpoints for managing chat history configuration and retrieval settings, allowing tenants to enable message indexing and configure search parameters.
- Introduced new Vue components for ChatHistorySettings and RetrievalSettings, providing a user-friendly interface for managing these configurations.
- Updated localization files to include new settings descriptions and labels in multiple languages.
- Enhanced the KnowledgeSearch view to support searching across both knowledge bases and chat history, improving the overall search functionality.

These changes significantly enhance the application's capabilities in managing and retrieving chat history, contributing to a more robust user experience.
2026-03-09 11:46:56 +08:00
wizardchen a4b255a456 feat: implement final_answer tool and enhance agent duration tracking
- Introduced the final_answer tool to ensure agents submit their complete responses as the last action, improving response accuracy and consistency.
- Updated the agent engine to log detailed information about tool calls and responses, including the total duration of agent execution.
- Enhanced the chat message model to include agent_duration_ms, tracking the total execution time from query start to answer delivery.
- Implemented JSON field extraction for streaming responses, allowing for more efficient handling of tool call outputs.

These changes significantly improve the agent's response handling and ensure that final answers are consistently delivered, enhancing overall user experience.
2026-03-09 11:46:56 +08:00
wizardchen 44f38ca6c3 feat: add fallback response handling and UI indicators
- Introduced a new `is_fallback` property to track when responses are generated without knowledge base matches.
- Updated the chat components to display fallback hints and indicators in the UI, enhancing user awareness of fallback responses.
- Added translations for fallback hints in multiple languages, improving accessibility for diverse users.
- Modified backend logic to emit fallback status in response events, ensuring consistent handling across the application.

These changes improve the user experience by providing clear feedback on fallback responses, enhancing the overall interaction with the chat system.
2026-03-05 18:14:14 +08:00
wizardchen 284d6c623e feat: add deleteAllSessions functionality and update batch delete logic
- Introduced a new API function `deleteAllSessions` to allow deletion of all sessions for a tenant.
- Updated the `BatchManageDialog` component to support a confirmation dialog for deleting all sessions.
- Enhanced the menu component to reflect the new delete all functionality with appropriate confirmation messages.
- Added internationalization support for the new delete all confirmation message in multiple languages.

These changes improve session management by providing users with the ability to delete all sessions at once, enhancing the overall user experience.
2026-03-02 21:21:49 +08:00
wizardchen 4a9977b11f feat: enhance document loading and state management in doc-content component
- Introduced a loading state (`loadingChunks`) to manage document chunk loading more effectively.
- Updated the scroll handling logic to prevent multiple requests while loading chunks.
- Adjusted the pagination logic to ensure correct page increments based on the total document count.

This update improves the user experience by ensuring smoother document loading and better state management during scrolling interactions.
2026-03-02 21:21:49 +08:00
wizardchen 397689d2f3 feat: introduce WeKnora Lite edition with lightweight configuration and deployment
- Added a new `.env.lite.example` file for the Lite version, providing a minimal configuration template.
- Updated `.env.example` to remove deprecated variables and include new Docreader settings.
- Enhanced Docker configurations to support the Lite version, including a new Dockerfile for the Docreader service.
- Introduced a Makefile target for building and running the Lite version, along with packaging capabilities.
- Created GitHub workflows for building and releasing Lite binaries, including Homebrew formula support.
- Implemented a new service file for managing the Lite version as a system service.

This update enables a streamlined, single-binary deployment of WeKnora, reducing external dependencies and simplifying setup.
2026-03-02 21:21:49 +08:00
joeyczheng 12baa885d2 feat: implement preview of user level memory graph
Signed-off-by: joeyczheng <joeyczheng@tencent.com>
2026-02-25 14:29:54 +08:00
AndyYang 172bf797ee feat(chat): add batch management for conversations 2026-02-25 14:23:05 +08:00
wizardchen 03005d71fa refactor(session): streamline tenant context handling for async operations
- Updated session title generation and message completion to utilize the session's tenant ID directly, ensuring correct context is used in background operations.
- Removed unnecessary context value extraction and background context creation, simplifying the code and improving clarity.
- Enhanced the handling of stop events and message updates to consistently apply the session's tenant ID, improving the accuracy of operations in shared agent scenarios.

This update improves the reliability of async operations by ensuring the correct tenant context is consistently applied.
2026-02-09 11:40:25 +08:00
wizardchen dfaf862bc0 feat(agent): enhance agent sharing and selection features
- Updated the AgentSelector component to improve agent selection logic, ensuring accurate representation of selected agents.
- Introduced new AgentShareSettings component for managing agent sharing with organizations, including UI for selecting organizations and displaying shared agents.
- Enhanced API interactions for sharing agents, including new methods for listing and managing agent shares.
- Improved localization support for agent sharing features across multiple languages.
- Updated various components to reflect changes in agent capabilities and sharing status, enhancing user experience and clarity.

This update strengthens the agent management features, providing users with better tools for sharing and selecting agents within organizations.
2026-02-09 11:40:25 +08:00
wizardchen 4158773849 feat: add organization management features
- Introduced a new API for organization management, including creation, updating, and deletion of organizations.
- Implemented organization sharing functionality for knowledge bases, allowing users to share knowledge bases with specific organizations and set permissions.
- Added UI components for organization selection and sharing dialogs.
- Enhanced existing components to support organization-related features, including shared knowledge base handling and organization role management.

This update enhances collaboration capabilities within the application by allowing users to manage and share knowledge bases across different organizations.
2026-02-09 11:40:25 +08:00
wizardchen aa4af5365e feat: add thinking mode support for agents 2026-01-20 18:19:44 +08:00
wizardchen 879e582041 fix: 修正迁移脚本中的表名拼写错误 2026-01-15 14:33:43 +08:00
wizardchen 884153aeb8 feat: 增强模型选择和错误处理机制
优化模型ID传递逻辑,支持请求级别的模型覆盖;完善流式响应的错误处理
2025-12-31 15:36:20 +08:00
wizardchen 7cf5dfff6a fix: 修复标签创建重复和流式响应解析问题
修复标签创建时未检查重复名称的问题,增加冲突错误返回。
优化流式响应中对引用数据的处理,支持序列化后的数据结构解析。
2025-12-31 15:36:20 +08:00
wizardchen 72a3cbb0ba feat: 增加流式响应类型和工具调用支持
新增 LLMToolCall 和 FunctionCall 结构体支持工具调用,扩展 ResponseType 枚举添加多种响应类型,优化 StreamResponse 结构体增加会话和工具调用字段,并改进引用事件处理逻辑。
2025-12-31 15:36:20 +08:00
wizardchen c5228acbab refactor: 简化会话创建请求结构
移除会话策略和代理配置相关字段,仅保留标题和描述。会话现在作为独立的对话容器,配置由自定义代理在查询时动态提供。
2025-12-31 15:36:20 +08:00
wizardchen d954ba22af refactor: 转换 knowledgeRefs 为 References 类型 2025-12-31 15:36:20 +08:00
wizardchen 5ee5f5b4e4 refactor: 重构SSE流设置以支持标题生成选项 2025-12-31 15:36:20 +08:00
wizardchen b0a9952785 feat: 添加禁用自动标题生成的选项 2025-12-31 15:36:20 +08:00
wizardchen 6c8e261a5f feat: 支持知识库选择模式和标题生成模型配置
- 移除对rerankModel的强制检查,支持无知识库场景
- 优化知识库解析逻辑,优先处理用户明确指定的知识库
2025-12-29 14:35:13 +08:00
wizardchen 6bc19ab082 feat: 统一系统提示词并优化智能体选择器界面
- 将系统提示词从分离的网络搜索开/关状态合并为统一提示词,使用 {{web_search_status}} 占位符动态控制行为
- 重构智能体选择器,从简单tooltip升级为内容丰富的popup,显示智能体详细信息、类型和能力
- 新增FAQ优先策略配置,支持FAQ答案优先于普通文档
- 优化知识库选择逻辑,智能体切换时自动同步配置的知识库
- 更新相关接口类型定义和国际化文本
2025-12-28 21:46:42 +08:00
wizardchen 0ca947981a refactor: 调整智能体配置,增强智能体选择与状态管理 2025-12-26 21:31:02 +08:00
wizardchen abfe87eaed feat: 重构提示词模板系统,新增多场景模板配置支持;优化智能体知识库选择模式,支持全部/指定/禁用三种模式 2025-12-25 18:22:36 +08:00
wizardchen dc1ab5b81d Merge branch 'master' into custom_agent 2025-12-24 15:53:04 +08:00
wizardchen e45b82e9be feat: 增强知识库搜索功能,支持多知识库和指定文件ID搜索;优化SearchKnowledgeRequest结构,向后兼容单知识库ID参数 2025-12-24 15:46:16 +08:00
wizardchen d0c5c4f6b0 feat: 新增智能体功能模块,支持自定义智能体创建、配置和选择 2025-12-24 10:34:41 +08:00
wizardchen ac21f81dda feat: 新增API Key认证支持,优化Swagger文档安全配置 2025-12-22 15:01:09 +08:00
wizardchen 58ae0d8350 feat: 支持在消息流中展示@的知识库和文件 2025-12-22 13:11:31 +08:00
wizardchen 3c83cf9873 feat: 增强知识库和搜索功能的逻辑 2025-12-22 13:11:31 +08:00
wizardchen de1ffa7f7c feat: 支持输入框内选择知识库和文件,优化选择交互体验 2025-12-22 13:11:31 +08:00
wizardchen a7df6900eb feat: 完善Swagger API文档生成功能 2025-12-17 22:04:18 +08:00
wizardchen 93af4460d6 refactor: Remove agent_test command-line tool and associated files to streamline project structure and eliminate unused components 2025-12-01 17:24:57 +08:00
wizardchen eb8bfddfd1 refactor: Update function signatures across multiple files to improve readability by adding context parameters and enhancing code structure 2025-11-28 16:17:52 +08:00
wizardchen c222993777 refactor: Enhance AgentQARequest structure with additional fields and improve session handling methods for clarity and functionality 2025-11-27 17:56:53 +08:00