feat: implemented external thinking flags and transport reasoning controls

- Added the `--external-thinking` CLI flag alongside model capability checks to gate external thinking tool availability.
- Updated Anthropic and Google transports to honor `forceReasoningOff` for native thinking-off controls.
- Renamed the `thoughts` property and parameter to `notes` across think fixtures, tools, and tests.
- Updated system prompt instructions and test suites to verify transport-specific thinking and tool activation.
This commit is contained in:
can1357
2026-08-12 02:16:25 +02:00
parent 7e2663360f
commit 19c0afcc0d
23 changed files with 201 additions and 80 deletions
@@ -56,6 +56,18 @@ describe("OPTIONAL_VALUE_FLAGS table is honored by args.ts parseArgs", () => {
}
});
describe("--external-thinking", () => {
it("enables external thinking without consuming the initial message", () => {
const result = parseArgs(["--external-thinking", "check this"]);
expect(result.externalThinking).toBe(true);
expect(result.messages).toEqual(["check this"]);
});
it("stays unset when omitted", () => {
expect(parseArgs([]).externalThinking).toBeUndefined();
});
});
describe("--session-dir", () => {
it("uses PI_CODING_AGENT_SESSION_DIR unless the CLI flag overrides it", () => {
const previous = Bun.env.PI_CODING_AGENT_SESSION_DIR;