Render prompt manager after swiping with updated tokens

Including world info and extension prompts
This commit is contained in:
maver
2023-06-24 19:55:39 +02:00
parent 2f4424e6c6
commit 28fa2f5f57
2 changed files with 22 additions and 4 deletions

View File

@ -610,6 +610,7 @@ function prepareOpenAIMessages({
}
} finally {
promptManager.populateTokenHandler(chatCompletion.getMessages());
promptManager.render(false);
}
const chat = chatCompletion.getChat();
@ -1075,6 +1076,10 @@ class TokenHandler {
return this.counts;
}
resetCounts() {
Object.keys(this.counts).forEach((key) => this.counts[key] = 0 );
}
setCounts(counts) {
this.counts = counts;
}