Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

test(agent): follow the approval line to its new shape

purplef2723c254143
diff --git a/src/hooks/__tests__/a-blocked-tool-is-refused-not-offered.test.ts b/src/hooks/__tests__/a-blocked-tool-is-refused-not-offered.test.ts
index 7664faf4..22595a17 100644
--- a/src/hooks/__tests__/a-blocked-tool-is-refused-not-offered.test.ts
+++ b/src/hooks/__tests__/a-blocked-tool-is-refused-not-offered.test.ts
@@ -16,7 +16,7 @@ const agent = readFileSync(resolve(__dirname, '../useAgentChat.ts'), 'utf8')
describe('a tool switched off in the permissions', () => {
it('resolves to blocked, which is not auto, so the approval path alone would ask for it', () => {
expect(resolveApprovalLevel('shell_execute', { categoryLevel: 'blocked', codexMode: null, readOnlyRun: false })).toBe('blocked')
- expect(agent).toMatch(/const needsApproval = permLevel !== 'auto' \|\| cloudShellConfirm/)
+ expect(agent).toMatch(/const needsApproval = \(permLevel !== 'auto' \|\| cloudShellConfirm\)/)
})
it('is filtered out and refused before any card is built', () => {