Close and clear popup on preset change

This commit is contained in:
maver
2023-08-01 18:21:27 +02:00
parent db8624cefe
commit fd10eaf037
2 changed files with 7 additions and 1 deletions

View File

@ -553,6 +553,12 @@ PromptManagerModule.prototype.init = function (moduleConfiguration, serviceSetti
// Re-render prompt manager on openai preset change
eventSource.on(event_types.OAI_PRESET_CHANGED, settings => this.render());
// Close popup on preset change
eventSource.on(event_types.OAI_PRESET_CHANGED, () => {
this.hidePopup();
this.clearEditForm();
});
// Re-render prompt manager on world settings update
eventSource.on(event_types.WORLDINFO_SETTINGS_UPDATED, () => this.render());