sync: 鍚屾灞€鍩熺綉鏈€鏂颁唬鐮?(source master @ b69568e4)

This commit is contained in:
gozeros committed 2026-10-21 14:51:31 +08:00
1 parent 4f7f07504a
commit 8bc8b0e082
1651 files changed
+278599 -11416

No files matched your search

@@ -16,6 +16,39 @@ from types import SimpleNamespace
import pytest
def test_roundtable_tool_projection_excludes_internal_write_handshake() -> None:
from app.gateway.roundtable_inprocess_gateway import _tool_calls_since_last_human
messages = [
{"type": "human", "content": "写报告"},
{
"type": "ai",
"tool_calls": [
{
"id": "begin-1",
"name": "begin_write_file",
"args": {"path": "/tmp/report.md"},
}
],
},
{
"type": "ai",
"tool_calls": [
{
"id": "write-1",
"name": "write_file",
"args": {"path": "/tmp/report.md", "content": "# report"},
}
],
},
]
calls = _tool_calls_since_last_human(messages)
assert [call["name"] for call in calls] == ["write_file"]
assert calls[0]["args"]["content"] == "# report"
@pytest.fixture
def _gw(monkeypatch):
"""构造一个被打桩的 InProcessRoundtableGateway,返回 (build, captured)。