fix(agent): emit only extracted reasoning progress

This commit is contained in:
sgaofen 2026-04-20 21:54:27 -07:00
parent f81c0394d0
commit ce805b771e
3 changed files with 58 additions and 6 deletions

View file

@ -322,6 +322,18 @@ class TestThinkingCallback:
)
assert len(calls) == 0
def test_thinking_callback_keeps_stripped_preview(self):
"""Subagent thinking relay should still expose the stripped preview."""
calls = []
self._simulate_thinking_callback(
"<think>internal reasoning</think> visible summary",
lambda name, preview=None: calls.append((name, preview))
)
assert len(calls) == 1
assert calls[0][0] == "_thinking"
assert "internal reasoning" in calls[0][1]
assert "visible summary" in calls[0][1]
# =========================================================================
# Gateway batch flush tests
@ -386,4 +398,3 @@ class TestBatchFlush:
if __name__ == "__main__":
pytest.main([__file__, "-v"])