mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-04-02 05:10:14 +02: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());
|
eventSource.on(event_types.MESSAGE_RECEIVED, () => this.renderDebounced());
|
||||||
|
|
||||||
// Re-render when chatcompletion settings change
|
// Re-render when chatcompletion settings change
|
||||||
eventSource.on(event_types.CHATCOMPLETION_SOURCE_CHANGED, () => {
|
eventSource.on(event_types.CHATCOMPLETION_SOURCE_CHANGED, () => this.renderDebounced());
|
||||||
this.renderDebounced();
|
|
||||||
|
|
||||||
const mainPrompt = this.getPromptById('main');
|
eventSource.on(event_types.CHATCOMPLETION_MODEL_CHANGED, () => this.renderDebounced());
|
||||||
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);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Re-render when the character changes.
|
// Re-render when the character changes.
|
||||||
eventSource.on('chatLoaded', (event) => {
|
eventSource.on('chatLoaded', (event) => {
|
||||||
@ -632,6 +610,15 @@ PromptManagerModule.prototype.init = function (moduleConfiguration, serviceSetti
|
|||||||
this.hidePopup();
|
this.hidePopup();
|
||||||
this.clearEditForm();
|
this.clearEditForm();
|
||||||
this.renderDebounced();
|
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