(self)
| 327 | logger.debug("PDF generation failed.", exc_info=True) |
| 328 | |
| 329 | def _save_session(self) -> None: |
| 330 | if not self._session_prompts: |
| 331 | return |
| 332 | from openosint.session_history import SessionRecord, save_session |
| 333 | |
| 334 | duration = int((datetime.now() - self._session_start).total_seconds()) |
| 335 | record = SessionRecord( |
| 336 | timestamp=self._session_start.strftime("%Y-%m-%dT%H:%M:%S"), |
| 337 | duration_seconds=duration, |
| 338 | prompts=self._session_prompts, |
| 339 | tools_used=self._session_tools, |
| 340 | targets=self._session_targets, |
| 341 | report_path=self._session_report_path, |
| 342 | ) |
| 343 | try: |
| 344 | save_session(record) |
| 345 | except Exception: |
| 346 | logger.debug("Session save failed.", exc_info=True) |
| 347 | |
| 348 | async def run(self) -> None: |
| 349 | """Start the interactive REPL loop.""" |
no test coverage detected