(
agent_id: uuid.UUID,
rel_path: str,
max_chars: int = 8000,
tenant_id: str | None = None,
)
| 5146 | |
| 5147 | |
| 5148 | async def _read_document_from_storage( |
| 5149 | agent_id: uuid.UUID, |
| 5150 | rel_path: str, |
| 5151 | max_chars: int = 8000, |
| 5152 | tenant_id: str | None = None, |
| 5153 | ) -> str: |
| 5154 | temp_workspace = await _prepare_temp_workspace(agent_id, tenant_id=tenant_id, paths=[rel_path]) |
| 5155 | try: |
| 5156 | return await _read_document(temp_workspace.root, rel_path, max_chars=max_chars, tenant_id=None) |
| 5157 | finally: |
| 5158 | temp_workspace.cleanup() |
| 5159 | |
| 5160 | |
| 5161 | # ─── Format Conversion Tools ──────────────────────────────────── |
no test coverage detected