v2.4.0 (#470)
Co-authored-by: Quentin Torroba <quentin.torroba@mistral.ai> Co-authored-by: Kim-Adeline Miguel <kimadeline.miguel@mistral.ai> Co-authored-by: Vincent Guilloux <vincent.guilloux@mistral.ai> Co-authored-by: Clement Sirieix <clem.sirieix@gmail.com> Co-authored-by: Antoine W <antoine.wronka@mistral.ai> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
5d2e01a6d7
commit
dd372ce494
89 changed files with 2086 additions and 596 deletions
|
|
@ -13,11 +13,16 @@ from tests.update_notifier.adapters.fake_update_cache_repository import (
|
|||
FakeUpdateCacheRepository,
|
||||
)
|
||||
from tests.update_notifier.adapters.fake_update_gateway import FakeUpdateGateway
|
||||
from vibe.cli.plan_offer.ports.whoami_gateway import WhoAmIResponse
|
||||
from vibe.cli.plan_offer.ports.whoami_gateway import WhoAmIPlanType, WhoAmIResponse
|
||||
from vibe.cli.textual_ui.app import CORE_VERSION, VibeApp
|
||||
from vibe.core.agent_loop import AgentLoop
|
||||
from vibe.core.agents.models import BuiltinAgentName
|
||||
from vibe.core.config import SessionLoggingConfig, VibeConfig
|
||||
from vibe.core.config import (
|
||||
DEFAULT_MODELS,
|
||||
ModelConfig,
|
||||
SessionLoggingConfig,
|
||||
VibeConfig,
|
||||
)
|
||||
from vibe.core.llm.types import BackendLike
|
||||
from vibe.core.paths import global_paths
|
||||
from vibe.core.paths.config_paths import unlock_config_paths
|
||||
|
|
@ -125,6 +130,13 @@ def vibe_config() -> VibeConfig:
|
|||
return build_test_vibe_config()
|
||||
|
||||
|
||||
def make_test_models(auto_compact_threshold: int) -> list[ModelConfig]:
|
||||
return [
|
||||
m.model_copy(update={"auto_compact_threshold": auto_compact_threshold})
|
||||
for m in DEFAULT_MODELS
|
||||
]
|
||||
|
||||
|
||||
def build_test_vibe_config(**kwargs) -> VibeConfig:
|
||||
session_logging = kwargs.pop("session_logging", None)
|
||||
resolved_session_logging = (
|
||||
|
|
@ -136,6 +148,8 @@ def build_test_vibe_config(**kwargs) -> VibeConfig:
|
|||
resolved_enable_update_checks = (
|
||||
False if enable_update_checks is None else enable_update_checks
|
||||
)
|
||||
if kwargs.get("models"):
|
||||
kwargs.setdefault("active_model", kwargs["models"][0].alias)
|
||||
return VibeConfig(
|
||||
session_logging=resolved_session_logging,
|
||||
enable_update_checks=resolved_enable_update_checks,
|
||||
|
|
@ -184,8 +198,8 @@ def build_test_vibe_app(
|
|||
resolved_plan_offer_gateway = (
|
||||
FakeWhoAmIGateway(
|
||||
WhoAmIResponse(
|
||||
is_pro_plan=True,
|
||||
advertise_pro_plan=False,
|
||||
plan_type=WhoAmIPlanType.CHAT,
|
||||
plan_name="INDIVIDUAL",
|
||||
prompt_switching_to_pro_plan=False,
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue