mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-05 20:29:22 +01:00
Merge branch 'staging' of https://github.com/SillyTavern/SillyTavern into staging
This commit is contained in:
commit
56fc92daca
16
jsconfig.json
Normal file
16
jsconfig.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"target": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"checkJs": true,
|
||||
"allowUmdGlobalAccess": true,
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"**/node_modules/*"
|
||||
]
|
||||
}
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "sillytavern",
|
||||
"version": "1.9.7",
|
||||
"version": "1.10.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "sillytavern",
|
||||
"version": "1.9.7",
|
||||
"version": "1.10.0",
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
"@agnai/sentencepiece-js": "^1.1.1",
|
||||
|
@ -51,7 +51,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/SillyTavern/SillyTavern.git"
|
||||
},
|
||||
"version": "1.9.7",
|
||||
"version": "1.10.0",
|
||||
"scripts": {
|
||||
"start": "node server.js",
|
||||
"start-multi": "node server.js --disableCsrf",
|
||||
|
@ -863,8 +863,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr data-source="openai,claude">
|
||||
<div class="range-block" data-source="openai,claude">
|
||||
<hr>
|
||||
<div class="range-block-title justifyLeft" data-i18n="OpenAI Reverse Proxy">
|
||||
OpenAI / Claude Reverse Proxy
|
||||
</div>
|
||||
@ -2467,7 +2467,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex2 flex-container flexFlowColumn">
|
||||
<div class="flex range-block">
|
||||
<div data-newbie-hidden class="flex range-block">
|
||||
<div class="range-block-title justifyLeft">
|
||||
<label for="world_info_character_strategy">
|
||||
<span data-i18n="Character Lore Insertion Strategy"><small>Character Lore Insertion Strategy</small></span>
|
||||
@ -2483,7 +2483,7 @@
|
||||
</div>
|
||||
|
||||
<div name="WIScanAndTokens" class="flex1 flex-container flexFlowColumn">
|
||||
<div class="flex1 gap5px range-block">
|
||||
<div data-newbie-hidden class="flex1 gap5px range-block">
|
||||
<div class="wide10pMinFit">
|
||||
<small data-i18n="Scan Depth">Scan Depth</small>
|
||||
</div>
|
||||
@ -2515,7 +2515,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex1 gap5px range-block">
|
||||
<div data-newbie-hidden class="flex1 gap5px range-block">
|
||||
<div class="wide10pMinFit">
|
||||
<small data-i18n="Budget Cap">Budget Cap</small>
|
||||
</div>
|
||||
@ -2536,7 +2536,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="alignitemsflexstart flex1 range-block flex-container flexFlowColumn">
|
||||
<div data-newbie-hidden class="alignitemsflexstart flex1 range-block flex-container flexFlowColumn">
|
||||
<label title="Entries can activate other entries by mentioning their keywords" data-i18n="[title]Entries can activate other entries by mentioning their keywords" class="checkbox_label">
|
||||
<input id="world_info_recursive" type="checkbox" />
|
||||
<small data-i18n="Recursive Scan">
|
||||
@ -3084,12 +3084,14 @@
|
||||
<div class="extension_token_counter">
|
||||
Tokens: <span id="persona_description_token_count">0</span>
|
||||
</div>
|
||||
<label for="persona_description_position" data-i18n="Position:">Position:</label>
|
||||
<select id="persona_description_position">
|
||||
<option value="0" data-i18n="In Story String / Prompt Manager">In Story String / Prompt Manager</option>
|
||||
<option value="2" data-i18n="Top of Author's Note">Top of Author's Note</option>
|
||||
<option value="3" data-i18n="Bottom of Author's Note">Bottom of Author's Note</option>
|
||||
</select>
|
||||
<div data-newbie-hidden>
|
||||
<label for="persona_description_position" data-i18n="Position:">Position:</label>
|
||||
<select id="persona_description_position">
|
||||
<option value="0" data-i18n="In Story String / Prompt Manager">In Story String / Prompt Manager</option>
|
||||
<option value="2" data-i18n="Top of Author's Note">Top of Author's Note</option>
|
||||
<option value="3" data-i18n="Bottom of Author's Note">Bottom of Author's Note</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="range-block">
|
||||
<label for="persona_show_notifications" class="checkbox_label">
|
||||
@ -3103,9 +3105,9 @@
|
||||
<div class="flex1">
|
||||
<h4 class="title_restorable">
|
||||
<span data-i18n="Your Persona">Your Persona</span>
|
||||
<button class="menu_button menu_button_icon user_stats_button" title="Click for stats!">
|
||||
<i class="fa-solid fa-circle-info"></i><span data-i18n="Usage Stats">Usage Stats</span>
|
||||
</button>
|
||||
<div class="menu_button menu_button_icon user_stats_button" title="Click for stats!">
|
||||
<i class="fa-solid fa-ranking-star"></i><span data-i18n="Usage Stats">Usage Stats</span>
|
||||
</div>
|
||||
<div id="create_dummy_persona" class="menu_button menu_button_icon" title="Create a dummy persona" data-i18n="[title]Create a dummy persona">
|
||||
<i class="fa-solid fa-person-circle-question fa-fw"></i>
|
||||
<span data-i18n="Blank">Blank</span>
|
||||
|
@ -2801,11 +2801,11 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
||||
return;
|
||||
}
|
||||
|
||||
const anchorDepth = Math.abs(index - finalMesSend.length + 1);
|
||||
const anchorDepth = Math.abs(index - finalMesSend.length);
|
||||
// NOTE: Depth injected here!
|
||||
const extensionAnchor = getExtensionPrompt(extension_prompt_types.IN_CHAT, anchorDepth);
|
||||
|
||||
if (anchorDepth > 0 && extensionAnchor && extensionAnchor.length) {
|
||||
if (anchorDepth >= 0 && extensionAnchor && extensionAnchor.length) {
|
||||
mesItem.extensionPrompts.push(extensionAnchor);
|
||||
}
|
||||
});
|
||||
|
@ -607,10 +607,6 @@ PromptManagerModule.prototype.init = function (moduleConfiguration, serviceSetti
|
||||
eventSource.on(event_types.OAI_PRESET_CHANGED, settings => {
|
||||
// Save configuration and wrap everything up.
|
||||
this.saveServiceSettings().then(() => {
|
||||
this.hidePopup();
|
||||
this.clearEditForm();
|
||||
this.renderDebounced();
|
||||
|
||||
const mainPrompt = this.getPromptById('main');
|
||||
this.updateQuickEdit('main', mainPrompt);
|
||||
|
||||
@ -619,6 +615,10 @@ PromptManagerModule.prototype.init = function (moduleConfiguration, serviceSetti
|
||||
|
||||
const jailbreakPrompt = this.getPromptById('jailbreak');
|
||||
this.updateQuickEdit('jailbreak', jailbreakPrompt);
|
||||
|
||||
this.hidePopup();
|
||||
this.clearEditForm();
|
||||
this.renderDebounced();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -1,26 +1,26 @@
|
||||
#roll_dice {
|
||||
/* order: 100; */
|
||||
/* width: 40px;
|
||||
height: 40px;
|
||||
margin: 0;
|
||||
padding: 1px; */
|
||||
outline: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: 0.3s;
|
||||
opacity: 0.7;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* justify-content: center; */
|
||||
|
||||
}
|
||||
|
||||
#roll_dice:hover {
|
||||
opacity: 1;
|
||||
filter: brightness(1.2);
|
||||
}
|
||||
|
||||
#dice_dropdown {
|
||||
z-index: 100;
|
||||
backdrop-filter: blur(--SmartThemeBlurStrength);
|
||||
}
|
||||
#roll_dice {
|
||||
/* order: 100; */
|
||||
/* width: 40px;
|
||||
height: 40px;
|
||||
margin: 0;
|
||||
padding: 1px; */
|
||||
outline: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: 0.3s;
|
||||
opacity: 0.7;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* justify-content: center; */
|
||||
|
||||
}
|
||||
|
||||
#roll_dice:hover {
|
||||
opacity: 1;
|
||||
filter: brightness(1.2);
|
||||
}
|
||||
|
||||
#dice_dropdown {
|
||||
z-index: 30000;
|
||||
backdrop-filter: blur(--SmartThemeBlurStrength);
|
||||
}
|
||||
|
@ -394,6 +394,11 @@ function onExpressionsShowDefaultInput() {
|
||||
}
|
||||
|
||||
async function unloadLiveChar() {
|
||||
if (!modules.includes('talkinghead')) {
|
||||
console.debug('talkinghead module is disabled');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const url = new URL(getApiUrl());
|
||||
url.pathname = '/api/talkinghead/unload';
|
||||
|
@ -24,7 +24,6 @@ function createDefaultFiles() {
|
||||
}
|
||||
}
|
||||
|
||||
const process = require('process')
|
||||
const yargs = require('yargs/yargs');
|
||||
const { hideBin } = require('yargs/helpers');
|
||||
const net = require("net");
|
||||
@ -149,11 +148,8 @@ let api_openai = "https://api.openai.com/v1";
|
||||
let api_claude = "https://api.anthropic.com/v1";
|
||||
let main_api = "kobold";
|
||||
|
||||
let response_generate_novel;
|
||||
let characters = {};
|
||||
let response_dw_bg;
|
||||
let first_run = true;
|
||||
|
||||
|
||||
let color = {
|
||||
byNum: (mess, fgNum) => {
|
||||
@ -4134,7 +4130,7 @@ function backupSettings() {
|
||||
const backupFile = path.join(directories.backups, `settings_${generateTimestamp()}.json`);
|
||||
fs.copyFileSync(SETTINGS_FILE, backupFile);
|
||||
|
||||
let files = fs.readdirSync(directories.backups);
|
||||
let files = fs.readdirSync(directories.backups).filter(f => f.startsWith('settings_'));
|
||||
if (files.length > MAX_BACKUPS) {
|
||||
files = files.map(f => path.join(directories.backups, f));
|
||||
files.sort((a, b) => fs.statSync(a).mtimeMs - fs.statSync(b).mtimeMs);
|
||||
|
Loading…
x
Reference in New Issue
Block a user