mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Allow disabling system marker prompts
This commit is contained in:
@ -721,6 +721,12 @@ PromptManagerModule.prototype.getTokenHandler = function () {
|
||||
return this.tokenHandler;
|
||||
}
|
||||
|
||||
PromptManagerModule.prototype.isPromptDisabledForActiveCharacter = function (identifier) {
|
||||
const promptOrderEntry = this.getPromptOrderEntry(this.activeCharacter, identifier);
|
||||
if (promptOrderEntry) return !promptOrderEntry.enabled;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a prompt to the current character's prompt list.
|
||||
* @param {object} prompt - The prompt to be added.
|
||||
@ -859,7 +865,8 @@ PromptManagerModule.prototype.isPromptEditAllowed = function (prompt) {
|
||||
* @returns {boolean} True if the prompt can be deleted, false otherwise.
|
||||
*/
|
||||
PromptManagerModule.prototype.isPromptToggleAllowed = function (prompt) {
|
||||
return prompt.marker ? false : !this.configuration.toggleDisabled.includes(prompt.identifier);
|
||||
const forceTogglePrompts = ['charDescription', 'charPersonality', 'scenario', 'personaDescription', 'worldInfoBefore', 'worldInfoAfter'];
|
||||
return prompt.marker && !forceTogglePrompts.includes(prompt.identifier) ? false : !this.configuration.toggleDisabled.includes(prompt.identifier);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user