Fix char A/N and expressions folder for first in the list

This commit is contained in:
Cohee 2025-02-28 09:12:22 +00:00
parent 2461913f85
commit 1aae08be5b
2 changed files with 3 additions and 3 deletions

View File

@ -299,7 +299,7 @@ function loadSettings() {
$('#extension_floating_role').val(chat_metadata[metadata_keys.role]);
$(`input[name="extension_floating_position"][value="${chat_metadata[metadata_keys.position]}"]`).prop('checked', true);
if (extension_settings.note.chara && getContext().characterId) {
if (extension_settings.note.chara && getContext().characterId !== undefined) {
const charaNote = extension_settings.note.chara.find((e) => e.name === getCharaFilename());
$('#extension_floating_chara').val(charaNote ? charaNote.prompt : '');
@ -446,7 +446,7 @@ async function onChatChanged() {
$('#extension_floating_prompt_token_counter').text(tokenCounter1);
let tokenCounter2;
if (extension_settings.note.chara && context.characterId) {
if (extension_settings.note.chara && context.characterId !== undefined) {
const charaNote = extension_settings.note.chara.find((e) => e.name === getCharaFilename());
if (charaNote) {

View File

@ -624,7 +624,7 @@ function getFolderNameByMessage(message) {
if (context.groupId) {
avatarPath = message.original_avatar || context.characters.find(x => message.force_avatar && message.force_avatar.includes(encodeURIComponent(x.avatar)))?.avatar;
}
else if (context.characterId) {
else if (context.characterId !== undefined) {
avatarPath = getCharaFilename();
}