Co-authored-by: Clément Sirieix <clement.sirieix@mistral.ai>
Co-authored-by: Guillaume LE GOFF <guillaume.lgf@gmail.com>
Co-authored-by: Hdandria <henri.dandria@mistral.ai>
Co-authored-by: Ivana Dunisijevic <ivana.dunisijevic@mistral.ai>
Co-authored-by: Jean Burellier <sheplu@users.noreply.github.com>
Co-authored-by: Mathias Gesbert <mathias.gesbert@mistral.ai>
Co-authored-by: Mert Unsal <mert.unsal@mistral.ai>
Co-authored-by: Michel Thomazo <51709227+michelTho@users.noreply.github.com>
Co-authored-by: Paul VEZIA <166131032+le-codeur-rapide@users.noreply.github.com>
Co-authored-by: Pierre Rossinès <pierre.rossines@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: renovate-mistral[bot] <253709520+renovate-mistral[bot]@users.noreply.github.com>
Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Clément Drouin 2026-06-19 11:01:24 +02:00 committed by GitHub
parent 564a14365e
commit 6bedf271ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
223 changed files with 10533 additions and 6947 deletions

View file

@ -2,7 +2,6 @@ from __future__ import annotations
import json
from pathlib import Path
from unittest.mock import MagicMock, patch
import pytest
@ -114,7 +113,7 @@ async def test_resume_picker_shows_renamed_session_title(
assert handled is True
assert captured_picker is not None
assert captured_picker._latest_messages[f"local:{logger.session_id}"] == "New title"
assert captured_picker._latest_messages[logger.session_id] == "New title"
@pytest.mark.asyncio
@ -129,34 +128,3 @@ async def test_rename_command_requires_title(tmp_path: Path) -> None:
assert any(error._error == "Usage: /rename <title>" for error in errors)
assert handled is True
@pytest.mark.asyncio
async def test_rename_command_is_intercepted_for_remote_sessions(
tmp_path: Path,
) -> None:
config = build_test_vibe_config(session_logging=_enabled_session_config(tmp_path))
app = build_test_vibe_app(config=config)
async with app.run_test() as pilot:
with patch(
"vibe.cli.textual_ui.remote.remote_session_manager.RemoteEventsSource"
) as MockSource:
remote_source = MagicMock()
remote_source.session_id = "remote-session-id"
remote_source.is_terminated = False
remote_source.is_waiting_for_input = False
MockSource.return_value = remote_source
await app._remote_manager.attach(
session_id="remote-session-id", config=config
)
handled = await app._handle_command("/rename Remote title")
await pilot.pause()
errors = app.query(ErrorMessage)
assert any(
error._error == "Renaming is only supported for local sessions."
for error in errors
)
assert handled is True