- 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
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).
- 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.
- 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.
- 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.
- 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.
- 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.
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)
- 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.
- 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.
- 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.
- 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.
Add specific error handling for 'Endpoint url cannot have fully qualified paths'
to guide users to remove http:// or https:// prefix from endpoint URL."
- 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.
- 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.
- 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.
- 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.
- 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.
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>
- 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>
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>