Merged
fix word root check #745
Fimon12138Add on 1 day ago
fix word root check #745
Merged
Fimon12138Add on 1 day ago
Fimon12138
Fimon12138Collaborators
1 day ago
likedislike
Pull Request has been successfully merged by luoyang42.
(Thank you for Fimon12138's contribution.)
atomgit-bot
atomgit-bot
1 day ago Comments:

变更摘要

本 PR 修复词根校验中“单条词根必须是一个原子词”的约束:在 dataagent/plugins/de-agent/utils/word_root_validator.py 的 validate_word_roots 输入校验阶段新增下划线检测,若 english_name 含 _ 则直接抛出 ValueError,并同步更新该函数与 dataagent/plugins/de-agent/tools/word_roots.py 中同名工具 validate_word_roots 的文档说明,明确要求调用方先拆分完整标识符、为每个词根单独提供描述。

主要改动

  • 新增下划线输入校验: 在 word_root_validator.py 的 validate_word_roots 逐项校验逻辑中,于非空字符串检查之后新增 "_" in english_name 判断,命中时抛出 ValueError,使含下划线的复合标识符无法通过校验。
  • 错误提示引导拆分词根: 抛出的异常信息明确要求将标识符拆分为多个词根,并为每个词根提供描述,便于调用方定位并修正入参。
  • 工具层文档契约收紧: dataagent/plugins/de-agent/tools/word_roots.py 中工具 validate_word_roots 的 docstring 由“每项可选 chinese_description”改为“每项为一个原子词根、拒绝下划线、需先拆分并为每个词根提供描述”。
  • 校验函数文档同步: word_root_validator.py 的核心函数 docstring 补充“单一原子 english_name”与“下划线被拒绝”的说明,使接口文档与新增的运行时校验行为保持一致。
likedislike
Incorrect?
atomgit-bot
atomgit-bot
1 day ago Comments:

AtomGit AI 助手使用指南

在 PR 评论中使用命令即可触发。支持在普通评论和代码行评论中使用。

功能 命令 说明
代码审查 /ai review 检查代码质量、潜在问题、安全风险
PR 摘要 /ai summary 生成 PR 变更内容的结构化摘要
代码解释 /ai explain 解释代码变更的逻辑和意图
自由提问 @atomgit-bot <问题> 询问关于本 PR 的任何问题
帮助 /ai help 显示此帮助信息

免责声明

AI 助手可能存在误判,请结合自身判断。可以对评论点 👍 或 👎 帮助我们改进。

likedislike
Incorrect?
atomgit-bot
atomgit-bot
1 day ago Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
DataGalleryBotDataGalleryBotCollaborators
1 day ago Added label: ci-pipeline-running
13 event messages are collapsed here。 See more
DataGalleryBotDataGalleryBotCollaborators
1 day ago Added label: ci-pipeline-running
DataGalleryBot
DataGalleryBotCollaborators
1 day ago Comments:
Project Name Build Result Details
gitcode-gate-dataagent ✅ SUCCESS 1873

NOTE: You can comment /rebuild to retrigger the pipeline again.

likedislike
DataGalleryBotDataGalleryBotCollaborators
1 day ago Approval passed
DataGalleryBotDataGalleryBotCollaborators
1 day ago Removed label: ci-pipeline-running
DataGalleryBotDataGalleryBotCollaborators
1 day ago Added label: ci-pipeline-passed
luoyang42luoyang42Collaborators
1 day ago Merged pull request, merge node SHA: 5a09daaf0eba1b66d994afe066dd8e7ec29b8996