v2.5.0 (#495)
Co-authored-by: Quentin Torroba <quentin.torroba@mistral.ai> Co-authored-by: Clement Sirieix <clem.sirieix@gmail.com> Co-authored-by: Kim-Adeline Miguel <kimadeline.miguel@mistral.ai> Co-authored-by: Simon Van de Kerckhove <simon.vandekerckhove@mistral.ai> Co-authored-by: Vincent Guilloux <vincent.guilloux@mistral.ai> Co-authored-by: Michel Thomazo <michel.thomazo@mistral.ai> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
9421fbc08e
commit
5103019b01
104 changed files with 7277 additions and 691 deletions
|
|
@ -9,6 +9,7 @@ import tomli_w
|
|||
|
||||
from tests.cli.plan_offer.adapters.fake_whoami_gateway import FakeWhoAmIGateway
|
||||
from tests.stubs.fake_backend import FakeBackend
|
||||
from tests.stubs.fake_voice_manager import FakeVoiceManager
|
||||
from tests.update_notifier.adapters.fake_update_cache_repository import (
|
||||
FakeUpdateCacheRepository,
|
||||
)
|
||||
|
|
@ -75,6 +76,22 @@ def config_dir(
|
|||
return config_dir
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _reset_trusted_folders_manager(config_dir: Path) -> None:
|
||||
"""Prevent the singleton from writing to the real ~/.vibe/trusted_folders.toml.
|
||||
|
||||
The module-level ``trusted_folders_manager`` captures its file path at import
|
||||
time (before any monkeypatch), so it would otherwise target the real home
|
||||
directory. Redirect it to the temp config dir used by the ``config_dir``
|
||||
fixture.
|
||||
"""
|
||||
from vibe.core.trusted_folders import trusted_folders_manager
|
||||
|
||||
trusted_folders_manager._file_path = config_dir / "trusted_folders.toml"
|
||||
trusted_folders_manager._trusted = []
|
||||
trusted_folders_manager._untrusted = []
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _init_harness_files_manager():
|
||||
reset_harness_files_manager()
|
||||
|
|
@ -215,6 +232,7 @@ def build_test_vibe_app(
|
|||
resolved_current_version = (
|
||||
CORE_VERSION if current_version is None else current_version
|
||||
)
|
||||
voice_manager = kwargs.pop("voice_manager", FakeVoiceManager())
|
||||
|
||||
return VibeApp(
|
||||
agent_loop=resolved_agent_loop,
|
||||
|
|
@ -223,5 +241,6 @@ def build_test_vibe_app(
|
|||
update_cache_repository=resolved_update_cache_repository,
|
||||
plan_offer_gateway=resolved_plan_offer_gateway,
|
||||
initial_prompt=kwargs.pop("initial_prompt", None),
|
||||
voice_manager=voice_manager,
|
||||
**kwargs,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue