sync update from LAN repo (source dhk-1 @ 3e87be55)

This commit is contained in:
gozeros committed 2026-10-21 15:06:08 +08:00
1 parent ab6068a7c1
commit 42f2a26fa8
1482 files changed
+227759 -9584

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)。