Commit Graph

381 Commits

Author SHA1 Message Date
wizardchen a1fb794650 refactor: Update frontend build configuration in docker-compose and clean up router
- Changed the build context and Dockerfile path for the frontend service in docker-compose.yml for better organization.
- Removed the knowledge base settings route from the router to streamline navigation and improve code clarity.
2025-11-13 20:32:58 +08:00
wizardchen 9b7128d69d feat: Update docker-compose and Dockerfile for frontend build configuration
- Added build context and Dockerfile specification for the frontend service in docker-compose.yml.
- Refactored Dockerfile.app to ensure non-root user creation is idempotent and streamlined the ownership setup for application directories.
2025-11-13 20:16:15 +08:00
wizardchen ffd5cd2881 feat: Update Dockerfile to support customizable APK mirror
- Added APK_MIRROR_ARG to allow dynamic configuration of the Alpine package mirror.
- Updated the repository URL in the Dockerfile to use the specified APK mirror if provided.
- Enhanced runtime dependencies installation by including additional packages and updating pip before installing uvx.
2025-11-13 20:01:04 +08:00
wizardchen 59f3d22169 feat: Integrate vue-i18n for multilingual support across components
- Added vue-i18n integration to various components for dynamic text translation.
- Updated text placeholders, button labels, and error messages to utilize translation functions.
- Enhanced user experience by providing localized content in the Knowledge Base, chat components, and settings.
- Removed hardcoded strings and replaced them with translation keys for better maintainability and scalability.
2025-11-13 19:34:33 +08:00
wizardchen ae58801baf Merge remote-tracking branch 'github_public/main' 2025-11-13 14:28:41 +08:00
fuyaozong a625eff525 修复bug:脚本检查系统环境时如果操作系统是Darwin,检查内存使用情况输出为空,原因是正则表达式有问题 2025-11-13 10:30:57 +08:00
fuyaozong ef69e2aed5 将各个判断模型是否可用的逻辑和接口/api/v1/initialization/ollama/models/check的逻辑统一:对于没有指定版本的模型,默认添加":latest",避免误判导致反复调用pull模型接口 2025-11-13 10:29:47 +08:00
wizardchen 9f6b903ef2 feat: Integrate LLM-based reranking in KnowledgeSearchTool
- Added optional chat model to KnowledgeSearchTool for enhanced reranking using LLM prompt scoring.
- Updated rerankResults method to prioritize LLM-based reranking over traditional rerank model.
- Implemented new functions for LLM scoring and parsing scores from responses, improving search result relevance.
- Enhanced migration script to handle database versioning and dirty state checks more robustly.
2025-11-13 01:22:08 +08:00
wizardchen 7be09acb9e refactor: Update dropdown functionality and styling in menu component
- Changed the upload action dropdown trigger from click to hover for improved user interaction.
- Removed the popup component and integrated dropdown directly for a cleaner implementation.
- Enhanced CSS styles for the dropdown menu to improve visual presentation and user experience.
2025-11-13 00:04:55 +08:00
wizardchen b9e3099660 refactor: Update styling and functionality in manual knowledge editor and AgentStreamDisplay components
- Refined CSS styles for the manual knowledge editor, enhancing layout and visual consistency.
- Improved button interactions and hover effects for better user experience in the toolbar.
- Enhanced answer event handling in AgentStreamDisplay to support copying answers and improved content retrieval logic.
- Updated logic to display the last thinking event when an answer is empty, ensuring relevant information is presented to users.
- Streamlined button functionalities for adding to knowledge base and copying answers, improving overall usability.
2025-11-12 23:50:13 +08:00
wizardchen 6e6cdb46d5 feat: Enhance tooltip content and styling in AgentStreamDisplay component
- Added a knowledge title display in the tooltip for improved context.
- Updated the rendering logic to escape HTML attributes for safety.
- Introduced a truncation function for document names to enhance readability.
- Adjusted CSS styles for better visual presentation and user experience.
- Improved animation timing for action pending states to create a smoother interaction.
2025-11-12 23:17:36 +08:00
wizardchen 9af704b37f feat: Enhance Markdown rendering and attribute parsing in AgentStreamDisplay component
- Introduced a new function to parse HTML tag attributes, improving the handling of web and knowledge base citations.
- Updated citation rendering logic to utilize the new attribute parsing function, ensuring more robust and flexible attribute extraction.
- Enhanced the regular expressions for web and knowledge base citations to support a broader range of attribute formats, improving overall rendering accuracy.
2025-11-12 22:52:47 +08:00
wizardchen 69f3f30d83 feat: Implement manual knowledge editing and enhance knowledge base features
- Added functionality for manual knowledge entry, allowing users to create and edit Markdown content directly in the browser.
- Introduced new API endpoints for creating and updating manual knowledge entries.
- Enhanced UI components to support the new manual knowledge editor, including integration with existing knowledge base features.
- Updated knowledge retrieval logic to accommodate manual entries, ensuring seamless user experience across knowledge types.
- Improved agent configuration to support custom system prompts, enhancing flexibility in agent responses.
2025-11-12 21:27:56 +08:00
wizardchen a342a0aa14 fix: Remove redundant duration assignment in agent execution loop
- Eliminated duplicate assignment of step.Duration in the executeLoop method to streamline duration tracking.
- Ensured accurate logging of round duration without affecting overall functionality.
2025-11-12 14:27:48 +08:00
wizardchen 38beca1146 feat: Enhance event duration tracking and UI components in chat
- Added duration tracking for agent steps and tool calls, improving event data accuracy.
- Updated AgentStreamDisplay and ToolResultRenderer components to include fallback headers and improved output styling.
- Refactored duration handling in the agent engine and session management to ensure consistent duration reporting.
- Enhanced UI elements for better user experience, including scrollable output areas and improved tooltip visibility.
2025-11-12 14:27:00 +08:00
wizardchen 05154c8d75 feat: Enhance MCP service configuration with stdio transport support
- Added support for stdio transport type in MCP service configuration, allowing command execution via standard input/output.
- Updated MCPService interface to include optional stdio_config and env_vars fields for managing command arguments and environment variables.
- Enhanced frontend components to handle stdio transport, including dynamic form fields for command and arguments.
- Implemented validation logic for stdio configuration in the service update process, ensuring proper handling of required fields.
- Updated backend logic to manage stdio transport connections and ensure proper client lifecycle management.
2025-11-12 11:32:59 +08:00
wizardchen 3c02c4a434 feat: Enhance web search settings initialization and save logic
- Introduced a mechanism to track initialization state, preventing automatic saves during configuration loading.
- Added logic to store initial configuration for comparison, ensuring changes are detected before saving.
- Implemented a function to check for configuration changes, optimizing save operations.
- Updated the saveConfig function to avoid unnecessary saves when no changes are detected.
- Enhanced the loadTenantConfig function to handle default values and initialization more effectively.
2025-11-12 10:55:00 +08:00
wizardchen 8167446b1b feat: Improve tooltip behavior and visibility in AgentStreamDisplay component
- Enhanced the float close logic to double-check mouse position over citations and popups before closing, improving user experience.
- Adjusted the positioning and width of the float popup to minimize mouseout triggers when transitioning to the popup.
- Updated hover event handling to cancel pending close actions, ensuring tooltips remain visible during user interactions.
- Removed deprecated tooltip styles to streamline the component's styling and functionality.
2025-11-12 01:31:56 +08:00
wizardchen a28c0f8b01 feat: Integrate web search configuration and enhance input field functionality
- Added logic to load and manage web search configuration in the InputField component, ensuring proper handling of web search states.
- Implemented user notifications for unconfigured web search settings, guiding users to the appropriate settings page.
- Enhanced the AgentStreamDisplay component to improve tooltip content rendering for knowledge base citations.
- Updated event data structures to include total duration in milliseconds for better precision in agent completion events.
- Refactored citation handling to ensure inline citations are displayed correctly, improving user experience in content rendering.
2025-11-12 01:18:12 +08:00
wizardchen 14d0e663cc feat: Add web search results handling and enhance knowledge retrieval features
- Introduced a new endpoint to fetch chunks by ID, improving access to specific knowledge base entries.
- Updated tool result types to include web search results, enhancing the display capabilities in the chat component.
- Enhanced the AgentStreamDisplay component to support rendering web search results with improved HTML formatting.
- Implemented logic for managing web search result summaries and citations, ensuring a cohesive user experience.
- Refactored session management to accommodate new web search functionalities, improving overall system integration.
2025-11-11 22:26:59 +08:00
wizardchen d2adc38baf feat: Enhance agent service and session management with web search capabilities
- Updated AgentConfig to include web search settings, allowing for dynamic configuration of web search features.
- Refactored AgentService to accept SessionService, enabling better management of session-specific web search states.
- Implemented methods in SessionService for handling temporary knowledge base states related to web search.
- Enhanced PluginSearch to utilize SessionService for managing web search state, improving integration with the overall system.
- Updated container setup to ensure proper dependency injection for the new web search service and session management functionalities.
2025-11-11 14:25:20 +08:00
wizardchen 5e0651c26f feat: Enhance Markdown rendering in chat component
- Enabled single line break support in Markdown rendering by setting breaks option to true.
- Refactored image rendering logic to use a custom renderer, improving image URL validation and safety.
- Updated Markdown processing to utilize the new renderer and options for better content display.
- Ensured proper handling of line breaks in the rendered output for improved readability.
2025-11-11 02:52:30 +08:00
wizardchen 2d9d930824 feat: Enhance MCP tools registration and management with context support
- Updated RegisterMCPTools and GetMCPToolsInfo functions to accept a context parameter, improving control over timeouts and cancellations.
- Implemented timeout handling for ListTools operations to prevent hanging during long-running requests.
- Enhanced GetFunctionDefinitions to include all MCP tools regardless of the allowed tools list, ensuring comprehensive tool access.
- Improved MCP service management by adding checks for service enabled state and critical configuration changes, ensuring robust client connection handling.
- Refactored session handling to utilize AgentModeEnabled for better session configuration management.
2025-11-11 02:47:38 +08:00
wizardchen 244aaab328 feat: Update web search providers and enhance knowledge base management
- Added DuckDuckGo as a new web search provider in the configuration.
- Removed deprecated web search providers (Baidu, Bing, Bocha, Exa, Google, Kuaisou, Searxng, Tavily, Zhipu) to streamline the codebase.
- Enhanced knowledge base management by introducing temporary knowledge base handling in the session service.
- Updated the web search service to support RAG-based compression for improved search result processing.
- Refactored session and knowledge service interfaces to accommodate new functionalities.
2025-11-10 22:45:27 +08:00
wizardchen ac8c8e9af2 feat: Refactor tenant configuration management to use KV API
- Updated tenant web search and agent configuration endpoints to utilize a KV-style API for better flexibility.
- Enhanced the tenant handler to support generic key-value operations for retrieving and updating configurations.
- Improved frontend API calls to align with the new KV API structure, ensuring consistent data handling.
- Removed deprecated direct configuration endpoints for a cleaner and more maintainable codebase.
2025-11-10 20:11:45 +08:00
wizardchen 07a8c1de4c feat: Add web search functionality and enhance agent mode integration
- Introduced web search configuration in config.yaml, allowing multiple providers with specific settings.
- Updated InputField component to manage agent mode and web search toggles, improving user interaction.
- Enhanced chat API to include web search status in requests, enabling dynamic query handling.
- Implemented backend support for web search integration, merging results with knowledge base queries.
- Added tenant-level web search configuration management, allowing customization per tenant.
2025-11-10 03:14:12 +08:00
wizardchen 1313f4dfbb feat: Add system prompt template support and placeholder functionality
- Introduced a new PlaceholderDefinition interface to manage available placeholders for system prompts.
- Enhanced AgentSettings.vue to allow users to configure system prompts with dynamic placeholders, improving user experience.
- Updated the AgentConfig structure to include a system prompt field, enabling custom prompt templates.
- Modified backend components to support the new system prompt template, ensuring compatibility with existing configurations.
- Implemented logic for rendering placeholders in the system prompt, allowing for dynamic content generation based on user input.
2025-11-09 23:17:39 +08:00
wizardchen 77b6133e2a feat: Add MCP services support and enhance migration scripts
- Introduced new MCP services functionality, including management routes and integration with the agent service.
- Updated Docker Compose configuration to include a new SQL migration for MCP services.
- Enhanced Makefile with new migration commands for versioning and creating migrations.
- Improved chat component to handle selected MCP services in message processing.
- Updated migration documentation to reflect new strategies and added MCP services migration files.
2025-11-09 03:27:24 +08:00
wizardchen 83721f98d4 feat: Integrate Swiper library and enhance chat functionality
- Added Swiper library to package dependencies for improved UI components.
- Updated chat API to include summary model ID in message handling, allowing for more flexible model selection.
- Enhanced InputField component to manage model selection and state more effectively.
- Improved event handling in chat components to support new model features and ensure accurate message processing.
- Refactored SVG assets for better visual consistency and updated styles for improved user experience.
2025-11-09 00:02:31 +08:00
wizardchen 6e147be202 feat: Enhance chat message handling and agent completion events
- Updated chat component to reset loading and reply states when switching sessions, improving user experience.
- Modified event handling to support agent completion events, ensuring accurate message state updates.
- Enhanced message reconstruction logic to handle completed messages and empty content scenarios effectively.
- Improved loading state management during message streaming, preventing unnecessary loading indicators for existing messages.
2025-11-08 00:58:26 +08:00
wizardchen 6d26c9f85d feat: Add stop session functionality to chat API and UI
- Implemented a new API endpoint to stop ongoing chat sessions, allowing users to cancel message generation.
- Enhanced InputField component to include a stop button, enabling users to halt the assistant's response generation.
- Updated chat view to manage the assistant message ID and loading state effectively during stop events.
- Improved event handling in the backend to support stop events, ensuring proper session management and user feedback.
2025-11-08 00:20:14 +08:00
wizardchen 326a61696a refactor: Implement event-driven streaming and enhance session management
- Removed the StreamEvent accumulation logic, transitioning to an append-only model for event streaming.
- Updated StreamManager interface to support appending events and retrieving events with offsets.
- Enhanced session handling to support real-time event emission through an EventBus, improving responsiveness.
- Refactored chat pipeline components to utilize the new event-driven architecture, ensuring seamless integration of agent responses and knowledge references.
- Improved frontend components to handle the new event structure, ensuring accurate rendering of agent interactions and responses.
2025-11-07 22:41:41 +08:00
wizardchen def8e4b426 refactor: Streamline knowledge base loading and improve message list handling
- Moved knowledge base initialization logic to the onMounted lifecycle hook for better organization.
- Simplified the loading of knowledge base information and message lists based on route changes.
- Enhanced the watch function to conditionally refresh the message list only when necessary, reducing unnecessary re-renders.
- Improved event handling for closing dropdown menus to enhance user experience.
2025-11-07 16:47:16 +08:00
wizardchen f30720f99b feat: Enhance agent settings navigation and error handling in UI components
- Introduced a new method to handle navigation to agent settings, improving code organization and reusability.
- Updated tooltip content in the agent mode button to include a link for quick access to agent settings.
- Enhanced error handling in the KnowledgeBase component to provide actionable links for VLM configuration errors.
- Added initial section handling in the KnowledgeBaseEditorModal for improved user experience during knowledge base editing.
2025-11-07 16:40:53 +08:00
wizardchen d387fd672f chore: Update .gitignore and Makefile for development enhancements
- Added 'logs/' and '*.pid' to .gitignore to exclude log files and process ID files from version control.
- Expanded Makefile with new development commands for easier local environment management, including 'dev-start', 'dev-stop', 'dev-restart', 'dev-logs', 'dev-status', 'dev-app', and 'dev-frontend'.
- Updated README_CN.md to include instructions for the new development mode and commands for improved developer experience.
2025-11-07 15:52:52 +08:00
begoniezhao 07c3453e1a chore: 移除Docker构建参数并更新.gitignore规则 2025-11-07 10:48:38 +08:00
wizardchen 655df49d7d refactor: Enhance chat message handling and session management
- Updated chat message sending logic to conditionally validate knowledge base IDs based on agent mode status.
- Improved endpoint selection for chat requests, allowing for dynamic routing between agent and knowledge chat.
- Introduced a new method to select the appropriate chat model ID, prioritizing remote models for enhanced flexibility.
- Changed JSON column types for agent and context configurations in session and tenant types to jsonb for better performance.
2025-11-07 01:37:37 +08:00
wizardchen 288dfbd19e refactor: Update chat and knowledge base handling for improved flexibility
- Removed validation for empty knowledge_base_ids in useStream, allowing backend to manage this case.
- Adjusted routing in KnowledgeBase.vue to decouple session creation from knowledge base ID.
- Updated getCurrentKbId function to simplify knowledge base ID retrieval from the route.
- Enhanced comments for clarity regarding knowledge base handling in chat components.
2025-11-07 01:06:25 +08:00
wizardchen 4fb12545c1 fix: Adjust menu styles and loading state handling in chat component
- Updated submenu item styles in menu.vue for better alignment and consistency.
- Removed unnecessary loading state resets in chat/index.vue to improve user experience during data processing.
- Enhanced comments for clarity regarding loading state management in chat events.
2025-11-07 00:56:18 +08:00
wizardchen b3a0d00fc3 feat: Revamp ModelEditorDialog and ModelSettings for improved UI and validation
- Replaced the dialog component with a custom modal layout for better user experience.
- Enhanced form structure with custom styles and validation for required fields.
- Updated model source selection and added dynamic placeholders based on model type.
- Improved API validation logic for model saving in both ModelEditorDialog and ModelSettings.
- Refactored styles for better alignment and responsiveness across components.
2025-11-07 00:30:15 +08:00
wizardchen 7cc986e282 feat: Improve KnowledgeBaseSelector dropdown behavior and styling
- Enhanced dropdown positioning logic to intelligently determine whether to display above or below the trigger element based on available space.
- Updated styles for the dropdown and list components to ensure proper alignment and responsiveness.
- Added event handling for wheel events to prevent unintended scrolling and improve user experience.
- Implemented maximum height constraints for the dropdown to enhance usability on smaller screens.
2025-11-06 23:30:17 +08:00
wizardchen b8f58edc8a feat: Enhance KnowledgeBaseEditorModal and KnowledgeBaseList with tdesign icons and improved styles
- Replaced emoji icons with tdesign icons in KnowledgeBaseEditorModal for consistency.
- Updated button in KnowledgeBaseList to include an icon and improved layout.
- Adjusted styles for navigation items and buttons for better alignment and visual appeal.
- Added new sections for TenantInfo and ApiInfo in Settings.vue to enhance settings organization.
2025-11-06 23:13:13 +08:00
wizardchen 8e3771f6c1 chore: Update tdesign-vue-next and refactor UserMenu and Settings components
- Upgraded tdesign-vue-next to version 1.17.2 for improved features and performance.
- Replaced emoji icons with corresponding tdesign icons in UserMenu and Settings components for consistency.
- Adjusted styles in the nav-icon class for better alignment and visual appeal.
2025-11-06 22:02:32 +08:00
wizardchen 625b40b184 feat: Add API documentation and external links to User Menu
- Introduced new menu items for accessing API documentation, the official website, and GitHub repository.
- Implemented corresponding methods to open these links in a new tab.
- Removed the previous API documentation card from TenantInfo.vue to streamline the UI.
2025-11-06 21:44:12 +08:00
wizardchen 30a711ea2f feat: Implement logout functionality with API integration
- Added logout API call in both menu and user menu components.
- Enhanced error handling for logout process to ensure local state is cleared even if API fails.
- Updated styles for submenu items for better UI consistency.
2025-11-06 21:36:38 +08:00
wizardchen fcaa7e8f01 chore: fix ignore 2025-11-06 21:20:49 +08:00
wizardchen 85801081a2 chore: remove server binary from git and add to .gitignore 2025-11-06 21:17:53 +08:00
wizardchen 266b9a5943 feat: Enhance chat and knowledge base functionalities with multi-KB support
- Updated agentChat API to accept optional knowledge_base_ids and agent_enabled parameters.
- Introduced getSession API to retrieve session details.
- Modified useStream to validate knowledge_base_ids for agent-chat requests and prepare POST body accordingly.
- Enhanced createKnowledgeBase API to include additional configuration options.
- Refactored chat routing to remove knowledge base ID from the chat path, allowing for dynamic knowledge base selection.
- Improved session management by preventing duplicate session entries in the menu store.
- Updated UI components for better session handling and display.
- Added context management for agent conversations to improve state persistence across sessions.
2025-11-06 21:12:26 +08:00
wizardchen 602e8a3b88 refactor: Simplify UI styles and remove unused theme management
- Removed theme initialization and management from the UI store.
- Cleaned up CSS styles across multiple components, replacing CSS variables with fixed color values for consistency.
- Updated background colors and text colors to enhance UI clarity and responsiveness.
- Streamlined component styles to improve maintainability and readability.
2025-11-06 02:47:01 +08:00
wizardchen 7a64371603 feat: Implement theme management and UI enhancements across the application
- Added theme initialization and management in the UI store.
- Enhanced dark mode styles for various components, including tables, dialogs, and inputs.
- Updated multiple components to use CSS variables for consistent theming.
- Introduced a new simplified API for updating knowledge base configurations.
- Improved overall UI consistency and responsiveness with new styles.
2025-11-06 02:45:44 +08:00