Auto-deploy: 2026-09-17 20:03:51

This commit is contained in:
Hamza-Ayed
2026-09-17 20:03:51 +03:00
parent f9b9016c22
commit 6953139e92
10 changed files with 150 additions and 252 deletions
+3 -2
View File
@@ -33,7 +33,7 @@ async function handleGeminiRequest({ apiKey, prompt, tab, action = 'generateText
// Rate limit check
const canProceed = await checkRateLimit();
if (!canProceed) {
throw new Error('Daily limit reached (1,000 requests). Resets at midnight PT.');
throw new Error('Daily limit reached (1,000 requests). Resets at local midnight.');
}
// Safety valve only. Prompts already cap the job description at the source,
@@ -55,6 +55,7 @@ async function handleGeminiRequest({ apiKey, prompt, tab, action = 'generateText
try {
const response = await fetch('https://cv.intaleqapp.com/cv/server/generate_cv.php', {
signal: AbortSignal.timeout(120000),
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
@@ -107,7 +108,7 @@ async function handleGeminiRequest({ apiKey, prompt, tab, action = 'generateText
const status = response.status;
const errData = await response.json().catch(() => ({}));
const errMsg = errData.error?.message || '';
const errMsg = typeof errData.error === 'string' ? errData.error : (errData.error?.message || '');
if (status === 429 || status === 503) {
lastError = `API quota limit (${status}): ${errMsg || 'Too many tokens'}. Waiting before retry...`;