Merge branch 'staging' into role-icons-for-PM

This commit is contained in:
Cohee 2024-12-31 14:37:08 +02:00
commit d58f471cc3
3 changed files with 3 additions and 2 deletions

View File

@ -91,6 +91,7 @@ module.exports = {
'space-infix-ops': 'error',
'no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
'no-cond-assign': 'error',
'no-unneeded-ternary': 'error',
// These rules should eventually be enabled.
'no-async-promise-executor': 'off',

View File

@ -440,7 +440,7 @@ async function onChatChanged() {
const context = getContext();
// Disable the chara note if in a group
$('#extension_floating_chara').prop('disabled', context.groupId ? true : false);
$('#extension_floating_chara').prop('disabled', !!context.groupId);
const tokenCounter1 = chat_metadata[metadata_keys.prompt] ? await getTokenCountAsync(chat_metadata[metadata_keys.prompt]) : 0;
$('#extension_floating_prompt_token_counter').text(tokenCounter1);

View File

@ -4681,7 +4681,7 @@ function convertCharacterBook(characterBook) {
preventRecursion: entry.extensions?.prevent_recursion ?? false,
delayUntilRecursion: entry.extensions?.delay_until_recursion ?? false,
disable: !entry.enabled,
addMemo: entry.comment ? true : false,
addMemo: !!entry.comment,
displayIndex: entry.extensions?.display_index ?? index,
probability: entry.extensions?.probability ?? 100,
useProbability: entry.extensions?.useProbability ?? true,