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: two source guards follow D4 and C44

purple88498e5bc8bb
diff --git a/src/hooks/__tests__/useCodex-loop-detection.test.ts b/src/hooks/__tests__/useCodex-loop-detection.test.ts
index e425fee4..88f80ef2 100644
--- a/src/hooks/__tests__/useCodex-loop-detection.test.ts
+++ b/src/hooks/__tests__/useCodex-loop-detection.test.ts
@@ -21,7 +21,8 @@ const src = readFileSync(join(__dirname, '../useCodex.ts'), 'utf8')
describe('useCodex loop-detector (Bug #5 → AgentLoopGuard)', () => {
it('instantiates the shared AgentLoopGuard for the run', () => {
- expect(src).toMatch(/new AgentLoopGuard\(\)/)
+ // C44: built with the Settings switch (on unless switched off).
+ expect(src).toMatch(/new AgentLoopGuard\(\{ enabled: useSettingsStore\.getState\(\)\.settings\.agentLoopGuard !== false \}\)/)
expect(src).toContain("from '../lib/agent-loop-guard'")
})
diff --git a/src/lib/render/__tests__/data-url-fetch-guard.test.ts b/src/lib/render/__tests__/data-url-fetch-guard.test.ts
index 0dedcd81..0f21fbda 100644
--- a/src/lib/render/__tests__/data-url-fetch-guard.test.ts
+++ b/src/lib/render/__tests__/data-url-fetch-guard.test.ts
@@ -22,10 +22,9 @@ const SERVER_ONLY: Record<string, Record<string, string>> = {
'api/cloud/memory-sync.ts': { '`${CLOUD_BASE}${path}${suffix}`': 'the cloud API' },
'api/comfyui.ts': { "comfyuiUrl('/upload/image')": 'the local image engine' },
'api/discover.ts': { url: 'model catalogue pages' },
- 'api/vram-handoff.ts': {
- url: 'an http(s) address or a /view address of the local image engine',
- "getImageUrl(name, '', 'input')": 'a /view address of the local image engine, its input folder',
- },
+ // D4: a file of the local image engine goes through the proxy now; only a
+ // web address the call named itself is fetched by the browser.
+ 'api/vram-handoff.ts': { url: 'an http(s) address the call named, never a file of the local image engine' },
'lib/backend-detector.ts': { url: 'probes of local server ports' },
'hooks/useCloudCreate.ts': { 'vj.result_url': 'signed result URL of a cloud job', 'src.result_url': 'signed result URL of a cloud job' },
'components/create/experimental/PresetWorkshop.tsx': { 'fresh.result_url': 'signed result URL of a cloud job' },