(context_id: str | None)
| 574 | |
| 575 | |
| 576 | async def _remove_context(context_id: str | None) -> None: |
| 577 | if not context_id: |
| 578 | return |
| 579 | from agent import AgentContext |
| 580 | from helpers import persist_chat |
| 581 | |
| 582 | context = AgentContext.get(context_id) |
| 583 | if context: |
| 584 | try: |
| 585 | context.reset() |
| 586 | except Exception: |
| 587 | pass |
| 588 | AgentContext.remove(context_id) |
| 589 | persist_chat.remove_chat(context_id) |
| 590 | |
| 591 | |
| 592 | def _log_parallel_child_started(agent: "Agent", job: ParallelJob) -> None: |
no test coverage detected