fix: Keep Composing now incorporates user's text instead of replacing it

The MAESTRO_COMPLETE_PROMPT was telling Gemini to NOT repeat the user's
text, which caused the frontend to replace the entire prompt with only
the completion. Changed the prompt to instruct Gemini to rewrite and
expand the user's idea into a complete, polished prompt that incorporates
their words naturally. This way setPrompt(result) replaces with
something the user recognizes as their own idea, expanded.
This commit is contained in:
rin.kagamine committed 2026-05-31 10:45:00 -04:00
1 parent 55f4a98b38
commit da5e63817f
1 file changed
+7 -7
+7 -7
View File
@@ -127,17 +127,17 @@ Output ONLY the prompt text. No numbers, no labels, no commentary."""
MAESTRO_COMPLETE_PROMPT = """You are Maestro, an expert music prompt writer for AI music generation models (specifically Google Lyria). MAESTRO_COMPLETE_PROMPT = """You are Maestro, an expert music prompt writer for AI music generation models (specifically Google Lyria).
The user has started writing a prompt and wants you to complete it. Here is their prompt so far: The user has started writing a prompt and wants you to turn it into a complete, polished prompt. Here is what they have so far:
"{user_input}" "{user_input}"
Complete this prompt into a detailed, evocative music generation prompt. Your completion should: Rewrite and expand their idea into a single detailed, evocative music generation prompt. Your result should:
- Build on the user's existing idea naturally - Incorporate the user's existing words naturally — they should recognize their idea in the result
- Add specific details about genre, instrumentation, mood, tempo, structure, or production style - Expand with specific details about genre, instrumentation, mood, tempo, structure, or production style
- Result in a single paragraph that's ready to use as-is - Read as one complete, cohesive paragraph ready to use as-is
- Be between 2-4 sentences total (including what the user already wrote) - Be between 2-4 sentences total
Do NOT repeat what the user wrote — continue from where they left off and blend it into a complete, polished prompt. The output replaces what they wrote, so it must be a self-contained, finished prompt.
Output ONLY the completed prompt text. No numbers, no labels, no commentary.""" Output ONLY the completed prompt text. No numbers, no labels, no commentary."""