Open-source AI browser agent for Chrome and Firefox (monorepo) ðŸ§
JavaScript ai-agentai-agentsai-toolsbrowser-aibrowser-automationbrowser-extensionchrome-aichrome-devtoolschrome-extensionchrome-extensionsfirefox-addonfirefox-addonsfirefox-extensionfirefox-extensionsgemmagemma4minimaxoffline-aioffline-llmqwen
Stop failed image diagnostics before history checks
Barack Sokullue933dafb2fc3
diff --git a/scripts/check-bonsai-webgpu.mjs b/scripts/check-bonsai-webgpu.mjsindex 8bfb2b11c..e2d07956f 100644--- a/scripts/check-bonsai-webgpu.mjs+++ b/scripts/check-bonsai-webgpu.mjs@@ -229,6 +229,9 @@ try {if (!ocr && !new RegExp(shape, 'i').test(answer.content)) imageFailures.push(`${color}: wrong image shape (expected ${shape})`);history.push(message, { role: 'assistant', content: answer.content });}+ // A failed image answer already fails the run; do not spend another+ // long prefill asking the model to repeat its incorrect earlier answer.+ assert.deepEqual(imageFailures, [], 'Image checks failed');if (args.includes('--image-history')) {const answer = await chat('image-history', [...history, { role: 'user', content: ocr? 'Repeat only the color and four-character code from the SECOND image.'