Close and clear popup on preset change
This commit is contained in:
parent
db8624cefe
commit
fd10eaf037
|
@ -161,7 +161,7 @@ import { context_settings, loadContextTemplatesFromSettings } from "./scripts/co
|
|||
import { markdownExclusionExt } from "./scripts/showdown-exclusion.js";
|
||||
import { NOTE_MODULE_NAME, metadata_keys, setFloatingPrompt, shouldWIAddPrompt } from "./scripts/authors-note.js";
|
||||
import { deviceInfo } from "./scripts/RossAscends-mods.js";
|
||||
import {registerPromptManagerMigration} from "./scripts/PromptManager.js";
|
||||
import { registerPromptManagerMigration } from "./scripts/PromptManager.js";
|
||||
import { getRegexedString, regex_placement } from "./scripts/extensions/regex/engine.js";
|
||||
|
||||
//exporting functions and vars for mods
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in New Issue