Persist the serialized RunState JSON payload alongside session items.
(self, state: dict[str, Any])
| 116 | return None |
| 117 | |
| 118 | async def save_state_json(self, state: dict[str, Any]) -> None: |
| 119 | """Persist the serialized RunState JSON payload alongside session items.""" |
| 120 | session_id = await self._ensure_session_id() |
| 121 | state_path = self._state_path(session_id) |
| 122 | payload = json.dumps(state, indent=2, ensure_ascii=False) |
| 123 | await asyncio.to_thread(self._dir.mkdir, parents=True, exist_ok=True) |
| 124 | await asyncio.to_thread(state_path.write_text, payload, encoding="utf-8") |
no test coverage detected