fix(coding-agent): make prompt snippets opt in closes #2285
This commit is contained in:
@@ -39,7 +39,7 @@ describe("buildSystemPrompt", () => {
|
||||
});
|
||||
|
||||
describe("custom tool snippets", () => {
|
||||
test("includes custom tools in available tools section", () => {
|
||||
test("includes custom tools in available tools section when promptSnippet is provided", () => {
|
||||
const prompt = buildSystemPrompt({
|
||||
selectedTools: ["read", "dynamic_tool"],
|
||||
toolSnippets: {
|
||||
@@ -51,6 +51,16 @@ describe("buildSystemPrompt", () => {
|
||||
|
||||
expect(prompt).toContain("- dynamic_tool: Run dynamic test behavior");
|
||||
});
|
||||
|
||||
test("omits custom tools from available tools section when promptSnippet is not provided", () => {
|
||||
const prompt = buildSystemPrompt({
|
||||
selectedTools: ["read", "dynamic_tool"],
|
||||
contextFiles: [],
|
||||
skills: [],
|
||||
});
|
||||
|
||||
expect(prompt).not.toContain("dynamic_tool");
|
||||
});
|
||||
});
|
||||
|
||||
describe("prompt guidelines", () => {
|
||||
|
||||
Reference in New Issue
Block a user