mirror of
https://github.com/langgenius/dify.git
synced 2026-06-26 14:51:13 +08:00
Clarify lazy drive skill prompt guidance
This commit is contained in:
parent
a84f70445a
commit
d74ab3fa80
@ -149,10 +149,7 @@ class DifyDriveLayer(PlainLayer[DifyDriveDeps, DifyDriveLayerConfig, EmptyRuntim
|
||||
sections: list[str] = []
|
||||
mentioned_skill_keys = set(self.config.mentioned_skill_keys)
|
||||
other_skills = [
|
||||
(
|
||||
f"- {skill.path}: {skill.name} — {skill.description}. "
|
||||
f"Pull with `dify-agent drive pull {self._skill_prefix(skill.skill_md_key)}`."
|
||||
)
|
||||
f"- {skill.path}: {skill.name} — {skill.description}"
|
||||
for skill in self.config.skills
|
||||
if skill.skill_md_key not in mentioned_skill_keys
|
||||
]
|
||||
@ -160,7 +157,8 @@ class DifyDriveLayer(PlainLayer[DifyDriveDeps, DifyDriveLayerConfig, EmptyRuntim
|
||||
sections.append(
|
||||
"Other available skills:\n"
|
||||
+ "\n".join(other_skills)
|
||||
+ "\n\nIf you want to use one, pull it first with `dify-agent drive pull <SKILL_PATH>/`."
|
||||
+ "\n\nIf you want to use one, pull it with `dify-agent drive pull <SKILL_PATH>/`, "
|
||||
"then read the pulled skill content before using it."
|
||||
)
|
||||
sections.append(_AGENT_STUB_CLI_USAGE_PROMPT)
|
||||
return "\n\n".join(sections)
|
||||
|
||||
@ -101,7 +101,9 @@ def test_drive_layer_exposes_agent_stub_cli_usage_suffix_prompt(tmp_path: Path)
|
||||
prompt = layer.suffix_prompts[0]
|
||||
assert "Other available skills" in prompt
|
||||
assert "other-skill: Other Skill — Fallback catalog entry." in prompt
|
||||
assert "`dify-agent drive pull other-skill/`" in prompt
|
||||
assert "`dify-agent drive pull other-skill/`" not in prompt
|
||||
assert "pull it with `dify-agent drive pull <SKILL_PATH>/`" in prompt
|
||||
assert "read the pulled skill content before using it" in prompt
|
||||
assert "dify-agent drive list [REMOTE_PREFIX]" in prompt
|
||||
assert "dify-agent drive pull [REMOTE ...] [--to LOCAL_DIR]" in prompt
|
||||
assert "--to ." in prompt
|
||||
|
||||
Loading…
Reference in New Issue
Block a user