v2.9.4 (#669)
Co-authored-by: Clément Drouin <clement.drouin@mistral.ai> Co-authored-by: Jean-Baptiste Muscat <jeanbaptiste.muscatdupuis@mistral.ai> Co-authored-by: JeroenvdV <JeroenvdV@users.noreply.github.com> Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> Co-authored-by: Mathias Gesbert <mathias.gesbert@mistral.ai> Co-authored-by: Paul Cacheux <paul.cacheux@mistral.ai> Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai> Co-authored-by: Simon Van de Kerckhove <simon.vandekerckhove@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: allansimon-mistral <allan.simon@ext.mistral.ai> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
71f373c60c
commit
4972dd5694
50 changed files with 2892 additions and 842 deletions
|
|
@ -1,6 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
|
@ -42,6 +43,37 @@ class TestTelemetryNotification:
|
|||
|
||||
assert telemetry_events == []
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_at_mention_inserted_dispatches_telemetry(
|
||||
self, acp_agent_loop: VibeAcpAgentLoop, telemetry_events: list[dict[str, Any]]
|
||||
) -> None:
|
||||
session = await acp_agent_loop.new_session(cwd=str(Path.cwd()), mcp_servers=[])
|
||||
telemetry_events.clear()
|
||||
|
||||
await acp_agent_loop.ext_notification(
|
||||
"telemetry/send",
|
||||
{
|
||||
"event": "vibe.at_mention_inserted",
|
||||
"session_id": session.session_id,
|
||||
"properties": {
|
||||
"nb_mentions": 2,
|
||||
"context_types": {"file": 1, "folder": 1},
|
||||
"file_extensions": {".py": 1},
|
||||
"message_id": "msg-abc",
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
at_mention_events = [
|
||||
e for e in telemetry_events if e["event_name"] == "vibe.at_mention_inserted"
|
||||
]
|
||||
assert len(at_mention_events) == 1
|
||||
props = at_mention_events[0]["properties"]
|
||||
assert props["nb_mentions"] == 2
|
||||
assert props["context_types"] == {"file": 1, "folder": 1}
|
||||
assert props["file_extensions"] == {".py": 1}
|
||||
assert props["message_id"] == "msg-abc"
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_raises_on_invalid_params(
|
||||
self, acp_agent_loop: VibeAcpAgentLoop
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue