diff --git a/pipeline_service/agent_loop_v2.py b/pipeline_service/agent_loop_v2.py index c1639bc..6729874 100644 --- a/pipeline_service/agent_loop_v2.py +++ b/pipeline_service/agent_loop_v2.py @@ -1181,7 +1181,18 @@ class AgentExecutor: names = format_skill_names(merged) return (f"FAIL: 技能 '{name}' 不存在。注意:name 只传技能裸名" f"(如 bid-workflow),不要带 [产线] 前缀或描述文字。可用技能: {names}") - return skill.to_prompt_block() + file_path = (p.get("file_path") or "").strip() + if file_path: + body = skill.read_linked_file(file_path) + if body.startswith("FAIL") or body.startswith("ERROR"): + linked = skill.list_linked_files() + return f"{body}\n可用子文件: {', '.join(linked) if linked else '(无)'}" + return f"## [{skill.name}] {file_path}\n\n{body}" + block = skill.to_prompt_block() + linked = skill.list_linked_files() + if linked: + block += f"\n(可用子文件,用 file_path 参数加载:{', '.join(linked)})\n" + return block async def _t_list_packs(self, sor, p, pid): try: