frontend-guardian 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -351,7 +351,7 @@ const DEFAULT_SUGGEST_API = "https://frontend-guardian.vercel.app/api/suggest";
|
|
|
351
351
|
async function getGeminiSuggestion(apiKey, issueTitle, detected) {
|
|
352
352
|
const ai = new GoogleGenAI({ apiKey });
|
|
353
353
|
const prompt = `Frontend Guardian found this issue: "${issueTitle}". Detected: ${detected.slice(0, 500)}. Give a brief concrete fix suggestion in 1-2 sentences. No preamble.`;
|
|
354
|
-
const res = await ai.models.generateContent({ model: "gemini-
|
|
354
|
+
const res = await ai.models.generateContent({ model: "gemini-2.0-flash", contents: prompt });
|
|
355
355
|
const r = res;
|
|
356
356
|
const text = typeof r?.text === "string" ? r.text : r?.candidates?.[0]?.content?.parts?.find((p) => typeof p?.text === "string")?.text ?? "";
|
|
357
357
|
return text.trim();
|