Skip to content

✨ Add Chinese localization for tool descriptions#2527

Merged
WMC001 merged 22 commits intodevelopfrom
gerui-bugfix
Mar 27, 2026
Merged

✨ Add Chinese localization for tool descriptions#2527
WMC001 merged 22 commits intodevelopfrom
gerui-bugfix

Conversation

@geruihappy-creator
Copy link
Copy Markdown
Collaborator

本地工具描述的国际化,在智能体开发、智能体空间和市场页作适配
image
image
image

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 14, 2026

Codecov Report

❌ Patch coverage is 85.90604% with 21 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
backend/services/tool_configuration_service.py 77.27% 1 Missing and 9 partials ⚠️
backend/utils/tool_utils.py 84.21% 1 Missing and 5 partials ⚠️
backend/database/tool_db.py 83.33% 0 Missing and 5 partials ⚠️

📢 Thoughts on this report? Let us know!

WMC001 and others added 6 commits February 28, 2026 10:47
Pre-download tiktoken cl100k_base model
…thentication.

🐛 Bugfix: The agent_run process cannot invoke the MCP service with authentication.
1. 抽取 get_local_tools_description_zh 到独立模块 tool_local_service.py,避免循环导入
2. ToolInfo 模型添加 params: List 字段
3. 移除用户不感知参数(exclude=True)的 description_zh
4. 修复 send_email_tool description 中的 typo
葛锐 added 7 commits March 11, 2026 10:41
- Restore SSETransport and StreamableHttpTransport imports
- Restore get_mcp_authorization_token_by_name_and_url import
- Restore _create_mcp_transport function
- Update get_tool_from_remote_mcp_server to support tenant_id and authorization_token
- Update _call_mcp_tool to support authorization_token
- Update _validate_mcp_tool_remote to get authorization token from database
- Update get_all_mcp_tools to pass tenant_id
…description_zh

- Update mock paths from tool_configuration_service to tool_local_service
- Fix mock tool classes to use Field() for default values
- Update test_tool_db.py mock module setup
- Restore MCP tools unique key logic (name&source&usage) in update_tool_table_from_scan_tool_list
- Add user_id to MockToolInstanceClass in test
- Fix mock path for get_local_tools_description_zh in test_tool_db.py
…ool_by_tool_info logic

- Add ToolSourceEnum import to tool_db.py
- Restore create_or_update_tool_by_tool_info to not filter by user_id
- Restore proper ToolInstance creation logic
- Add tests for get_local_tools with description_zh extraction
- Add tests for list_all_tools merging description_zh from SDK
- Add tests for add_tool_field merging params and inputs description_zh
- Add tests for get_local_tools_classes direct call
- Add edge case tests for JSON decode errors and missing attributes
- Fix mock path from tool_local_service to tool_configuration_service for get_local_tools_classes
- Fix mock path for get_local_tools_description_zh
- Add @pytest.mark.asyncio for async list_all_tools tests
- Mock importlib.import_module for get_local_tools_classes direct test
Pydantic V2 doesn't support Field(description_zh=...) directly.
The actual tool classes use init_param_descriptions class attribute
for parameter description_zh. Updated get_local_tools() to check
init_param_descriptions as fallback when param.default.description_zh
is not available.
@sonarqubecloud
Copy link
Copy Markdown

@WMC001 WMC001 merged commit 2dd57e3 into develop Mar 27, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants