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
This commit is contained in:
@@ -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<string[]>(["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() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<label className="text-xs lg:text-sm font-medium">{t.specialInstructions}</label>
|
||||
<Textarea
|
||||
placeholder={t.specialInstructionsPlaceholder}
|
||||
value={specialInstructions}
|
||||
onChange={(e) => setSpecialInstructions(e.target.value)}
|
||||
className="min-h-[80px] lg:min-h-[100px] resize-y text-sm"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{error && (
|
||||
<div className="rounded-md bg-destructive/10 p-2.5 lg:p-3 text-xs lg:text-sm text-destructive">
|
||||
{error}
|
||||
|
||||
Reference in New Issue
Block a user