tuna-agent 0.1.79 → 0.1.80
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.
|
@@ -113,21 +113,47 @@ export async function handleGenerateIdeas(ws, code, taskId, topic, styleName, st
|
|
|
113
113
|
? `- Titles must be in Vietnamese, natural and engaging`
|
|
114
114
|
: `- Titles must be in English, natural and engaging`;
|
|
115
115
|
const n = count && count > 0 ? count : 10;
|
|
116
|
-
|
|
117
|
-
`Generate exactly ${n} viral YouTube Shorts video ideas for the topic: "${topic}".`,
|
|
118
|
-
``,
|
|
119
|
-
`Requirements:`,
|
|
120
|
-
`- Each idea is a catchy, scroll-stopping video title`,
|
|
121
|
-
`- Use proven viral patterns: POV, "X điều...", plot twist, emotional hook, controversial take`,
|
|
122
|
-
langReq,
|
|
123
|
-
`- Mix different angles/formats for variety`,
|
|
124
|
-
...(styleName ? [`- Ideas must fit the "${styleName}" video style${styleDesc ? ` (${styleDesc})` : ''}`] : []),
|
|
125
|
-
];
|
|
116
|
+
let promptParts;
|
|
126
117
|
if (appContext) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
118
|
+
// UGC app promo — personal story ideas, NOT generic viral titles
|
|
119
|
+
const featureFocus = appContext.isWholeApp
|
|
120
|
+
? `the entire app "${appContext.appName}"`
|
|
121
|
+
: appContext.features.length > 0
|
|
122
|
+
? `these features of "${appContext.appName}": ${appContext.features.join(', ')}`
|
|
123
|
+
: `the app "${appContext.appName}"`;
|
|
124
|
+
promptParts = [
|
|
125
|
+
`Generate exactly ${n} UGC (User Generated Content) video ideas promoting ${featureFocus}.`,
|
|
126
|
+
``,
|
|
127
|
+
`Each idea must be a SHORT SCENARIO DESCRIPTION (1-2 sentences) that includes:`,
|
|
128
|
+
`- A relatable problem/situation the user faces`,
|
|
129
|
+
`- How the app/feature solves it`,
|
|
130
|
+
`- The emotional angle (surprise, relief, excitement)`,
|
|
131
|
+
``,
|
|
132
|
+
`Example ideas:`,
|
|
133
|
+
`- "Mình đang diet mà không biết tô phở bao nhiêu calo, scan thử và bất ngờ vì kết quả"`,
|
|
134
|
+
`- "Mỗi ngày ghi lại bữa ăn bằng app này, sau 30 ngày nhìn lại thói quen ăn uống thay đổi hẳn"`,
|
|
135
|
+
``,
|
|
136
|
+
`Rules:`,
|
|
137
|
+
langReq,
|
|
138
|
+
`- Frame as a PERSONAL STORY — "I was struggling with X until..." NOT "App Y has feature Z"`,
|
|
139
|
+
`- Each idea = ONE specific use case, not a feature list`,
|
|
140
|
+
`- Tone: conversational, like telling a friend — NOT a product pitch`,
|
|
141
|
+
`- Mix different angles: problem→solution, before→after, surprise discovery, daily routine`,
|
|
142
|
+
...(styleName ? [`- Style: "${styleName}"${styleDesc ? ` (${styleDesc})` : ''}`] : []),
|
|
143
|
+
];
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
// Generic viral ideas
|
|
147
|
+
promptParts = [
|
|
148
|
+
`Generate exactly ${n} viral YouTube Shorts video ideas for the topic: "${topic}".`,
|
|
149
|
+
``,
|
|
150
|
+
`Requirements:`,
|
|
151
|
+
`- Each idea is a catchy, scroll-stopping video title`,
|
|
152
|
+
`- Use proven viral patterns: POV, "X điều...", plot twist, emotional hook, controversial take`,
|
|
153
|
+
langReq,
|
|
154
|
+
`- Mix different angles/formats for variety`,
|
|
155
|
+
...(styleName ? [`- Ideas must fit the "${styleName}" video style${styleDesc ? ` (${styleDesc})` : ''}`] : []),
|
|
156
|
+
];
|
|
131
157
|
}
|
|
132
158
|
promptParts.push(``, `Respond with ONLY a JSON array of ${n} strings. No explanation, no markdown, no wrapping.`, `Example format: ["title 1","title 2","title 3","title 4","title 5"]`);
|
|
133
159
|
const prompt = promptParts.join('\n');
|