Commit Graph

672 Commits

Author SHA1 Message Date
wizardchen 760bbffafe refactor(i18n): remove unused feature strings from English and Chinese locales 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
Dounx 548450c170 feat: add REDIS_USERNAME support for asynq client 2026-02-06 21:47:34 +08:00
Dounx 66756de19f feat(frontend): allow configurable backend host and port 2026-02-06 20:05:42 +08:00
wizardchen 602086d884 feat: implement tenant isolation for knowledge base retrieval
- Added GetKnowledgeBaseByIDAndTenant method to enforce tenant isolation when retrieving knowledge bases by ID.
- Updated CopyKnowledgeBase method to use tenant-scoped retrieval, preventing cross-tenant cloning.
- Enhanced error handling in the KnowledgeBaseHandler to validate tenant ownership for source and target knowledge bases during copy operations.
2026-02-06 19:55:29 +08:00
wizardchen 67fba0679a feat: enhance MCP tool name and description handling for security
- Updated the tool name format to use service ID instead of service name, preventing name collisions across MCP services.
- Modified the tool description to indicate external sources, reducing the risk of indirect prompt injection.
- Added a prefix to the MCP tool output to treat it as untrusted data, further mitigating security risks.
2026-02-06 19:55:29 +08:00
hobostay a39c9dab9b fix: replace standard log with structured logger in main and recovery middleware
This PR continues the migration to structured logging by replacing the
standard Go log package usage with the project's structured logger.

Changes:
- cmd/server/main.go: Replace all log.Printf, log.Println, log.Fatalf
  with logger.Infof, logger.Info, logger.Fatalf
- internal/middleware/recovery.go: Replace log.Printf with
  logger.ErrorWithFields for better panic logging with structured data
- Remove log.SetFlags and log.SetOutput from main.go as they're no
  longer needed with the structured logger

Benefits:
- Consistent logging format across the entire application
- Better log parsing and analysis with structured fields
- Request ID tracking in recovery middleware for easier debugging
- Proper integration with the project's logging configuration

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-06 17:59:15 +08:00
nullkey 84086f55de fix: typo missed in previous commit 2026-02-06 17:58:30 +08:00
ChenRussell 0bf55dd8f7 chore: fix ChunkExtracter typo (ChunkExtractor) 2026-02-06 13:39:28 +08:00
CodeMarker 5fda6bc266 Optimize Jaccard function for set comparisons 2026-02-05 20:05:55 +08:00
liweijie 53669876d2 docs: fix api link 2026-02-05 20:02:47 +08:00
wizardchen 03585a161d feat: update sandbox service configuration in Docker Compose files
- Added container name for the sandbox service in both docker-compose.dev.yml and docker-compose.yml.
- Changed the profile from 'sandbox' to 'full' for the sandbox service, enhancing its integration within the application.
- Added logging for skill availability and sandbox mode in the skill handler, improving debugging capabilities.
2026-02-04 21:34:07 +08:00
wizardchen d6444d0cf3 feat: add build-sandbox job to Docker workflow
- Introduced a new job in the Docker workflow to build and push a sandbox image.
- Configured steps for code checkout, Docker Buildx setup, Docker Hub login, and image metadata handling.
- Enabled multi-platform builds for the sandbox image, enhancing deployment flexibility.
2026-02-04 20:58:24 +08:00
wizardchen 2d6efec84f feat: enhance agent skills sandbox configuration and availability
- Updated .env.example to set default sandbox mode to 'docker' and added timeout and docker image variables.
- Modified docker-compose files to include a sandbox service for building and pulling the sandbox image.
- Adjusted frontend API to reflect sandbox availability for skills, ensuring UI elements are conditionally displayed based on sandbox status.
- Implemented backend logic to disable skills when the sandbox is not enabled, improving error handling and user experience.
2026-02-04 20:58:24 +08:00
wizardchen 3c6b129530 feat(redis): add REDIS_USERNAME environment variable for Redis ACL configuration 2026-02-04 20:41:01 +08:00
nullkey 03446f35d3 feat: adjust sandbox setting of agentConfig 2026-02-04 20:08:49 +08:00
nullkey 43a2c647ea feat: optimize security and deployment of agent skills 2026-02-04 20:08:49 +08:00
nullkey 3f21345546 feat: adapt preloaded skills to smart-reasoning agent 2026-02-04 20:08:49 +08:00
nullkey 33f7e7da66 feat: support agent skills
feat:support agent skills
2026-02-04 20:08:49 +08:00
Dounx 6e03f1ea79 feat(redis): add REDIS_USERNAME support for Redis ACL 2026-02-04 19:38:40 +08:00
MEKXH c2cdc16712 fix(chat): strip thinking content from model output
Handle thinking models that return wrapped content even when
Thinking=false is configured. This is a fallback strategy for models
like MiniMax-M2.1 that do not fully support the Thinking parameter.
The thinking tags and their enclosed content are completely stripped.
2026-02-04 19:35:55 +08:00
MEKXH 9a3f09c983 docs: update Air installation command from cosmtrek/air to air-verse/air 2026-02-04 19:27:44 +08:00
begoniezhao 10c2be0e6e feat: Add configurable global log level via env 2026-02-04 19:18:35 +08:00
begoniezhao 4610a4d1ee feat: Use num_ctx instead of truncate for embedding truncation 2026-02-04 14:24:01 +08:00
ChenRussell 0e1d08a14d fix: clear tag selection state when re-entering knowledge base 2026-02-03 10:41:08 +08:00
joeyczheng 9c57e11f63 feat: add bing search provider
Signed-off-by: joeyczheng <joeyczheng@tencent.com>
2026-02-02 20:53:22 +08:00
begoniezhao 5f7c23a1b9 refactor: Refactor rune handling for correct chunk merging 2026-02-02 16:47:35 +08:00
wizardchen 2b3f76e418 feat(web_fetch): enhance web fetch tool with DNS pinning and validation improvements
- Introduced a new validatedParams struct to hold validated input along with DNS-pinned host/IP for SSRF protection.
- Updated the validateParams function to validate and resolve the host to a single public IP, ensuring safe outbound fetches.
- Modified executeFetch and fetchHTMLContent methods to utilize the new validatedParams for improved security and clarity.
- Enhanced logging to reflect the display URL and provide better context during fetch operations.

