Skip to content

Comments

✨ Add Chinese localization for tool descriptions#2527

Open
geruihappy-creator wants to merge 8 commits intodevelopfrom
gerui-bugfix
Open

✨ Add Chinese localization for tool descriptions#2527
geruihappy-creator wants to merge 8 commits intodevelopfrom
gerui-bugfix

Conversation

@geruihappy-creator
Copy link
Collaborator

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

@codecov
Copy link

codecov bot commented Feb 14, 2026

Codecov Report

❌ Patch coverage is 34.14634% with 81 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
backend/services/tool_configuration_service.py 1.66% 59 Missing ⚠️
backend/database/tool_db.py 12.00% 21 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!



def add_tool_field(tool_info):
from services.tool_configuration_service import get_local_tools_description_zh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import 建议放到文件最前方,集中管理。

name=getattr(tool_class, 'name'),
description=getattr(tool_class, 'description'),
description_zh=tool_description_zh,
params=init_params_list,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image 你这里把params去掉了,但是这里还是赋值了,需要看一下params参数是否能够去掉,如果可以,这里就不要赋值了。

Comment on lines +52 to 64
init_param_descriptions = {
"observer": {
"description": "Message observer",
"description_zh": "消息观察者"
},
"vlm_model": {
"description": "The VLM model to use",
"description_zh": "要使用的 VLM 模型"
},
"storage_client": {
"description": "Storage client for downloading files",
"description_zh": "存储客户端,用于下载文件"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用户不感知的参数,可以去掉。

"Get emails from email server. Supports filtering emails by time range and sender (sender must be an email address, not a name or non-ASCII string; subject filtering is not supported due to IMAP limitations)."
)

description_zh = "获取邮件,支持按时间范围和发件人筛选。。受 IMAP 限制,暂不支持按主题筛选。"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多余一个句号

class SendEmailTool(Tool):
name = "send_email"
description = "Send email to specified recipients. Supports only HTML formatted email content, and can add multiple recipients, CC, and BCC."
description = "Send email to specified recipients. Supports only HTML formatted formatted email content, and can add multiple recipients, CC, and BCC."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Supports only HTML formatted formatted email content

formatted 重复

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.

3 participants