Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

feat(agent): instruct agent to prefer existing folders via list_folders

Gabriel Steind635be9c32ba
diff --git a/src/config/prompts.ts b/src/config/prompts.ts
index e43b013ea..618f30c3f 100644
--- a/src/config/prompts.ts
+++ b/src/config/prompts.ts
@@ -152,9 +152,12 @@ const TOOL_INSTRUCTIONS: Record<string, string> = {
"Use search_notes to find information from the user's past meetings, discussions, or personal notes before answering from memory.",
get_note:
"Use get_note to fetch the full content of a specific note by ID. If the current note's ID is provided in the context, use it directly. Otherwise, use search_notes first to find the note ID.",
- create_note: "Use create_note when the user asks you to create, write, or draft a new note.",
+ create_note:
+ "Use create_note when the user asks you to create, write, or draft a new note. If the user specifies a folder, call list_folders first and reuse a matching existing folder (case-insensitive, tolerant of plurals/typos) instead of creating a near-duplicate. Only pass a new folder name when no existing folder is a reasonable fit.",
update_note:
- "Use update_note to modify an existing note's title, content, or move it to a different folder. If the current note's ID is provided in the context, use it directly. Otherwise, use search_notes first to find the note ID.",
+ "Use update_note to modify an existing note's title, content, or move it to a different folder. If the current note's ID is provided in the context, use it directly. Otherwise, use search_notes first to find the note ID. When moving to a folder, call list_folders first and prefer an existing folder over creating a new one.",
+ list_folders:
+ "Use list_folders before create_note or update_note whenever the user mentions a folder, so you can reuse an existing folder instead of creating a near-duplicate.",
web_search:
"Use web_search for questions about current events, facts you're unsure about, or anything requiring up-to-date information.",
copy_to_clipboard: