mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'main' into dev
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "sillytavern",
|
||||
"version": "1.8.0",
|
||||
"version": "1.8.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "sillytavern",
|
||||
"version": "1.8.0",
|
||||
"version": "1.8.1",
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
"@dqbd/tiktoken": "^1.0.2",
|
||||
|
@@ -49,7 +49,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/SillyTavern/SillyTavern.git"
|
||||
},
|
||||
"version": "1.8.0",
|
||||
"version": "1.8.1",
|
||||
"scripts": {
|
||||
"start": "node server.js",
|
||||
"pkg": "pkg --compress Gzip --no-bytecode --public ."
|
||||
|
@@ -4692,16 +4692,18 @@ async function getSettings(type) {
|
||||
$("#amount_gen_counter").text(`${amount_gen}`);
|
||||
|
||||
//Load which API we are using
|
||||
if (settings.main_api != undefined) {
|
||||
main_api = settings.main_api;
|
||||
$('#main_api').val(main_api);
|
||||
$("#main_api option[value=" + main_api + "]").attr(
|
||||
"selected",
|
||||
"true"
|
||||
);
|
||||
changeMainAPI();
|
||||
if (settings.main_api == undefined) {
|
||||
settings.main_api = 'kobold';
|
||||
}
|
||||
|
||||
main_api = settings.main_api;
|
||||
$('#main_api').val(main_api);
|
||||
$("#main_api option[value=" + main_api + "]").attr(
|
||||
"selected",
|
||||
"true"
|
||||
);
|
||||
changeMainAPI();
|
||||
|
||||
//Load User's Name and Avatar
|
||||
|
||||
user_avatar = settings.user_avatar;
|
||||
|
@@ -35,6 +35,7 @@ async function loadSettings() {
|
||||
}
|
||||
}
|
||||
|
||||
initializeEmptySlots(extension_settings.quickReply.numberOfSlots);
|
||||
generateQuickReplyElements();
|
||||
|
||||
for (let i = 1; i <= extension_settings.quickReply.numberOfSlots; i++) {
|
||||
@@ -131,6 +132,15 @@ async function onQuickReplyNumberOfSlotsInput() {
|
||||
extension_settings.quickReply.quickReplySlots.length = numberOfSlots;
|
||||
|
||||
// Initialize new slots
|
||||
initializeEmptySlots(numberOfSlots);
|
||||
|
||||
await loadSettings();
|
||||
addQuickReplyBar();
|
||||
moduleWorker();
|
||||
saveSettingsDebounced();
|
||||
}
|
||||
|
||||
function initializeEmptySlots(numberOfSlots) {
|
||||
for (let i = 0; i < numberOfSlots; i++) {
|
||||
if (!extension_settings.quickReply.quickReplySlots[i]) {
|
||||
extension_settings.quickReply.quickReplySlots[i] = {
|
||||
@@ -140,11 +150,6 @@ async function onQuickReplyNumberOfSlotsInput() {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
await loadSettings();
|
||||
addQuickReplyBar();
|
||||
moduleWorker();
|
||||
saveSettingsDebounced();
|
||||
}
|
||||
|
||||
function generateQuickReplyElements() {
|
||||
|
@@ -610,6 +610,14 @@ function loadPowerUserSettings(settings, data) {
|
||||
power_user.font_scale = Number(localStorage.getItem(storage_keys.font_scale) ?? 1);
|
||||
power_user.blur_strength = Number(localStorage.getItem(storage_keys.blur_strength) ?? 10);
|
||||
|
||||
if (power_user.chat_display === '') {
|
||||
power_user.chat_display = chat_styles.DEFAULT;
|
||||
}
|
||||
|
||||
if (power_user.waifuMode === '') {
|
||||
power_user.waifuMode = false;
|
||||
}
|
||||
|
||||
$('#trim_spaces').prop("checked", power_user.trim_spaces);
|
||||
$('#continue_on_send').prop("checked", power_user.continue_on_send);
|
||||
$('#auto_swipe').prop("checked", power_user.auto_swipe);
|
||||
|
Reference in New Issue
Block a user