v2.14.0 (#743)
Co-authored-by: Alexis Tacnet <alexis@mistral.ai> Co-authored-by: Clément Drouin <clement.drouin@mistral.ai> Co-authored-by: Guillaume LE GOFF <guillaume.lgf@gmail.com> Co-authored-by: Lucas Marandat <31749711+lucasmrdt@users.noreply.github.com> Co-authored-by: Maxime Dolores <maxime.dolores@ext.mistral.ai> Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai> Co-authored-by: Quentin <quentin.torroba@mistral.ai> Co-authored-by: Val <102326092+vdeva@users.noreply.github.com> Co-authored-by: Vincent G <10739306+VinceOPS@users.noreply.github.com> Co-authored-by: p.vezia <166131032+le-codeur-rapide@users.noreply.github.com> Co-authored-by: Hiba Chaabnia <Hiba-Chaabnia@users.noreply.github.com> Co-authored-by: Nikhil Bhima <nikhilbhima@users.noreply.github.com> Co-authored-by: Nkipohcs <Nkipohcs@users.noreply.github.com> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
ad0d5c9520
commit
3f8487f761
197 changed files with 10819 additions and 2830 deletions
|
|
@ -115,7 +115,7 @@ class TestSkillManagerParsing:
|
|||
license="MIT",
|
||||
compatibility="Requires git",
|
||||
metadata={"author": "Test Author", "version": "1.0"},
|
||||
allowed_tools="bash read_file",
|
||||
allowed_tools="bash read",
|
||||
)
|
||||
|
||||
config = build_test_vibe_config(
|
||||
|
|
@ -132,7 +132,7 @@ class TestSkillManagerParsing:
|
|||
assert skill.license == "MIT"
|
||||
assert skill.compatibility == "Requires git"
|
||||
assert skill.metadata == {"author": "Test Author", "version": "1.0"}
|
||||
assert skill.allowed_tools == ["bash", "read_file"]
|
||||
assert skill.allowed_tools == ["bash", "read"]
|
||||
|
||||
def test_sets_correct_skill_path(self, skills_dir: Path) -> None:
|
||||
create_skill(skills_dir, "test-skill", "A test skill")
|
||||
|
|
@ -570,6 +570,47 @@ class TestParseSkillCommand:
|
|||
assert parsed.name == "my-skill"
|
||||
|
||||
|
||||
class TestSkillManagerConfigIssues:
|
||||
def test_invalid_frontmatter_records_config_issue(self, skills_dir: Path) -> None:
|
||||
broken_dir = skills_dir / "broken-skill"
|
||||
broken_dir.mkdir()
|
||||
(broken_dir / "SKILL.md").write_text("No frontmatter here")
|
||||
|
||||
config = build_test_vibe_config(
|
||||
system_prompt_id="tests",
|
||||
include_project_context=False,
|
||||
skill_paths=[skills_dir],
|
||||
)
|
||||
manager = SkillManager(lambda: config)
|
||||
|
||||
assert len(manager.config_issues) == 1
|
||||
issue = manager.config_issues[0]
|
||||
assert issue.file == broken_dir / "SKILL.md"
|
||||
assert "Failed to load" in issue.message
|
||||
|
||||
def test_multiple_invalid_skills_accumulate_issues(self, skills_dir: Path) -> None:
|
||||
broken_dir_a = skills_dir / "broken-skill-a"
|
||||
broken_dir_a.mkdir()
|
||||
(broken_dir_a / "SKILL.md").write_text("not valid")
|
||||
broken_dir = skills_dir / "broken-skill"
|
||||
broken_dir.mkdir()
|
||||
(broken_dir / "SKILL.md").write_text("not valid")
|
||||
create_skill(skills_dir, "good-skill", "Works fine")
|
||||
|
||||
config = build_test_vibe_config(
|
||||
system_prompt_id="tests",
|
||||
include_project_context=False,
|
||||
skill_paths=[skills_dir],
|
||||
)
|
||||
manager = SkillManager(lambda: config)
|
||||
|
||||
assert {
|
||||
(i.file, i.message.startswith("Failed to load"))
|
||||
for i in manager.config_issues
|
||||
} == {(broken_dir_a / "SKILL.md", True), (broken_dir / "SKILL.md", True)}
|
||||
assert "good-skill" in manager.available_skills
|
||||
|
||||
|
||||
class TestBuildSkillPrompt:
|
||||
def test_without_args(self, skills_dir: Path, skill_config: VibeConfig) -> None:
|
||||
create_skill(skills_dir, "my-skill", body="Do the thing.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue