fix(tui): keep moa.aggregating in answer-only mode
Answer-only drops MoA content (references, progress and phase lines that land in the reasoning disclosure or activity log). moa.aggregating carries no content: both clients use it only as a busy-state transition. Keep it, the same rule as subagent.thinking (frame kept, text dropped).
This commit is contained in:
@@ -121,7 +121,7 @@ def test_hidden_reasoning_drops_moa_reference_chrome(monkeypatch):
|
||||
assert events == []
|
||||
|
||||
|
||||
def test_hidden_reasoning_drops_moa_status_and_aggregating_chrome(monkeypatch):
|
||||
def test_hidden_reasoning_drops_moa_status_lines_but_keeps_aggregating(monkeypatch):
|
||||
events = _capture(monkeypatch)
|
||||
_session(monkeypatch, "hide-moa-status", show_reasoning=False, effort="high")
|
||||
|
||||
@@ -133,17 +133,9 @@ def test_hidden_reasoning_drops_moa_status_and_aggregating_chrome(monkeypatch):
|
||||
)
|
||||
server._on_tool_progress("hide-moa-status", "moa.aggregating", "aggregator-a", None, None)
|
||||
|
||||
assert events == []
|
||||
|
||||
|
||||
def test_shown_reasoning_still_emits_moa_aggregating(monkeypatch):
|
||||
events = _capture(monkeypatch)
|
||||
_session(monkeypatch, "show-moa-status", show_reasoning=True, effort="high")
|
||||
|
||||
server._on_tool_progress("show-moa-status", "moa.aggregating", "aggregator-a", None, None)
|
||||
|
||||
# progress/phase write lines into the reasoning disclosure (Desktop) and the
|
||||
# activity log (TUI). aggregating is a bare busy-state transition, no content.
|
||||
assert [event[0] for event in events] == ["moa.aggregating"]
|
||||
assert events[0][2]["aggregator"] == "aggregator-a"
|
||||
|
||||
|
||||
def test_hidden_reasoning_drops_subagent_thinking_text_on_parent(monkeypatch):
|
||||
|
||||
@@ -452,20 +452,15 @@ def _progress_subagent(sid: str, name: str, preview, kw, event_type):
|
||||
_mirror_subagent_to_child(event_type, payload)
|
||||
|
||||
|
||||
def _progress_moa_aggregating(sid, name, preview, kw):
|
||||
# Aggregation is the fan-out's tail: the same answer-only policy that drops
|
||||
# moa.progress/moa.phase (status-bar counters) applies to this announcement.
|
||||
if not _session_show_reasoning(sid):
|
||||
return
|
||||
_emit("moa.aggregating", sid, {"aggregator": str(name or "")})
|
||||
|
||||
|
||||
# event_type -> (handler, requires): `requires` names the arg that must be truthy for the row to be
|
||||
# emitted at all ("name" / "preview" / None).
|
||||
_PROGRESS_HANDLERS = {
|
||||
"tool.output_risk": (_progress_output_risk, "name"), "reasoning.available": (_progress_reasoning, "preview"),
|
||||
"moa.reference": (_progress_moa_reference, "name"),
|
||||
"moa.aggregating": (_progress_moa_aggregating, None),
|
||||
# Answer-only drops MoA content (references, progress/phase lines that land in the reasoning
|
||||
# disclosure or activity log) but keeps this: a bare state transition both clients use only
|
||||
# for the busy indicator. Same rule as subagent.thinking: frame kept, text dropped.
|
||||
"moa.aggregating": (lambda sid, name, preview, kw: _emit("moa.aggregating", sid, {"aggregator": str(name or "")}), None),
|
||||
"moa.progress": (_progress_moa_progress, None), "moa.phase": (_progress_moa_phase, None),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user