Log an action to the episodic log.
(self, action: str, details: str = None)
| 320 | # ==================== Episodic Log ==================== |
| 321 | |
| 322 | def log_action(self, action: str, details: str = None): |
| 323 | """Log an action to the episodic log.""" |
| 324 | with self._lock: |
| 325 | self._conn.execute( |
| 326 | "INSERT INTO episodic_log (timestamp, action, details) VALUES (?, ?, ?)", |
| 327 | (int(time.time()), action, details), |
| 328 | ) |
| 329 | self._conn.commit() |
| 330 | |
| 331 | def get_recent_actions(self, limit: int = 50) -> List[Dict]: |
| 332 | """Get recent actions from the episodic log.""" |