v2.9.0 (#641)
Co-authored-by: Antoine <33425718+anth2o@users.noreply.github.com> Co-authored-by: Bastien <bastien.baret@gmail.com> Co-authored-by: Clément Sirieix <clement.sirieix@mistral.ai> Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> Co-authored-by: Mathias Gesbert <mathias.gesbert@mistral.ai> Co-authored-by: Maxime Dolores <maxime.dolores@ext.mistral.ai> Co-authored-by: Michel Thomazo <51709227+michelTho@users.noreply.github.com> Co-authored-by: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai> Co-authored-by: Quentin <quentin.torroba@mistral.ai> Co-authored-by: Robin Gullo <robin.gullo@mistral.ai> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
a83c81ecf5
commit
632ea8c032
253 changed files with 13965 additions and 2525 deletions
|
|
@ -230,15 +230,49 @@ class TestAgentApplyToConfig:
|
|||
assert result.system_prompt_id == "cc"
|
||||
assert result.system_prompt == "Global custom prompt"
|
||||
|
||||
def test_custom_prompt_overrides_builtin(
|
||||
self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
||||
) -> None:
|
||||
"""Custom prompts in .vibe/prompts/ should override built-in prompts.
|
||||
|
||||
A user-provided explore.md (or any built-in prompt name) in the
|
||||
project or user prompts directory must take priority over the
|
||||
bundled SystemPrompt enum.
|
||||
"""
|
||||
project_prompts = tmp_path / "project" / ".vibe" / "prompts"
|
||||
project_prompts.mkdir(parents=True)
|
||||
(project_prompts / "explore.md").write_text("My custom explore prompt")
|
||||
|
||||
class _MockManager(HarnessFilesManager):
|
||||
@property
|
||||
def project_prompts_dirs(self) -> list[Path]:
|
||||
return [project_prompts]
|
||||
|
||||
@property
|
||||
def user_prompts_dirs(self) -> list[Path]:
|
||||
return []
|
||||
|
||||
mock_manager = _MockManager(sources=("user",))
|
||||
monkeypatch.setattr(
|
||||
"vibe.core.config._settings.get_harness_files_manager", lambda: mock_manager
|
||||
)
|
||||
|
||||
config = VibeConfig(
|
||||
system_prompt_id="explore",
|
||||
include_project_context=False,
|
||||
include_prompt_detail=False,
|
||||
)
|
||||
assert config.system_prompt == "My custom explore prompt"
|
||||
|
||||
|
||||
class TestAgentProfileOverrides:
|
||||
def test_default_agent_disables_exit_plan_mode(self) -> None:
|
||||
overrides = BUILTIN_AGENTS[BuiltinAgentName.DEFAULT].overrides
|
||||
assert "exit_plan_mode" in overrides.get("base_disabled", [])
|
||||
|
||||
def test_auto_approve_agent_sets_auto_approve(self) -> None:
|
||||
def test_auto_approve_agent_sets_bypass_tool_permissions(self) -> None:
|
||||
overrides = BUILTIN_AGENTS[BuiltinAgentName.AUTO_APPROVE].overrides
|
||||
assert overrides.get("auto_approve") is True
|
||||
assert overrides.get("bypass_tool_permissions") is True
|
||||
|
||||
def test_plan_agent_restricts_tools(self) -> None:
|
||||
overrides = BUILTIN_AGENTS[BuiltinAgentName.PLAN].overrides
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue