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:
Clément Drouin 2026-04-28 17:44:07 +02:00 committed by GitHub
parent a83c81ecf5
commit 632ea8c032
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
253 changed files with 13965 additions and 2525 deletions

View file

@ -259,6 +259,72 @@ class TestAvailableCommandsWithSkills:
assert "hidden-skill" not in cmd_names
class TestSlashCommandTelemetry:
@pytest.mark.asyncio
async def test_builtin_command_fires_telemetry(
self, acp_agent_loop: VibeAcpAgentLoop, telemetry_events: list[dict]
) -> None:
session_id = await _new_session_and_clear(acp_agent_loop)
telemetry_events.clear()
await _prompt(acp_agent_loop, session_id, "/help")
slash_events = [
e for e in telemetry_events if e["event_name"] == "vibe.slash_command_used"
]
assert len(slash_events) == 1
assert slash_events[0]["properties"]["command"] == "help"
assert slash_events[0]["properties"]["command_type"] == "builtin"
@pytest.mark.asyncio
async def test_skill_command_fires_telemetry(
self,
acp_agent_loop_with_skills: VibeAcpAgentLoop,
skills_dir: Path,
telemetry_events: list[dict],
) -> None:
create_skill(skills_dir, "my-skill", "Does something")
session_id = await _new_session_and_clear(acp_agent_loop_with_skills)
telemetry_events.clear()
await _prompt(acp_agent_loop_with_skills, session_id, "/my-skill")
slash_events = [
e for e in telemetry_events if e["event_name"] == "vibe.slash_command_used"
]
assert len(slash_events) == 1
assert slash_events[0]["properties"]["command"] == "my-skill"
assert slash_events[0]["properties"]["command_type"] == "skill"
@pytest.mark.asyncio
async def test_unknown_slash_command_does_not_fire_telemetry(
self, acp_agent_loop: VibeAcpAgentLoop, telemetry_events: list[dict]
) -> None:
session_id = await _new_session_and_clear(acp_agent_loop)
telemetry_events.clear()
await _prompt(acp_agent_loop, session_id, "/nonexistent")
slash_events = [
e for e in telemetry_events if e["event_name"] == "vibe.slash_command_used"
]
assert slash_events == []
@pytest.mark.asyncio
async def test_regular_message_does_not_fire_telemetry(
self, acp_agent_loop: VibeAcpAgentLoop, telemetry_events: list[dict]
) -> None:
session_id = await _new_session_and_clear(acp_agent_loop)
telemetry_events.clear()
await _prompt(acp_agent_loop, session_id, "Hello world")
slash_events = [
e for e in telemetry_events if e["event_name"] == "vibe.slash_command_used"
]
assert slash_events == []
class TestCommandCaseInsensitivity:
@pytest.mark.asyncio
async def test_uppercase_command(self, acp_agent_loop: VibeAcpAgentLoop) -> None: