Persist settings before applying preset
This commit is contained in:
parent
61b645f5ff
commit
8f830a0928
|
@ -571,12 +571,13 @@ PromptManagerModule.prototype.init = function (moduleConfiguration, serviceSetti
|
||||||
document.getElementById(this.configuration.prefix + 'prompt_manager_popup_close_button').addEventListener('click', closeAndClearPopup);
|
document.getElementById(this.configuration.prefix + 'prompt_manager_popup_close_button').addEventListener('click', closeAndClearPopup);
|
||||||
|
|
||||||
// Re-render prompt manager on openai preset change
|
// Re-render prompt manager on openai preset change
|
||||||
eventSource.on(event_types.OAI_PRESET_CHANGED, settings => this.renderDebounced());
|
eventSource.on(event_types.OAI_PRESET_CHANGED, settings => {
|
||||||
|
// Save configuration and wrap everything up.
|
||||||
// Close popup on preset change
|
this.saveServiceSettings().then(() => {
|
||||||
eventSource.on(event_types.OAI_PRESET_CHANGED, () => {
|
|
||||||
this.hidePopup();
|
this.hidePopup();
|
||||||
this.clearEditForm();
|
this.clearEditForm();
|
||||||
|
this.renderDebounced()
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Re-render prompt manager on world settings update
|
// Re-render prompt manager on world settings update
|
||||||
|
|
Loading…
Reference in New Issue