mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 12:00:15 +00:00
fix(coding-agent): only list built-in tools in system prompt
Extension tools are already described via API tool definitions. Removes redundant 'Custom tool' fallback.
This commit is contained in:
parent
7a2e71bb50
commit
73734a23a1
1 changed files with 3 additions and 4 deletions
|
|
@ -94,10 +94,9 @@ export function buildSystemPrompt(options: BuildSystemPromptOptions = {}): strin
|
||||||
const docsPath = getDocsPath();
|
const docsPath = getDocsPath();
|
||||||
const examplesPath = getExamplesPath();
|
const examplesPath = getExamplesPath();
|
||||||
|
|
||||||
// Build tools list based on selected tools
|
// Build tools list based on selected tools (only built-in tools with known descriptions)
|
||||||
const tools = selectedTools || ["read", "bash", "edit", "write"];
|
const tools = (selectedTools || ["read", "bash", "edit", "write"]).filter((t) => t in toolDescriptions);
|
||||||
const toolsList =
|
const toolsList = tools.length > 0 ? tools.map((t) => `- ${t}: ${toolDescriptions[t]}`).join("\n") : "(none)";
|
||||||
tools.length > 0 ? tools.map((t) => `- ${t}: ${toolDescriptions[t] ?? "Custom tool"}`).join("\n") : "(none)";
|
|
||||||
|
|
||||||
// Build guidelines based on which tools are actually available
|
// Build guidelines based on which tools are actually available
|
||||||
const guidelinesList: string[] = [];
|
const guidelinesList: string[] = [];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue