From 1b930f92be9ab4b15a71edaf6e82a85b2fbd9077 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Mon, 18 May 2026 00:00:24 +0300 Subject: [PATCH] Auto-deploy: 2026-05-18 00:00:24 --- content.js | 8 ++++++-- test_gemini.js | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 test_gemini.js diff --git a/content.js b/content.js index 4fdf824..319dd96 100644 --- a/content.js +++ b/content.js @@ -1054,12 +1054,16 @@ Brief honest assessment of this opportunity for my profile` headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ contents: [{ parts: [{ text: promptStr }] }], - generationConfig: { temperature: 0.1, responseMimeType: "application/json" } + generationConfig: { maxOutputTokens: 8192, temperature: 0.1 } }) } ); - if (!response.ok) throw new Error('API Request failed'); + if (!response.ok) { + const errData = await response.json().catch(() => ({})); + console.error('[LJA] API Error:', errData); + throw new Error('API Error: ' + (errData?.error?.message || response.status)); + } const data = await response.json(); if (!data.candidates || !data.candidates[0].content) { throw new Error('API blocked or returned empty response.'); diff --git a/test_gemini.js b/test_gemini.js new file mode 100644 index 0000000..e20e0d3 --- /dev/null +++ b/test_gemini.js @@ -0,0 +1,2 @@ +const fs = require('fs'); +const settings = JSON.parse(fs.readFileSync('/Users/hamzaaleghwairyeen/.gemini/antigravity/brain/1fc80e71-ad9e-4306-9d23-0fcef50f8b3e/scratch/settings.json', 'utf8').catch ? '{}' : '{}'); // wait, I don't have his API key here...