mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Set background client-side
This commit is contained in:
@ -187,7 +187,7 @@ import {
|
||||
import { applyLocale, initLocales } from './scripts/i18n.js';
|
||||
import { getFriendlyTokenizerName, getTokenCount, getTokenizerModel, initTokenizers, saveTokenCache } from './scripts/tokenizers.js';
|
||||
import { createPersona, initPersonas, selectCurrentPersona, setPersonaDescription } from './scripts/personas.js';
|
||||
import { getBackgrounds, initBackgrounds } from './scripts/backgrounds.js';
|
||||
import { getBackgrounds, initBackgrounds, loadBackgroundSettings, background_settings } from './scripts/backgrounds.js';
|
||||
import { hideLoader, showLoader } from './scripts/loader.js';
|
||||
import { BulkEditOverlay, CharacterContextMenu } from './scripts/BulkEditOverlay.js';
|
||||
import { loadMancerModels } from './scripts/mancer-settings.js';
|
||||
@ -5674,6 +5674,9 @@ async function getSettings() {
|
||||
// Load character tags
|
||||
loadTagsSettings(settings);
|
||||
|
||||
// Load background
|
||||
loadBackgroundSettings(settings);
|
||||
|
||||
// Allow subscribers to mutate settings
|
||||
eventSource.emit(event_types.SETTINGS_LOADED_AFTER, settings);
|
||||
|
||||
@ -5756,6 +5759,9 @@ async function saveSettings(type) {
|
||||
console.warn('Settings not ready, aborting save');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(background_settings);
|
||||
|
||||
//console.log('Entering settings with name1 = '+name1);
|
||||
|
||||
return jQuery.ajax({
|
||||
@ -5785,6 +5791,7 @@ async function saveSettings(type) {
|
||||
nai_settings: nai_settings,
|
||||
kai_settings: kai_settings,
|
||||
oai_settings: oai_settings,
|
||||
background: background_settings,
|
||||
}, null, 4),
|
||||
beforeSend: function () { },
|
||||
cache: false,
|
||||
|
Reference in New Issue
Block a user