perf: preserve conversation prefixes across agent turns

This commit is contained in:
chenmingxuan committed 2026-10-17 17:25:15 +08:00
1 parent 1440a1f508
commit f1bb5d02aa
19 files changed
+552 -205

No files matched your search

+2
View File
@@ -134,6 +134,8 @@ def test_xml_scrub_depth_positions_the_text_edge():
ledger.stage_turn([obs(1)])
ledger.commit_staged(step_key="s1")
ledger.render([obs(2)])
assert PRO_UI_LIST_MARKER in str(ledger.active_messages[0].content)
ledger.compact_active() # depth settings apply at a compaction boundary
committed = ledger.active_messages[0]
assert PRO_UI_LIST_MARKER not in str(committed.content)
assert any(isinstance(b, dict) and b.get("type") == "image_url" for b in committed.content)