This update strengthens the web fetch tool's security against SSRF attacks and improves the overall robustness of URL handling.
2026-02-02 13:33:39 +08:00
dragon8git a5d1233b96 Update session.md | 停止会话
停止会话
2026-02-02 10:44:11 +08:00
manx98 788f6e14c2 fix: MCP Client connection state not marked as closed after connection loss in SSE transport type 2026-02-02 10:42:19 +08:00
wizardchen 9c554c4571 feat(migrations): add pg_search extension update migration files
- Create up migration to update pg_search extension to the latest version.
- Create down migration noting that the update cannot be rolled back.
2026-01-30 19:30:35 +08:00
chenrui7 aba7a47b20 fix(parser): resolve chunk index mismatch in logs 2026-01-29 19:32:35 +08:00
ice 6a3c29d455 fix: correctly extract host from completion_url by handling both v1 and non-v1 endpoints 2026-01-28 14:06:43 +08:00
ice 98049ef091 style(ollama): optimize retest button icon alignment using #icon slot 2026-01-27 18:15:54 +08:00
wizardchen c805334cf5 fix: prioritize env variable over git tag in version 2026-01-27 18:01:12 +08:00
wizardchen fcaad914ea fix: escape @ symbol in i18n strings 2026-01-27 11:09:53 +08:00
wizardchen 14ad38fd83 fix: tighten SSRF protection for URL imports 2026-01-27 11:09:53 +08:00
ice 7f39d28a33 fix(frontend): hide upload mask when drag leaves window
Use dragCounter to track drag enter/leave events properly.
The mask now hides when user drags file out of the browser window.

- Add dragleave event listener
- Use counter to handle nested element drag events
- Reset counter on drop and unmount

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:33:09 +08:00
wizardchen faf1c9a37b feat: add matched question field to FAQ search results 2026-01-26 16:32:18 +08:00
begoniezhao 9b1381a844 chore: Update PostgreSQL image version to v0.21.4-pg17 2026-01-26 16:21:54 +08:00
wizardchen 67f3423e9b feat: implement SSRF-safe HTTP client
Add SSRF protection by validating redirect targets and resolved IPs,
blocking internal hostnames, restricted suffixes, and private IP ranges
including Docker and Kubernetes internal endpoints.
2026-01-26 12:00:49 +08:00
wizardchen 01d1aeab0e fix: add comprehensive SQL node validation 2026-01-26 12:00:49 +08:00
wizardchen 90ebd492ce fix: restrict database query allowed tables 2026-01-26 12:00:49 +08:00
wizardchen 1dd76df261 fix: replace dots with underscores in MCP tool names 2026-01-26 12:00:49 +08:00
wizardchen 7d272cc92c feat: add retrieve KB only when mentioned option 2026-01-26 10:44:09 +08:00
MEKXH 467ac01384 fix(zhipu): correct Embedding BaseURL to match API structure
Remove '/embeddings' suffix from ZhipuEmbeddingBaseURL to align with
Chat and Rerank BaseURL patterns. The OpenAIEmbedder automatically
appends '/embeddings' to the baseURL, so including it in the constant
would result in duplicate '/embeddings/embeddings' in the final URL.
2026-01-25 16:53:49 +08:00
nullkey de06bb24d3 fix: cleanup conversation context stored in Redis 2026-01-23 10:33:01 +08:00
cc 5c7f05189e fix(parser): separate StdMinerUParser and MinerUCloudParser implementation 2026-01-23 10:28:38 +08:00
begoniezhao fe6f84b67b refactor: Centralize and simplify SQL validation logic 2026-01-21 20:39:37 +08:00
wizardchen 03987b99de chore: remove metadata IP addresses from blocklist 2026-01-21 19:13:14 +08:00