Auto-deploy: 2026-08-05 16:17:53
This commit is contained in:
+7
-3
@@ -36,8 +36,12 @@ async function handleGeminiRequest({ apiKey, prompt, tab, action = 'generateText
|
||||
throw new Error('Daily limit reached (1,000 requests). Resets at midnight PT.');
|
||||
}
|
||||
|
||||
// Truncate text — 12k chars to fit list_analysis prompts
|
||||
const maxChars = 12000;
|
||||
// Safety valve only. Prompts already cap the job description at the source,
|
||||
// because truncating here removes the END of the prompt — which is where the
|
||||
// job posting and the required output format sit. Gemini's context window is
|
||||
// far larger than this; the limit exists to catch runaway input, not to shape
|
||||
// normal requests.
|
||||
const maxChars = 60000;
|
||||
const trimmedPrompt = prompt && prompt.length > maxChars
|
||||
? prompt.substring(0, maxChars) + '\n\n[Truncated]'
|
||||
: prompt;
|
||||
@@ -70,7 +74,7 @@ async function handleGeminiRequest({ apiKey, prompt, tab, action = 'generateText
|
||||
if (action === 'generatePdf') {
|
||||
if (!data.pdf) throw new Error('Empty PDF response from server.');
|
||||
await incrementUsage();
|
||||
return { pdf: data.pdf, filename: data.filename, fromCache: false };
|
||||
return { pdf: data.pdf, filename: data.filename, ats: data.ats || null, fromCache: false };
|
||||
} else if (action === 'generateComment') {
|
||||
const comment = data.comment;
|
||||
if (!comment) {
|
||||
|
||||
Reference in New Issue
Block a user