Initial commit
Co-Authored-By: Quentin Torroba <quentin.torroba@mistral.ai> Co-Authored-By: Laure Hugo <laure.hugo@mistral.ai> Co-Authored-By: Benjamin Trom <benjamin.trom@mistral.ai> Co-Authored-By: Mathias Gesbert <mathias.gesbert@ext.mistral.ai> Co-Authored-By: Michel Thomazo <michel.thomazo@mistral.ai> Co-Authored-By: Clément Drouin <clement.drouin@mistral.ai> Co-Authored-By: Vincent Guilloux <vincent.guilloux@mistral.ai> Co-Authored-By: Valentin Berard <val@mistral.ai> Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
commit
fa15fc977b
200 changed files with 30484 additions and 0 deletions
37
tests/test_system_prompt.py
Normal file
37
tests/test_system_prompt.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
from vibe.core.config import VibeConfig
|
||||
from vibe.core.system_prompt import get_universal_system_prompt
|
||||
from vibe.core.tools.manager import ToolManager
|
||||
|
||||
|
||||
def test_get_universal_system_prompt_includes_windows_prompt_on_windows(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
monkeypatch.setattr(sys, "platform", "win32")
|
||||
monkeypatch.setenv("COMSPEC", "C:\\Windows\\System32\\cmd.exe")
|
||||
|
||||
config = VibeConfig(
|
||||
system_prompt_id="tests",
|
||||
include_project_context=False,
|
||||
include_prompt_detail=True,
|
||||
include_model_info=False,
|
||||
)
|
||||
tool_manager = ToolManager(config)
|
||||
|
||||
prompt = get_universal_system_prompt(tool_manager, config)
|
||||
|
||||
assert "You are Vibe, a super useful programming assistant." in prompt
|
||||
assert (
|
||||
"The operating system is Windows with shell `C:\\Windows\\System32\\cmd.exe`"
|
||||
in prompt
|
||||
)
|
||||
assert "DO NOT use Unix commands like `ls`, `grep`, `cat`" in prompt
|
||||
assert "Use: `dir` (Windows) for directory listings" in prompt
|
||||
assert "Use: backslashes (\\\\) for paths" in prompt
|
||||
assert "Check command availability with: `where command` (Windows)" in prompt
|
||||
assert "Script shebang: Not applicable on Windows" in prompt
|
||||
Loading…
Add table
Add a link
Reference in a new issue