diff options
| author | Adam Malczewski <[email protected]> | 2026-03-24 20:19:12 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-03-24 20:19:12 +0900 |
| commit | 4f9da71b227eefac366769c86a614ea1c0c442b1 (patch) | |
| tree | 6a8d276314c63a43bd4c46512b8b4f8940f97ed9 /src/ollama-client.ts | |
| parent | 0d7e2758d28bb37c9d724f79008239a5e29e6ce4 (diff) | |
| download | ai-pulse-obsidian-plugin-4f9da71b227eefac366769c86a614ea1c0c442b1.tar.gz ai-pulse-obsidian-plugin-4f9da71b227eefac366769c86a614ea1c0c442b1.zip | |
Add batch fools and fix user message selection color
Diffstat (limited to 'src/ollama-client.ts')
| -rw-r--r-- | src/ollama-client.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ollama-client.ts b/src/ollama-client.ts index c01b5bc..155df84 100644 --- a/src/ollama-client.ts +++ b/src/ollama-client.ts @@ -116,7 +116,14 @@ const TOOL_SYSTEM_PROMPT = "ALWAYS prefer set_frontmatter over edit_file when modifying tags, aliases, or other frontmatter fields. " + "RECOMMENDED: Read the file first to see existing frontmatter before calling set_frontmatter.\n\n" + "Some tools (such as delete_file, edit_file, create_file, and move_file) require user approval before they execute. " + - "If the user declines an action, ask them why so you can better assist them."; + "If the user declines an action, ask them why so you can better assist them.\n\n" + + "BATCH TOOLS:\n" + + "When you need to perform the same type of operation on multiple files, prefer batch tools over calling individual tools repeatedly. " + + "Available batch tools: batch_search_files, batch_grep_search, batch_delete_file, batch_move_file, batch_set_frontmatter, batch_edit_file. " + + "Batch tools accept an array of operations and execute them all in one call, reporting per-item success/failure. " + + "Batch tools that modify files (delete, move, edit, set_frontmatter) require a single user approval for the entire batch. " + + "The parameters for batch tools use JSON arrays passed as strings. " + + "IMPORTANT: For batch_edit_file, you MUST still read each file first to get exact content before editing."; /** * Shared agent loop: injects the system prompt, calls the strategy for each |
