Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 2 additions & 3 deletions apps/vscode-e2e/src/suite/tools/terminal-profile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ suite("Terminal Profile", function () {
"linux",
{
...originalProfiles,
[PROFILE_NAME]: { path: "/bin/bash", args: ["--noprofile", "--norc"] },
[PROFILE_NAME]: { path: "/bin/bash", args: ["--login"] },
},
vscode.ConfigurationTarget.Global,
)
Expand Down Expand Up @@ -172,8 +172,7 @@ suite("Terminal Profile", function () {
options.name === "Zoo Code" &&
options.shellPath === "/bin/bash" &&
Array.isArray(options.shellArgs) &&
options.shellArgs.includes("--noprofile") &&
options.shellArgs.includes("--norc")
options.shellArgs.includes("--login")
)
})
assert.ok(profileTerminal, "Expected a Zoo Code terminal created with the configured Bash profile")
Expand Down
116 changes: 57 additions & 59 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,57 @@
coverage:
precision: 2
round: down
status:
project:
default:
target: auto # never regress below current baseline
threshold: 1%
webview:
target: auto # webview project ratchet: never drop below current baseline
threshold: 0.5%
flags:
- webview-ui
- webview-ui-ct
patch:
default:
target: 80% # new lines must be 80% covered
threshold: 0%
webview-patch:
target: 70% # new lines in webview must be 70% covered
threshold: 0%
flags:
- webview-ui
- webview-ui-ct

flag_management:
individual_flags:
- name: webview-ui
paths:
- webview-ui/src/
carryforward: true
- name: webview-ui-ct
paths:
- webview-ui/src/
carryforward: true
- name: core-unit
paths:
- packages/core/src/
carryforward: true
- name: core-integration
paths:
- packages/core/src/
carryforward: true

component_management:
individual_components:
- component_id: webview_components
name: "Webview UI Components"
paths:
- webview-ui/src/components/
- component_id: webview_state
name: "Webview State & Context"
paths:
- webview-ui/src/context/
- webview-ui/src/state/

comment:
layout: "diff, flags, components"
behavior: default
coverage:
precision: 2
round: down
status:
project:
default:
target: auto # never regress below current baseline
threshold: 1%
webview:
target: auto # webview project ratchet: never drop below current baseline
threshold: 0.5%
flags:
- webview-ui
- webview-ui-ct
patch:
default:
informational: true # patch coverage is advisory, not blocking
webview-patch:
informational: true # patch coverage is advisory, not blocking
flags:
- webview-ui
- webview-ui-ct

flag_management:
individual_flags:
- name: webview-ui
paths:
- webview-ui/src/
carryforward: true
- name: webview-ui-ct
paths:
- webview-ui/src/
carryforward: true
- name: core-unit
paths:
- packages/core/src/
carryforward: true
- name: core-integration
paths:
- packages/core/src/
carryforward: true

component_management:
individual_components:
- component_id: webview_components
name: "Webview UI Components"
paths:
- webview-ui/src/components/
- component_id: webview_state
name: "Webview State & Context"
paths:
- webview-ui/src/context/
- webview-ui/src/state/

comment:
layout: "diff, flags, components"
behavior: default
12 changes: 11 additions & 1 deletion knip.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"ignore": ["**/__tests__/**", "apps/vscode-e2e/**", "scripts/**", "apps/cli/scripts/**"],
"ignore": [
"**/__tests__/**",
"apps/vscode-e2e/**",
"scripts/**",
"apps/cli/scripts/**",
"src/integrations/terminal/CommandScheduler.ts",
"src/integrations/terminal/CommandTrace.ts",
"src/integrations/terminal/shell/types.ts"
],
"ignoreDependencies": ["lint-staged"],
"ignoreBinaries": ["playwright"],
"ignoreExportsUsedInFile": true,
"playwright": false,
"playwright-ct": false,
Expand All @@ -13,6 +22,7 @@
"@roo-code/config-typescript",
"@types/node-cache",
"@types/vscode",
"@types/shell-quote",
"@vscode/ripgrep",
"esbuild-wasm",
"tree-sitter-wasms",
Expand Down
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()
})
})
Loading
Loading