fix(notes): Notes were not properly loading at the beginning.

For correct loading with get_all_notes() function.
This commit is contained in:
famez
2026-02-28 23:22:01 +01:00
parent 1ad2c50f99
commit 64a78f2e97

View File

@@ -1486,6 +1486,10 @@ class PentestAgentTUI(App):
notify("warning", f"TUI: failed to register notifier callback: {e}")
except Exception as ne:
logging.getLogger(__name__).exception("Failed to notify operator about notifier registration failure: %s", ne)
#Added, because the _notes variable is not properly loaded at the beginning and the notes.json is recreated unless you do a /notes command explicitely.
from ..tools.notes import get_all_notes
await get_all_notes()
# Call the textual worker - decorator returns a Worker, not a coroutine
_ = cast(Any, self._initialize_agent())