Refactor: 统一工具 schema 注入并提升工具调用 JSON 捕获稳定性#59
Refactor: 统一工具 schema 注入并提升工具调用 JSON 捕获稳定性#59Cai-Tang-www wants to merge 9 commits into1024XEngineer:mainfrom
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
minorcell
left a comment
There was a problem hiding this comment.
@Cai-Tang-www 工具哪里可以再调研一下,你们当前的参数传递方式是不对的哦~
|
这次是对工具系统的大改,把工具调用切到标准协议并彻底移除旧的 JSON 内联/捕获流程。 |
minorcell
left a comment
There was a problem hiding this comment.
@Cai-Tang-www 系统提示词也是一个重要的决策部分;
这里除了文档的评论之外,还有一点重要的是:你们做的是一个agent,并不是什么聊天Bot;
所以这里的描述:“角色提示词” 是不是不太合适?可以参考一下 codex 是如何做这部分的设计的:https://github.com/openai/codex/blob/main/codex-rs/core/prompt.md
There was a problem hiding this comment.
这里有点奇怪,为什么系统提示词是可修改的?
系统提示词本身是 agent 角色定义的重要组成部分,如果把这部分修改权直接暴露给用户,可能会带来不可预期的行为和结果。
There was a problem hiding this comment.
一开始可能为了方便人设写外面,我看看怎么改善一下
fix(security): reject backslash traversal in workspace path resolution
背景
这是 #45 的后续收尾,主要解决两类遗留问题:
configs/persona.txt中仍保留了大量工具参数说明,和工具 schema 定义重复,容易产生双重维护和不一致。<think>块或代码围栏时,工具调用识别不稳定。本次改动
1. 统一工具信息来源,注入 schema 上下文
configs/persona.txt和configs/persona.txt.example中重复的工具参数描述default/enum等结构化字段Definition()统一生成模型可见的 schema 上下文2. 优化工具调用 JSON 捕获器稳定性
<think> ... </think>+ 自然语言 + JSON<think>块影响
Close #51
验证