fix(coding-agent): make prompt snippets opt in closes #2285

This commit is contained in:
Mario Zechner
2026-03-17 12:44:16 +01:00
parent 8e3bb4ff55
commit 7817e9b227
6 changed files with 67 additions and 6 deletions

View File

@@ -94,9 +94,10 @@ export function buildSystemPrompt(options: BuildSystemPromptOptions = {}): strin
// Build tools list based on selected tools.
// Built-ins use toolDescriptions. Custom tools can provide one-line snippets.
const tools = selectedTools || ["read", "bash", "edit", "write"];
const visibleTools = tools.filter((name) => name in toolDescriptions || toolSnippets?.[name]);
const toolsList =
tools.length > 0
? tools
visibleTools.length > 0
? visibleTools
.map((name) => {
const snippet = toolSnippets?.[name] ?? toolDescriptions[name] ?? name;
return `- ${name}: ${snippet}`;