mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-15 11:30:09 +01:00
Update quick edit when oai preset changes
This commit is contained in:
parent
48992d4f53
commit
1ea7ad2572
@ -551,31 +551,9 @@ PromptManagerModule.prototype.init = function (moduleConfiguration, serviceSetti
|
||||
eventSource.on(event_types.MESSAGE_RECEIVED, () => this.renderDebounced());
|
||||
|
||||
// Re-render when chatcompletion settings change
|
||||
eventSource.on(event_types.CHATCOMPLETION_SOURCE_CHANGED, () => {
|
||||
this.renderDebounced();
|
||||
eventSource.on(event_types.CHATCOMPLETION_SOURCE_CHANGED, () => this.renderDebounced());
|
||||
|
||||
const mainPrompt = this.getPromptById('main');
|
||||
this.updateQuickEdit('main', mainPrompt);
|
||||
|
||||
const nsfwPrompt = this.getPromptById('nsfw');
|
||||
this.updateQuickEdit('nsfw', nsfwPrompt);
|
||||
|
||||
const jailbreakPrompt = this.getPromptById('jailbreak');
|
||||
this.updateQuickEdit('jailbreak', jailbreakPrompt);
|
||||
});
|
||||
|
||||
eventSource.on(event_types.CHATCOMPLETION_MODEL_CHANGED, () => {
|
||||
this.renderDebounced();
|
||||
|
||||
const mainPrompt = this.getPromptById('main');
|
||||
this.updateQuickEdit('main', mainPrompt);
|
||||
|
||||
const nsfwPrompt = this.getPromptById('nsfw');
|
||||
this.updateQuickEdit('nsfw', nsfwPrompt);
|
||||
|
||||
const jailbreakPrompt = this.getPromptById('jailbreak');
|
||||
this.updateQuickEdit('jailbreak', jailbreakPrompt);
|
||||
});
|
||||
eventSource.on(event_types.CHATCOMPLETION_MODEL_CHANGED, () => this.renderDebounced());
|
||||
|
||||
// Re-render when the character changes.
|
||||
eventSource.on('chatLoaded', (event) => {
|
||||
@ -632,6 +610,15 @@ PromptManagerModule.prototype.init = function (moduleConfiguration, serviceSetti
|
||||
this.hidePopup();
|
||||
this.clearEditForm();
|
||||
this.renderDebounced();
|
||||
|
||||
const mainPrompt = this.getPromptById('main');
|
||||
this.updateQuickEdit('main', mainPrompt);
|
||||
|
||||
const nsfwPrompt = this.getPromptById('nsfw');
|
||||
this.updateQuickEdit('nsfw', nsfwPrompt);
|
||||
|
||||
const jailbreakPrompt = this.getPromptById('jailbreak');
|
||||
this.updateQuickEdit('jailbreak', jailbreakPrompt);
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user