Render prompt manager when chat history is altered

Recounts tokens
This commit is contained in:
maver 2023-08-05 17:50:55 +02:00
parent d9e7eba617
commit 1281417a97
1 changed files with 5 additions and 0 deletions

View File

@ -502,6 +502,11 @@ PromptManagerModule.prototype.init = function (moduleConfiguration, serviceSetti
});
}
// Re-render when chat history changes.
eventSource.on(event_types.MESSAGE_DELETED, () => this.render());
eventSource.on(event_types.MESSAGE_EDITED, () => this.render());
eventSource.on(event_types.MESSAGE_RECEIVED, () => this.render())
// Re-render when the character changes.
eventSource.on('chatLoaded', (event) => {
this.handleCharacterSelected(event)