diff --git a/public/css/mobile-styles.css b/public/css/mobile-styles.css index b5c58f969..2385ff9e1 100644 --- a/public/css/mobile-styles.css +++ b/public/css/mobile-styles.css @@ -161,6 +161,7 @@ } #showRawPrompt, + #copyPromptToClipboard, #groupCurrentMemberPopoutButton { display: none; } diff --git a/public/script.js b/public/script.js index ad9f7e9f2..c58ca50b1 100644 --- a/public/script.js +++ b/public/script.js @@ -2754,7 +2754,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, // Add quiet generation prompt at depth 0 if (quiet_prompt && quiet_prompt.length) { const name = name1; - const quietAppend = isInstruct ? formatInstructModeChat(name, quiet_prompt, false, true, '', name1, name2, false) : `\n${name}: ${quiet_prompt}`; + const quietAppend = isInstruct ? formatInstructModeChat(name, quiet_prompt, false, true, '', name1, name2, false) : `\n${quiet_prompt}`; lastMesString += quietAppend; // Bail out early return lastMesString; @@ -8018,6 +8018,18 @@ jQuery(async function () { } }) + $(document).on("pointerup", "#copyPromptToClipboard", function () { + let rawPrompt = itemizedPrompts[PromptArrayItemForRawPromptDisplay].rawPrompt; + let rawPromptValues = rawPrompt; + + if (Array.isArray(rawPrompt)) { + rawPromptValues = rawPrompt.map(x => x.content).join('\n'); + } + + navigator.clipboard.writeText(rawPromptValues); + toastr.info('Copied!', '', { timeOut: 2000 }); + }); + $(document).on("pointerup", "#showRawPrompt", function () { //console.log(itemizedPrompts[PromptArrayItemForRawPromptDisplay].rawPrompt); console.log(PromptArrayItemForRawPromptDisplay); diff --git a/public/scripts/templates/itemizationChat.html b/public/scripts/templates/itemizationChat.html index 12e25c94a..d5a8de41f 100644 --- a/public/scripts/templates/itemizationChat.html +++ b/public/scripts/templates/itemizationChat.html @@ -1,6 +1,7 @@