Only show T-Shirt Compositor and garment controls when product is a T-Shirt

This commit is contained in:
airent106 committed 2026-10-29 12:14:13 -06:00
1 parent 6c6867b49c
commit ff0fe0990e
3 files changed
+124 -25

No files matched your search

+13 -4
View File
@@ -321,18 +321,27 @@ export async function generateNameSuggestions({
userBackground = DEFAULT_USER_BACKGROUND,
geminiApiKey = ""
}) {
const ideaTextBlob = [idea.title || "", idea.elevator_pitch || "", ...(idea.tags || [])].join(" ");
const isTShirt = /\b(t-?shirt|tee\b|shirt|apparel|crewneck|garment|hoodie|merch|wearable)\b/i.test(ideaTextBlob);
const angleGuidance = isTShirt
? "Generate 6 distinct, memorable name/title suggestions for this apparel/t-shirt idea across different naming angles (e.g., Vintage Club/Crest, Punchy Brand Name, Witty/Clever, Minimalist, Screenprint Headline + Sub-tagline, Outfitter Badge)."
: "Generate 6 distinct, memorable name/title suggestions for this idea across different naming angles (e.g., Punchy Brand Name, Maker/Project Codename, Witty/Clever, Minimalist Editorial, Descriptive Product Name, Bold Hook). Do NOT frame it as a t-shirt or apparel slogan.";
const prompt = [
"You are a sharp creative director, brand namer, and apparel/product copywriter.",
"You are a sharp creative director, product namer, and brand strategist.",
`IDEA TO NAME:\n- Current Title: ${idea.title}\n- Elevator Pitch: ${idea.elevator_pitch || ""}\n- Category: ${idea.category}\n- Tags: ${(idea.tags || []).join(", ")}\n- Notes: ${(idea.notes_markdown || "").slice(0, 600)}`,
`USER BACKGROUND & TASTES:\n${userBackground || DEFAULT_USER_BACKGROUND}`,
"Generate 6 distinct, memorable name/title suggestions for this idea across different naming angles (e.g., Vintage Club/Crest, Punchy Brand Name, Witty/Clever, Minimalist, Screenprint Headline + Sub-tagline, Maker/Project Codename).",
angleGuidance,
"Do NOT run any shell commands or tools. Reply ONLY with a single raw JSON object (no markdown fences) matching this exact schema:",
JSON.stringify({
suggestions: [
{
name: "Suggested Idea Title or Brand Name",
tagline: "Short punchy subtitle, est. line, or one-line hook",
style: "Angle badge (e.g. Vintage Club, Punchy Brand, Witty, Minimalist, Tee Slogan, Codename)"
tagline: "Short punchy subtitle or one-line hook",
style: isTShirt
? "Angle badge (e.g. Vintage Club, Punchy Brand, Witty, Minimalist, Tee Slogan, Outfitter)"
: "Angle badge (e.g. Punchy Brand, Codename, Witty, Minimalist, Product Name, Bold Hook)"
}
]
})