From d7aa7a349a14325f85f985fb9a26a13a09e40721 Mon Sep 17 00:00:00 2001
From: orfelorfel23
Date: Thu, 4 Jun 2026 13:48:26 +0200
Subject: [PATCH] fix: tool recommendation and lyrics text selection
---
server/prompts.mjs | 13 ++++++++-----
src/components/cards/VideoPromptsCard.tsx | 6 ++++++
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/server/prompts.mjs b/server/prompts.mjs
index d8f7686..10e3caa 100644
--- a/server/prompts.mjs
+++ b/server/prompts.mjs
@@ -33,15 +33,18 @@ REQUIRED JSON STRUCTURE:
"video_prompts": [
{
"type": "Abstract",
- "prompt": "short seamless loop, 16:9 aspect ratio. Abstract visuals: particles, fluid colors, geometric shapes, motion graphics. Specify: scene, camera angle, camera movement (slow pan/zoom/static), color palette (2-3 colors only), light source, motion quality. Must loop seamlessly (first frame = last frame). If using reverse playback, only use elements that make physical sense in reverse (e.g. pulsing light, expanding rings — NOT falling rain or rising smoke). Mood must match the song. Negative: text, watermark, logo, flash, abrupt cuts, camera shake, faces, hands, distortion, blur"
+ "prompt": "short seamless loop, 16:9 aspect ratio. Abstract visuals: particles, fluid colors, geometric shapes, motion graphics. Specify: scene, camera angle, camera movement (slow pan/zoom/static), color palette (2-3 colors only), light source, motion quality. Must loop seamlessly (first frame = last frame). If using reverse playback, only use elements that make physical sense in reverse (e.g. pulsing light, expanding rings — NOT falling rain or rising smoke). Mood must match the song. Negative: text, watermark, logo, flash, abrupt cuts, camera shake, faces, hands, distortion, blur",
+ "tool_recommendation": "Name of the BEST tool for this prompt from this list: {{VIDEO_TOOLS}}"
},
{
"type": "Cinematic",
- "prompt": "short seamless loop, 16:9 aspect ratio. Real-world environment: landscape, weather, architecture, nature. Specify: scene, camera angle, camera movement, color palette (2-3 colors), light source, motion quality. Loopable (first frame = last frame). If elements move (rain, wind, water, fire), they must move in a physically correct direction — do NOT suggest rain or smoke as reversible loops. Negative: text, watermark, logo, flash, abrupt cuts, camera shake, faces, hands, distortion, blur"
+ "prompt": "short seamless loop, 16:9 aspect ratio. Real-world environment: landscape, weather, architecture, nature. Specify: scene, camera angle, camera movement, color palette (2-3 colors), light source, motion quality. Loopable (first frame = last frame). If elements move (rain, wind, water, fire), they must move in a physically correct direction — do NOT suggest rain or smoke as reversible loops. Negative: text, watermark, logo, flash, abrupt cuts, camera shake, faces, hands, distortion, blur",
+ "tool_recommendation": "Name of the BEST tool for this prompt from this list: {{VIDEO_TOOLS}}"
},
{
"type": "Hybrid",
- "prompt": "short seamless loop, 16:9 aspect ratio. Blend of real and abstract: e.g. real environment with overlaid light effects, particle overlays on landscape, or a semi-abstract architectural scene. Loopable. Negative: text, watermark, logo, flash, abrupt cuts, camera shake, faces, hands, distortion, blur"
+ "prompt": "short seamless loop, 16:9 aspect ratio. Blend of real and abstract: e.g. real environment with overlaid light effects, particle overlays on landscape, or a semi-abstract architectural scene. Loopable. Negative: text, watermark, logo, flash, abrupt cuts, camera shake, faces, hands, distortion, blur",
+ "tool_recommendation": "Name of the BEST tool for this prompt from this list: {{VIDEO_TOOLS}}"
}
]
}
@@ -75,7 +78,7 @@ QUALITY CONSTRAINTS:
- style: comma-separated, max 120 words, include tempo + BPM range, never
name an artist, no "sounds like" phrases.
- video_prompts: short seamless loops, 16:9. Include the "Negative" line
- inside each prompt. Keep prompts under 900 characters.
+ inside each prompt. Keep prompts under 900 characters. Recommend a tool from: {{VIDEO_TOOLS}}.
- youtube_description: follow the hook → description → divider → lyrics →
divider → CTA → hashtags structure.`,
style_normal: `You are a Suno style-prompt generator.
@@ -179,7 +182,7 @@ export function buildUserMessage(req) {
req.context?.lyrics ?? '',
'',
'Selected passage to rewrite:',
- req.passage ?? '',
+ req.selected_text ?? '',
]
.filter((line) => line !== null)
.join('\n');
diff --git a/src/components/cards/VideoPromptsCard.tsx b/src/components/cards/VideoPromptsCard.tsx
index dca3987..05e1fdb 100644
--- a/src/components/cards/VideoPromptsCard.tsx
+++ b/src/components/cards/VideoPromptsCard.tsx
@@ -143,6 +143,12 @@ export function VideoPromptsCard({
+ {current.tool_recommendation && (
+
+ Recommended AI: {current.tool_recommendation}
+
+ )}
+
{links && links.length > 0 && (
{links.map((link, i) => (