diff --git a/public/scripts/extensions/connection-manager/index.js b/public/scripts/extensions/connection-manager/index.js index fbcf69c7f..34c79205a 100644 --- a/public/scripts/extensions/connection-manager/index.js +++ b/public/scripts/extensions/connection-manager/index.js @@ -40,6 +40,7 @@ const CC_COMMANDS = [ 'stop-strings', 'start-reply-with', 'reasoning-template', + 'prompt-post-processing', ]; const TC_COMMANDS = [ @@ -73,6 +74,7 @@ const FANCY_NAMES = { 'stop-strings': 'Custom Stopping Strings', 'start-reply-with': 'Start Reply With', 'reasoning-template': 'Reasoning Template', + 'prompt-post-processing': 'Prompt Post-Processing', }; /** diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index 58c4d8cad..eb11d5708 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -33,6 +33,7 @@ import { removeMacros, renameCharacter, saveChatConditional, + saveSettingsDebounced, sendMessageAsUser, sendSystemMessage, setActiveCharacter, @@ -2363,6 +2364,56 @@ export function initDefaultSlashCommands() { helpString: 'Copies the provided text to the OS clipboard. Returns an empty string.', })); + + const promptPostProcessingEnumProvider = () => Array + .from(document.getElementById('custom_prompt_post_processing').querySelectorAll('option')) + .map(option => new SlashCommandEnumValue(option.value || 'none', option.textContent, enumTypes.enum)); + SlashCommandParser.addCommandObject(SlashCommand.fromProps({ + name: 'prompt-post-processing', + aliases: ['ppp'], + helpString: ` +
/prompt-post-processing | /echo
/prompt-post-processing single