Derive context from real state.
(context: dict, messages: list)
| 392 | # ── Context ── |
| 393 | |
| 394 | def update_context(context: dict, messages: list) -> dict: |
| 395 | """Derive context from real state.""" |
| 396 | memories = "" |
| 397 | if MEMORY_INDEX.exists(): |
| 398 | content = MEMORY_INDEX.read_text().strip() |
| 399 | if content: |
| 400 | memories = content |
| 401 | return { |
| 402 | "enabled_tools": list(TOOL_HANDLERS.keys()), |
| 403 | "workspace": str(WORKDIR), |
| 404 | "memories": memories, |
| 405 | } |
| 406 | |
| 407 | |
| 408 | # ── Agent Loop (simplified, focused on background tasks) ── |
no test coverage detected