fix(coding-agent): restore builtin-only tool disabling

closes #3592
This commit is contained in:
Mario Zechner
2026-04-23 20:39:34 +02:00
parent e97051313d
commit e38647f376
8 changed files with 161 additions and 17 deletions

View File

@@ -257,17 +257,48 @@ describe("parseArgs", () => {
});
});
describe("--no-tools flag", () => {
describe("tool flags", () => {
test("parses --no-tools flag", () => {
const result = parseArgs(["--no-tools"]);
expect(result.noTools).toBe(true);
});
test("parses -nt shorthand", () => {
const result = parseArgs(["-nt"]);
expect(result.noTools).toBe(true);
});
test("parses --no-builtin-tools flag", () => {
const result = parseArgs(["--no-builtin-tools"]);
expect(result.noBuiltinTools).toBe(true);
});
test("parses -nbt shorthand", () => {
const result = parseArgs(["-nbt"]);
expect(result.noBuiltinTools).toBe(true);
});
test("parses --tools flag", () => {
const result = parseArgs(["--tools", "read,bash"]);
expect(result.tools).toEqual(["read", "bash"]);
});
test("parses -t shorthand", () => {
const result = parseArgs(["-t", "read,bash"]);
expect(result.tools).toEqual(["read", "bash"]);
});
test("parses --no-tools with explicit --tools flags", () => {
const result = parseArgs(["--no-tools", "--tools", "read,bash"]);
expect(result.noTools).toBe(true);
expect(result.tools).toEqual(["read", "bash"]);
});
test("parses --no-builtin-tools with explicit --tools flags", () => {
const result = parseArgs(["--no-builtin-tools", "--tools", "read,bash"]);
expect(result.noBuiltinTools).toBe(true);
expect(result.tools).toEqual(["read", "bash"]);
});
});
describe("messages and file args", () => {