diff --git a/public/index.html b/public/index.html
index 341ba4131..c7bf3d727 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1357,7 +1357,7 @@
-
Main
+
NSFW
diff --git a/public/scripts/PromptManager.js b/public/scripts/PromptManager.js
index e352bdf61..93a2d4766 100644
--- a/public/scripts/PromptManager.js
+++ b/public/scripts/PromptManager.js
@@ -159,6 +159,11 @@ function PromptManagerModule() {
jailbreak: '',
enhanceDefinitions: ''
},
+ quickEdit: {
+ main: '',
+ nsfw: '',
+ jailbreak: ''
+ }
};
// Chatcompletion configuration object
@@ -327,15 +332,15 @@ PromptManagerModule.prototype.init = function (moduleConfiguration, serviceSetti
}
const mainPrompt = this.getPromptById('main');
- const mainPromptTextarea = document.getElementById('main_prompt_quick_edit_textarea');
+ const mainPromptTextarea = document.getElementById(this.configuration.quickEdit.main);
const mainQuickEdit = createQuickEdit().from(mainPromptTextarea, mainPrompt);
const nsfwPrompt = this.getPromptById('nsfw');
- const nsfwPromptTextarea = document.getElementById('nsfw_prompt_quick_edit_textarea');
+ const nsfwPromptTextarea = document.getElementById(this.configuration.quickEdit.nsfw);
const nsfwQuickEdit = createQuickEdit().from(nsfwPromptTextarea, nsfwPrompt);
const jailbreakPrompt = this.getPromptById('jailbreak');
- const jailbreakPromptTextarea = document.getElementById('jailbreak_prompt_quick_edit_textarea');
+ const jailbreakPromptTextarea = document.getElementById(this.configuration.quickEdit.jailbreak);
const jailbreakQuickEdit = createQuickEdit().from(jailbreakPromptTextarea, jailbreakPrompt);
// Save prompt edit form to settings and close form.
diff --git a/public/scripts/openai.js b/public/scripts/openai.js
index 50e421586..fbb979105 100644
--- a/public/scripts/openai.js
+++ b/public/scripts/openai.js
@@ -348,6 +348,11 @@ function setupChatCompletionPromptManager(openAiSettings) {
jailbreak: default_jailbreak_prompt,
enhanceDefinitions: default_enhance_definitions_prompt
},
+ quickEdit: {
+ main: 'main_prompt_quick_edit_textarea',
+ nsfw: 'nsfw_prompt_quick_edit_textarea',
+ jailbreak: 'jailbreak_prompt_quick_edit_textarea'
+ }
};
promptManager.saveServiceSettings = () => {