Add a token counter for persona descriptions

This commit is contained in:
Cohee
2023-08-22 18:32:18 +03:00
parent ea4d4a8fd6
commit 042c0b84a1
4 changed files with 24 additions and 5 deletions

View File

@@ -197,7 +197,7 @@ export function RA_CountCharTokens() {
$('[data-token-counter]').each(function () {
const counter = $(this);
const input = $(document.getElementById(counter.data('token-counter')));
const value = input.val();
const value = String(input.val());
if (input.length === 0) {
counter.text('Invalid input reference');