MCPcopy Create free account
hub / github.com/OpenOSINT/OpenOSINT / _save_session

Method _save_session

openosint/repl.py:329–346  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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."""

Callers 1

runMethod · 0.95

Calls 2

SessionRecordClass · 0.90
save_sessionFunction · 0.90

Tested by

no test coverage detected