feat(gui): Add 'Force Prune Logs' button to Log Management panel.

This commit is contained in:
2026-03-06 14:33:29 -05:00
parent 81d8906811
commit b8485073da
2 changed files with 9 additions and 0 deletions

View File

@@ -328,6 +328,7 @@ class AppController:
'btn_approve_tool': self._handle_approve_ask,
'btn_approve_mma_step': lambda: self._handle_mma_respond(approved=True),
'btn_approve_spawn': lambda: self._handle_mma_respond(approved=True),
'btn_prune_logs': self.cb_prune_logs,
}
self._predefined_callbacks: dict[str, Callable[..., Any]] = {
'_test_callback_func_write_to_file': self._test_callback_func_write_to_file,
@@ -662,6 +663,11 @@ class AppController:
self.is_viewing_prior_session = True
self._set_status(f"viewing prior session: {Path(path).name} ({len(entries)} entries)")
def cb_prune_logs(self) -> None:
"""Manually triggers the log pruning process."""
self._set_status("Pruning logs...")
self._prune_old_logs()
def _load_active_project(self) -> None:
"""Loads the active project configuration, with fallbacks."""
if self.active_project_path and Path(self.active_project_path).exists():