fix(agent): read document attachments on demand (#5122)

This commit is contained in:
chengyongru authored and GitHub committed 2026-07-28 13:33:06 +08:00
1 parent 096a86a7f4
commit 12f828ea3d
15 files changed
+323 -450

No files matched your search

+10
View File
@@ -96,6 +96,16 @@ class TestReadDedup:
# Images should always return full content blocks, not a stub
assert isinstance(second, list)
@pytest.mark.asyncio
async def test_known_text_extension_falls_back_to_latin1(self, tool, tmp_path):
f = tmp_path / "legacy.csv"
f.write_bytes("name\ncafé".encode("latin-1"))
result = await tool.execute(path=str(f))
assert "1| name" in result
assert "2| café" in result
# ---------------------------------------------------------------------------
# Cross-session isolation (issue #3571)