From ea5a9e0656129f98b3392e8296f7497dbf36046f Mon Sep 17 00:00:00 2001 From: oudecheng <13802883547@139.com> Date: Fri, 22 May 2026 09:35:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=8A=80=E8=83=BD?= =?UTF-8?q?=E8=AF=B4=E6=98=8E=E6=A0=BC=E5=BC=8F=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=8F=AF=E8=AF=BB=E6=80=A7=E5=B9=B6=E7=A7=BB=E9=99=A4=E4=B8=8D?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84=E5=AD=97=E7=AC=A6=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/skills/mod.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/skills/mod.rs b/src/skills/mod.rs index da069ce..9eacdf3 100644 --- a/src/skills/mod.rs +++ b/src/skills/mod.rs @@ -434,20 +434,16 @@ impl SkillCatalog { } let mut prompt = String::from( - "技能为特定任务提供专用说明和工作流。\n当任务匹配其描述时,使用 skill_activate 工具加载技能。\n技能不是工具名,即使技能名看起来像工具,也不能直接调用技能名。\n如果需要某个技能,必须先调用 tool skill_activate,并传入 {\"name\": \"\"},再根据返回的技能说明执行。\n\n\n", + "# 技能说明\n技能为特定任务提供专用说明和工作流。\n当任务匹配其描述时,使用 skill_activate 工具加载技能。\n技能不是工具名,即使技能名看起来像工具,也不能直接调用技能名。\n如果需要某个技能,必须先调用 tool skill_activate,并传入 {\"name\": \"\"},再根据返回的技能说明执行。\n\n\n", ); - for skill in self.skills.iter().take(self.max_listed_skills) { + for skill in &self.skills { let entry = format!( " \n {}\n {}\n {}\n \n", platform_xml_escape(&skill.name), platform_xml_escape(&skill.description), platform_xml_escape(&path_to_uri(&skill.path)), ); - if prompt.len() + entry.len() + "\n".len() > self.max_index_chars { - prompt.push_str(" true\n"); - break; - } prompt.push_str(&entry); }