mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-09 08:38:53 +01:00
Allow setting unnamed persona names with a tick button
This commit is contained in:
parent
03bb911ee7
commit
435821348a
@ -473,12 +473,18 @@ export function autoSelectPersona(name) {
|
||||
async function updatePersonaNameIfExists(avatarId, newName) {
|
||||
if (avatarId in power_user.personas) {
|
||||
power_user.personas[avatarId] = newName;
|
||||
await getUserAvatars(true, avatarId);
|
||||
saveSettingsDebounced();
|
||||
console.log(`Updated persona name for ${avatarId} to ${newName}`);
|
||||
} else {
|
||||
console.log(`Persona name ${avatarId} was not updated because it does not exist`);
|
||||
power_user.personas[avatarId] = newName;
|
||||
power_user.persona_descriptions[avatarId] = {
|
||||
description: '',
|
||||
position: persona_description_positions.IN_PROMPT,
|
||||
};
|
||||
console.log(`Created persona name for ${avatarId} as ${newName}`);
|
||||
}
|
||||
|
||||
await getUserAvatars(true, avatarId);
|
||||
saveSettingsDebounced();
|
||||
}
|
||||
|
||||
async function bindUserNameToPersona(e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user