Commit Graph

912 Commits

Author SHA1 Message Date
lyingbug db16de084d fix: respect global default storage engine when creating knowledge base (#772)
Change default storageProvider in initFormData() from hardcoded 'local'
to empty string so KBStorageSettings.vue can apply the global config.
2026-03-21 10:21:49 +08:00
Dounx e11bd8c57d fix: use milvus result set length for empty search results 2026-03-20 18:22:40 +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
Dounx a4d3d69843 feat: expose builtin parser engine in settings 2026-03-20 15:52:33 +08:00
Dounx a9c2d61695 fix: add OpenRouter embedding provider support 2026-03-20 15:50:42 +08:00
Dounx cf9b935144 fix(dev): add milvus env and versioned docreader image 2026-03-20 15:50:16 +08:00
Dounx fc5c405639 feat(dev): add milvus service and db host config 2026-03-20 15:50:16 +08:00
nullkey f01dcd4129 feat(im): add multi-instance support with Redis-based distributed coordination
- config: add IMConfig for tunable workers, queue size, rate limit params
- qaqueue: add Redis global per-user limits and global concurrency gate
- ratelimit: add distributedLimiter with Redis ZSET sliding window + local fallback
- service: add Redis message dedup, WebSocket leader election, cross-instance /stop
2026-03-20 15:49:59 +08:00
nullkey d2bd3881e7 docs(im): update IM integration doc with Slack, commands, queue and streaming sections
- add Slack WebSocket/Webhook setup guide
- add slash-command system documentation
- add QA queue and rate limiting section
- add streaming output and file message handling details
2026-03-20 15:49:59 +08:00
nullkey fff9efb4f5 feat(im): integrate command dispatch, QA queue, rate limiting, and streaming improvements
- Wire slash-command registry into Service and HandleMessage dispatch
- Add bounded QA worker pool (qaQueue) with per-user backpressure
- Add sliding-window rate limiter to prevent message abuse
- Support /stop cancellation for queued and in-flight QA requests
- Fix WeCom group chat replies via appchat API with user fallback
- Fix WeCom longconn nil map panic and stream buffer memory leak
- Add Feishu stream reaper to clean orphaned streams (memory leak fix)
- Show "正在思考..." placeholder during Feishu streaming
- Handle empty-stream fallback when no visible content is produced
- Derive WebSearchEnabled from agent config for IM channels
2026-03-20 15:49:59 +08:00
nullkey f05f9b0e11 feat(im): add slash-command system with /help, /info, /search, /stop, /clear
Introduce a pluggable command framework for IM channels. Includes
Command interface, CommandRegistry for registration and dispatch,
and five built-in commands: /help (list commands), /info (inspect
knowledge bases), /search (search knowledge), /stop (cancel running
QA), and /clear (reset conversation context).
2026-03-20 15:49:59 +08:00
Dounx 838a49601c fix: guard pg_search update with skip_embedding 2026-03-19 22:03:09 +08:00
wizardchen 954c994b61 chore(release): bump version to 0.3.4 and update changelog 2026-03-19 18:20:09 +08:00
wizardchen be4f040aa6 feat(types): enhance FAQ metadata normalization and sanitization 2026-03-19 18:20:09 +08:00
wizardchen 8880df57f0 fix(i18n): simplify listChunks translation across multiple languages 2026-03-19 18:20:09 +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 c25741673c feat(chunk): implement batch deletion for chunks to avoid MySQL placeholder limit
- Updated DeleteChunks method to split IDs into batches of 5000 to prevent MySQL Error 1390.
- Added unit tests for CalculateFAQContentHash to ensure consistent hashing behavior across various scenarios, including normalization and case sensitivity.
2026-03-19 18:20:09 +08:00
wizardchen 8db4b6cdea fix(chunk): update timestamp function in UpdateChunks method to use NOW() for consistency 2026-03-19 18:20:09 +08:00
wizardchen 4c3f083642 refactor(agent): streamline document info retrieval and enhance chunk search logic
- Removed the validation for a maximum of 10 knowledge IDs in GetDocumentInfoTool to allow more flexibility.
- Adjusted pagination settings in chunk retrieval to limit results to 1 per request for more granular control.
- Updated the searchChunks method to use case-insensitive matching based on the database type, improving compatibility across different systems.
- Enhanced query structure for better readability and maintainability.
2026-03-19 18:20:09 +08:00
joeyczheng b4f3ad71ad Docs(IM): add docs for slack im channel
Signed-off-by: joeyczheng <joeyczheng@tencent.com>
2026-03-19 14:45:54 +08:00
wizardchen 2a63b58deb feat(im): enhance message handling and formatting for Feishu compatibility
- Updated the message streaming logic to handle <think> blocks more effectively, ensuring proper formatting for Feishu.
- Introduced a new transformThinkBlocks function to convert <think> content into Feishu-compatible markdown blockquotes.
- Improved the handling of tool call events to prevent duplicate processing and ensure correct message formatting.
- Enhanced documentation for permission configuration in the IM channel setup.
2026-03-18 21:56:34 +08:00
wizardchen 3de78dc3e8 refactor(im): improve tool invocation and result formatting
- Updated formatToolCallStart and formatToolCallResult functions to return plain-text lines instead of Markdown snippets for better integration within <think> blocks.
- Introduced briefToolSummary function to extract concise summaries from tool output.
- Enhanced handleMessageStream to manage <think> blocks more effectively during agent interactions.
- Added handling for server-side events in WeCom long connection management to improve reconnection logic.
2026-03-18 21:56:34 +08:00
wizardchen f3a3c72a4f fix(docparser): handle nested linked images and url parens 2026-03-18 21:56:34 +08:00
wizardchen 3450ed5e41 feat(knowledge): offload manual processing to async tasks 2026-03-18 21:56:34 +08:00
joeyczheng 49b5f1a739 feat(IM): support both websocket/webhook mode im channel for slack
Signed-off-by: joeyczheng <joeyczheng@tencent.com>
2026-03-18 21:26:53 +08:00
Suroy 5c6b710bae Update rerank_server_demo.py
1. Added CUDA debugging support
2. Improved memory management during model inference.
3. Fixed logits output

Test Device: Windows WSL Ubuntu 20.04 (python3.10 CUDA 5090 32G)
2026-03-18 18:25:05 +08:00
wizardchen 5506956e87 fix: update session title word count requirement
- Adjusted the session title generation template to require 4-10 words instead of 3-8 words for improved clarity and consistency in title generation.
2026-03-17 22:23:24 +08:00
wizardchen 4e2583e58d feat: add language support to summary generation payload
- Enhanced the SummaryGenerationPayload struct to include a Language field for better localization.
- Updated enqueueSummaryGenerationTask and ProcessSummaryGeneration methods to handle language context in summary generation tasks.
2026-03-17 22:23:24 +08:00
wizardchen 17da967f92 refactor: update session title generation and language context handling
- Modified the session title generation template to focus on extracting only the intent of the user's question.
- Enhanced the session service to include language context when generating titles.
- Updated middleware to inject language into the request context.
- Added a new test suite for validating SSRF safety of URLs.
2026-03-17 22:23:24 +08:00
wizardchen f7750d65c1 fix: update default language setting to Chinese 2026-03-17 22:23:24 +08:00
wizardchen 2ad1faf85f chore: update fallback templates
- Added critical language rules to fallback response templates to ensure consistent language usage in responses.
- Updated logger context to include language and session-related keys for improved context management.
2026-03-17 22:23:24 +08:00
wizardchen 139a9c40ff feat: enhance localization and configuration support
- Added timezone and language settings to the environment configuration.
- Introduced built-in agent configurations with multilingual support for various agents.
- Updated Docker Compose to utilize new environment variables for timezone and language.
- Created new prompt templates for question generation, summary generation, and keywords extraction.
2026-03-17 22:23:24 +08:00
wizardchen 09d9fe5ddb feat(im): add file support and knowledge base integration 2026-03-17 22:23:24 +08:00
ChenRussell d89e5db0f6 git commit -m "fix: clarify MinIO endpoint format error message
Add specific error handling for 'Endpoint url cannot have fully qualified paths'
to guide users to remove http:// or https:// prefix from endpoint URL."
2026-03-16 21:50:07 +08:00
lyingbug 32a364f2cb Merge pull request #764 from lyingbug/main
feat: enhance storage engine configuration and user notifications
2026-03-16 21:46:34 +08:00
wizardchen 1c752ff059 chore: remove chrome-extension from tracking and add to gitignore 2026-03-16 21:34:03 +08:00
wizardchen 56a0840aa4 fix: adjust margins in AgentStreamDisplay component for improved layout
- Reduced the bottom margin of the tree container from 16px to 10px for better spacing.
- Increased the top margin of the answer toolbar from 4px to 10px to enhance visual separation.
2026-03-16 21:30:43 +08:00
wizardchen 37633f89ef feat: enhance IM channel panel with platform hints and localization updates
- Added hints for WeCom and Feishu platforms in the IM channel panel to guide users in obtaining credentials.
- Included a recommendation for using WebSocket for easier setup.
- Updated localization files for English, Korean, Russian, and Chinese to support new hints and console links.
2026-03-16 21:00:37 +08:00
wizardchen d4e14235a6 fix: update storage engine warning display and styling
- Changed the storage engine warning from a div to a paragraph for better semantic structure.
- Updated the warning icon from 'error-circle' to 'info-circle' to better reflect the message.
- Adjusted CSS styles for the storage engine warning, including reduced gap and margin, and modified font size for improved readability.
2026-03-16 20:27:15 +08:00
wizardchen 0b8a71fb6d feat: enhance IM channel panel and localization support
- Added a new integration guide link in the IM channel panel description for better user guidance.
- Updated localization files for English, Korean, Russian, and Chinese to include the new 'docLink' key for the integration guide.
- Improved styling for the add button in the IM channel panel to enhance visual alignment and user experience.
2026-03-16 20:22:38 +08:00
wizardchen f7ec47306c refactor: unify dropdown menu styles across components
- Removed redundant dropdown menu styles from various components and centralized them in a new `dropdown-menu.less` file.
- Updated components to use the unified styles, ensuring consistency in appearance and behavior across the application.

This change simplifies maintenance and enhances the visual coherence of dropdown menus.
2026-03-16 20:13:30 +08:00
wizardchen 452db9f5c3 feat: add unit tests for InjectAndConditions function 2026-03-16 19:21:35 +08:00
wizardchen 795f615b5e fix: consistent aria-label and neutral background for manual download button
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 18:33:25 +08:00
wizardchen e609bd2c4c fix: fix manual download button layout and polish
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 18:29:59 +08:00
wizardchen 70b73cd257 feat: add download button for manual knowledge in doc-content
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 18:25:41 +08:00
wizardchen 2fd6e226a5 fix: sanitize tab chars and avoid double .md extension in manual download filename
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 18:18:23 +08:00
wizardchen 66c384823b test: add unit tests for manual knowledge download filename logic
Table-driven tests for sanitizeManualDownloadFilename covering normal titles,
each dangerous character replacement (/  \  "  \n  \r), blank/whitespace-only
titles falling back to "untitled.md", and safe passthrough of = ; characters.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 18:01:16 +08:00
wizardchen e0c1b77b70 fix: quote Content-Disposition filename and add empty-title fallback
- Use mime.FormatMediaType for both attachment and inline Content-Disposition
  headers in DownloadKnowledgeFile and the preview handler, preventing header
  injection via a user-controlled knowledge title (e.g. containing ';' or '=')
- Extract inline sanitize logic into sanitizeManualDownloadFilename helper and
  add a blank/whitespace-only title fallback to "untitled" so the download
  never produces a degenerate ".md" filename

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 18:01:07 +08:00
wizardchen 63caf564ee feat: support manual knowledge download in GetKnowledgeFile
Add an early-return branch that streams manual knowledge content
(stored as Markdown in Metadata.content) directly as a .md file,
avoiding the runtime error that occurred when FilePath is empty.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 17:49:45 +08:00
wizardchen c95db5743c docs: add implementation plan for manual knowledge download
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 17:46:34 +08:00