Change scenario override setup method

This commit is contained in:
Cohee 2023-10-25 19:44:46 +03:00
parent c2ba3a773a
commit f2d5196890
1 changed files with 3 additions and 4 deletions

View File

@ -5777,15 +5777,14 @@ export function setScenarioOverride() {
const isGroup = !!selected_group;
template.find('[data-group="true"]').toggle(isGroup);
template.find('[data-character="true"]').toggle(!isGroup);
template.find('.chat_scenario').text(metadataValue).on('input', onScenarioOverrideInput);
template.find('.chat_scenario').val(metadataValue).on('input', onScenarioOverrideInput);
template.find('.remove_scenario_override').on('click', onScenarioOverrideRemoveClick);
callPopup(template, 'text');
}
function onScenarioOverrideInput() {
const value = $(this).val();
const metadata = { scenario: value, };
updateChatMetadata(metadata, false);
const value = String($(this).val());
chat_metadata['scenario'] = value;
saveMetadataDebounced();
}