From 2c7b233bcaaecd47dfab903a664008e5536cc16e Mon Sep 17 00:00:00 2001 From: Gemini AI Date: Sun, 28 Dec 2025 02:51:53 +0400 Subject: [PATCH] feat(google-ads): Add 'Special Instructions' support - Users can now provide custom preferences (tone, focus, etc.) for AI generation - Added 'Special Instructions' field to Google Ads Generator UI (below Target Audience) - Localized labels and placeholders in English, Russian, and Hebrew - Integrated instructions into AI prompts across Ollama, Qwen, and Z.AI providers --- components/GoogleAdsGenerator.tsx | 20 +++++++++++++++++--- lib/i18n/translations.ts | 6 ++++++ lib/services/model-adapter.ts | 4 +++- lib/services/ollama-cloud.ts | 7 ++++++- lib/services/qwen-oauth.ts | 7 ++++++- lib/services/zai-plan.ts | 7 ++++++- 6 files changed, 44 insertions(+), 7 deletions(-) diff --git a/components/GoogleAdsGenerator.tsx b/components/GoogleAdsGenerator.tsx index 4f165bf..ed2ea49 100644 --- a/components/GoogleAdsGenerator.tsx +++ b/components/GoogleAdsGenerator.tsx @@ -43,6 +43,7 @@ export default function GoogleAdsGenerator() { const [budgetMax, setBudgetMax] = useState("2000"); const [duration, setDuration] = useState("30 days"); const [industry, setIndustry] = useState(""); + const [specialInstructions, setSpecialInstructions] = useState(""); const [copied, setCopied] = useState(false); const [expandedSections, setExpandedSections] = useState(["keywords"]); @@ -193,7 +194,9 @@ export default function GoogleAdsGenerator() { budgetRange: { min: parseInt(budgetMin), max: parseInt(budgetMax), currency: "USD" }, campaignDuration: duration, industry, - language: "English" + competitors: [], + language: language === "ru" ? "Russian" : language === "he" ? "Hebrew" : "English", + specialInstructions: specialInstructions, }, selectedProvider, selectedModel); console.log("[GoogleAdsGenerator] Generation result:", result); @@ -282,8 +285,9 @@ export default function GoogleAdsGenerator() { const result = await modelAdapter.generateMagicWand( websiteUrl, - productString, - parseInt(budgetMax), + firstProduct.url ? `${firstProduct.name} (URL: ${firstProduct.url})` : firstProduct.name, + Number(budgetMax), + specialInstructions, selectedProvider, selectedModel ); @@ -896,6 +900,16 @@ export default function GoogleAdsGenerator() { /> +
+ +