From 016dbcf3335256b25c7dae441275cd6080c055a3 Mon Sep 17 00:00:00 2001 From: famez Date: Sat, 28 Feb 2026 23:22:51 +0100 Subject: [PATCH] feat(notes): Allow listing all the notes (not truncated) --- pentestagent/tools/notes/__init__.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pentestagent/tools/notes/__init__.py b/pentestagent/tools/notes/__init__.py index 52b1612..10139f0 100644 --- a/pentestagent/tools/notes/__init__.py +++ b/pentestagent/tools/notes/__init__.py @@ -148,12 +148,12 @@ def _validate_note_schema(category: str, metadata: Dict[str, Any]) -> str | None @register_tool( name="notes", - description="Manage persistent notes for key findings. Actions: create, read, update, delete, list.", + description="Manage persistent notes for key findings. Actions: create, read, update, delete, list (2 options, all or the truncated text to 60 characters).", schema=ToolSchema( properties={ "action": { "type": "string", - "enum": ["create", "read", "update", "delete", "list"], + "enum": ["create", "read", "update", "delete", "list_all", "list_truncated"], "description": "The action to perform", }, "key": { @@ -399,7 +399,7 @@ async def notes(arguments: dict, runtime) -> str: _save_notes_unlocked() return f"Deleted note '{key}'" - elif action == "list": + elif action == "list_all" or action == "list_truncated": if not _notes: return "No notes saved" @@ -417,9 +417,13 @@ async def notes(arguments: dict, runtime) -> str: lines.append(f"\n## {cat.title()}") for k, v in by_category[cat]: content = v["content"] - display_val = ( - content if len(content) <= 60 else content[:57] + "..." - ) + + display_val = content + if action == "list_truncated": + display_val = ( + content if len(content) <= 60 else content[:57] + "..." + ) + conf = v.get("confidence", "medium") lines.append(f" [{k}] ({conf}) {display_val}")