Skip to content
Open
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
09f6b6d
feat(shell): add shell settings contracts and cached-state UI binding
Jul 28, 2026
19a3dbf
fix(shell): add terminal shell settings translations to all 17 locales
Jul 28, 2026
ac0ed1b
fix(settings): restore mode-based cachedState sync reverted in B04 re…
Jul 28, 2026
a68ac23
feat(terminal): add unified shell resolution system (B05)
Aug 2, 2026
683b1e0
fix(task): remove BOM character from Task.ts causing invisible-chars …
Aug 2, 2026
4dc9610
fix(lint): update eslint-suppressions for B05 test files - add entrie…
Aug 2, 2026
28847b3
fix(terminal): use vscode provider for non-cmd shells in CommandEnvir…
Aug 2, 2026
0e63b22
fix(terminal): resolve B05 lifecycle and cross-platform CI failures
Aug 2, 2026
83e7e38
fix(terminal): pass profile shellArgs to VS Code terminal + restore m…
Aug 2, 2026
fae94c7
fix(terminal): guard illegal integration-ready self-transition + mock…
Aug 2, 2026
f851635
fix(terminal): respect static Terminal.getTerminalProfile() in comman…
Aug 2, 2026
b760a0d
fix(api): use optional call for getCommandEnvironmentService in setTe…
Aug 2, 2026
bc28103
test(e2e): raise shell-integration timeout to 30s in terminal-profile…
Aug 2, 2026
c08701f
fix(api): add runtime setShellIntegrationTimeout + apply it in termin…
Aug 2, 2026
9c3fd51
test(e2e): retry Terminal Profile suite on CI shell-integration flake
Aug 2, 2026
82d31f4
fix(terminal): use shell-integration-compatible profile in E2E test (…
Aug 2, 2026
9a5e2ae
fix(terminal): use shell-integration-safe --login arg in E2E test
Aug 2, 2026
60c5c77
fix(shell): mark settings dirty on shell selection change
Aug 3, 2026
35cc3dc
Merge branch 'pr/b04-shell-contracts-v2' into pr/b05-shell-resolution-v2
Aug 3, 2026
0f627a9
fix(ci): make RooTerminal lifecycle optional; ignore B06 scaffolding …
Aug 2, 2026
fcc3f09
fix(ci): add @types/shell-quote to dependencies
Aug 2, 2026
47e4687
fix(ci): resolve knip and check-types failures - exclude playwright, …
Aug 2, 2026
b2eef0b
fix(terminal): revert lifecycle/canReuse to required in RooTerminal i…
Aug 2, 2026
502e7df
chore: remove docs contamination and revert knip.json warn->off rules
Aug 4, 2026
bf2d780
chore: remove docs and scripts contamination
Aug 4, 2026
f033ccc
chore: remove temp file progress.txt
Aug 6, 2026
14f7617
feat: add local-ci-precheck skill for pre-push CI verification
Aug 6, 2026
2335da1
Merge branch 'main' into pr/b06-terminal-lifecycle-v2
myk1yt Aug 7, 2026
1c9e578
test(e2e): add terminal lifecycle suite
Aug 7, 2026
57bbae1
fix(test): stop infinite fixture loop in terminal-lifecycle e2e (PR #…
Aug 8, 2026
065f8f6
fix(vscode-e2e): attach TaskAborted listener before triggering cancel…
Aug 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions packages/types/src/__tests__/provider-settings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,75 @@ describe("getApiProtocol", () => {
})
})
})

describe("openAiToolStrictMode", () => {
it("should be optional and absent by default", () => {
const result = providerSettingsSchemaDiscriminated.parse({
apiProvider: "openai",
openAiModelId: "test-model",
})
expect(result.apiProvider).toBe("openai")
if (result.apiProvider === "openai") {
expect(result.openAiToolStrictMode).toBeUndefined()
}
})

it("should accept true when provided", () => {
const result = providerSettingsSchemaDiscriminated.parse({
apiProvider: "openai",
openAiModelId: "test-model",
openAiToolStrictMode: true,
})
expect(result.apiProvider).toBe("openai")
if (result.apiProvider === "openai") {
expect(result.openAiToolStrictMode).toBe(true)
}
})

it("should accept false when provided", () => {
const result = providerSettingsSchemaDiscriminated.parse({
apiProvider: "openai",
openAiModelId: "test-model",
openAiToolStrictMode: false,
})
expect(result.apiProvider).toBe("openai")
if (result.apiProvider === "openai") {
expect(result.openAiToolStrictMode).toBe(false)
}
})

it("should not break existing profile deserialization when absent", () => {
const existingProfile = {
apiProvider: "openai" as const,
openAiBaseUrl: "https://api.example.com/v1",
openAiApiKey: "sk-test",
openAiModelId: "gpt-4",
openAiStreamingEnabled: true,
}
const result = providerSettingsSchemaDiscriminated.parse(existingProfile)
expect(result.apiProvider).toBe("openai")
if (result.apiProvider === "openai") {
expect(result.openAiModelId).toBe("gpt-4")
expect(result.openAiToolStrictMode).toBeUndefined()
}
})

it("should only exist on the openai (OpenAI Compatible) provider profile", () => {
const openAiResult = providerSettingsSchemaDiscriminated.parse({
apiProvider: "openai",
openAiToolStrictMode: true,
})
expect(openAiResult.apiProvider).toBe("openai")
if (openAiResult.apiProvider === "openai") {
expect(openAiResult.openAiToolStrictMode).toBe(true)
}

// Anthropic provider should not have this field
const anthropicResult = providerSettingsSchemaDiscriminated.parse({
apiProvider: "anthropic",
apiKey: "sk-test",
})
expect(anthropicResult.apiProvider).toBe("anthropic")
expect((anthropicResult as Record<string, unknown>).openAiToolStrictMode).toBeUndefined()
Comment on lines +232 to +238

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Test the cross-profile input.

The Anthropic fixture does not include openAiToolStrictMode. This test passes even if discriminated parsing starts to retain that OpenAI-only field. Supply openAiToolStrictMode: true and assert the intended policy: rejection or removal.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/types/src/__tests__/provider-settings.test.ts` around lines 232 -
238, Update the Anthropic fixture in the providerSettingsSchemaDiscriminated
test to include openAiToolStrictMode: true, then assert the intended
cross-profile behavior: parsing rejects the input or removes the OpenAI-only
field. Keep the existing Anthropic provider assertion and align the expectation
with the schema’s established policy.

})
})
1 change: 1 addition & 0 deletions packages/types/src/provider-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ const openAiSchema = baseProviderSettingsSchema.extend({
openAiStreamingEnabled: z.boolean().optional(),
openAiHostHeader: z.string().optional(), // Keep temporarily for backward compatibility during migration.
openAiHeaders: z.record(z.string(), z.string()).optional(),
openAiToolStrictMode: z.boolean().optional(), // Profile-scoped strict function-tool schema toggle for OpenAI Compatible provider. Absent = false (backward compatible).
})

const ollamaSchema = baseProviderSettingsSchema.extend({
Expand Down
Loading
Loading