Switch Hermes prompt workflow to plain-text Style/Lyrics paste blocks

This commit is contained in:
Troll (Hermes Agent) 2026-07-31 21:30:56 +00:00
parent f3d81832d5
commit 665a7e5655

View file

@ -53,12 +53,18 @@ pre{background:#111827;padding:.8rem;border-radius:.5rem;overflow:auto;white-spa
<div class="section">
<h2>1. Generate Suno Prompt</h2>
<button type="button" onclick="copyPromptForHermes()">Copy customer info for Hermes</button>
<p class="copy-hint">Paste the result from Hermes into the box below, then click Apply to fill Style and Lyrics.</p>
<label for="hermes_json">Paste Hermes JSON result here</label>
<textarea id="hermes_json" rows="6" placeholder='{"title": "...", "style": "...", "lyrics": "..."}'></textarea>
<p class="copy-hint">Paste the Style block and Lyrics block from Hermes into the boxes below, then click Apply.</p>
<label for="pasted_style">Paste Style block here</label>
<textarea id="pasted_style" rows="6" placeholder="Everything under 'Style:'"></textarea>
<label for="pasted_lyrics">Paste Lyrics block here</label>
<textarea id="pasted_lyrics" rows="10" placeholder="Everything under 'Lyrics:'"></textarea>
<div class="actions">
<button type="button" class="secondary" onclick="applyHermesJson()">Apply JSON to fields</button>
<button type="button" class="secondary" onclick="applyPastedBlocks()">Apply to fields</button>
</div>
<form method="POST">
<input type="hidden" name="action" value="save_prompt">
<label for="suno_style">Suno Style</label>
@ -121,31 +127,24 @@ function copyPromptForHermes() {
style_genre: {{ req.style_genre | tojson }},
extra_requests: {{ req.extra_requests | tojson }}
};
const text = "Please write a Suno Custom Mode prompt for this customer. Return ONLY a JSON object with keys: title, style, lyrics.\n\nCustomer data:\n" + JSON.stringify(data, null, 2);
navigator.clipboard.writeText(text).then(() => alert("Copied! Paste into Hermes, then paste Hermes JSON result into the box above and click Apply."));
const text = `Please write a Suno Custom Mode prompt for this customer.\n\nCustomer data:\nName: ${data.name}\nHobbies: ${data.hobbies || '-'}\nNotable facts: ${data.notable_facts || '-'}\nStyle / genre: ${data.style_genre || '-'}\nExtra requests: ${data.extra_requests || '-'}\n\nReply with exactly this format (no JSON):\n\nStyle:\n[the style description here]\n\nLyrics:\n[the lyrics here, with metatags]`;
navigator.clipboard.writeText(text).then(() => alert("Copied! Paste Hermes response into the Style and Lyrics boxes, then click Apply."));
}
function applyHermesJson() {
const raw = document.getElementById('hermes_json').value.trim();
if (!raw) {
alert("Paste Hermes JSON first.");
function applyPastedBlocks() {
const styleBlock = document.getElementById('pasted_style').value.trim();
const lyricsBlock = document.getElementById('pasted_lyrics').value.trim();
if (!styleBlock && !lyricsBlock) {
alert("Paste Style and/or Lyrics first.");
return;
}
try {
const parsed = JSON.parse(raw);
if (parsed.style) {
document.getElementById('suno_style').value = parsed.style;
if (styleBlock) {
document.getElementById('suno_style').value = styleBlock;
}
if (parsed.lyrics) {
document.getElementById('suno_lyrics').value = parsed.lyrics;
}
const msg = [];
if (parsed.title) msg.push('Title: ' + parsed.title);
msg.push('Style and lyrics applied.');
alert(msg.join('\n'));
} catch (e) {
alert("Invalid JSON: " + e.message);
if (lyricsBlock) {
document.getElementById('suno_lyrics').value = lyricsBlock;
}
alert("Style and lyrics applied.");
}
</script>
</div>