diff --git a/.eslintrc.cjs b/.eslintrc.cjs index f0b2085d6..42978485c 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -54,6 +54,7 @@ module.exports = { }, // These scripts are loaded in HTML; tell ESLint not to complain about them being undefined globals: { + globalThis: 'readonly', ePub: 'readonly', pdfjsLib: 'readonly', toastr: 'readonly', diff --git a/default/config.yaml b/default/config.yaml index 6f174e523..730ffa967 100644 --- a/default/config.yaml +++ b/default/config.yaml @@ -1,6 +1,8 @@ # -- DATA CONFIGURATION -- # Root directory for user data storage dataRoot: ./data +# The maximum amount of memory that parsed character cards can use in MB +cardsCacheCapacity: 100 # -- SERVER CONFIGURATION -- # Listen for incoming connections listen: false diff --git a/package-lock.json b/package-lock.json index 93902fcff..2419fe002 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sillytavern", - "version": "1.12.8", + "version": "1.12.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sillytavern", - "version": "1.12.8", + "version": "1.12.9", "hasInstallScript": true, "license": "AGPL-3.0", "dependencies": { @@ -3591,9 +3591,9 @@ "integrity": "sha512-c2bQfLNbMzLPmzQuOr8fy0csy84WmwnER81W88DzTp9CYNPJ6yzOj2EZAh9pywYpqHnshVLHQJ8WzldAyfY+Iw==" }, "node_modules/express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "license": "MIT", "dependencies": { "accepts": "~1.3.8", @@ -3615,7 +3615,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -3630,6 +3630,10 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/cookie": { @@ -5725,9 +5729,9 @@ } }, "node_modules/path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", "license": "MIT" }, "node_modules/peek-readable": { diff --git a/package.json b/package.json index 56ddd3796..777d99076 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "type": "git", "url": "https://github.com/SillyTavern/SillyTavern.git" }, - "version": "1.12.8", + "version": "1.12.9", "scripts": { "start": "node server.js", "start:deno": "deno run --allow-run --allow-net --allow-read --allow-write --allow-sys --allow-env server.js", diff --git a/public/global.d.ts b/public/global.d.ts index cb459a97b..202d48443 100644 --- a/public/global.d.ts +++ b/public/global.d.ts @@ -1,4 +1,5 @@ import libs from './lib'; +import getContext from './scripts/st-context'; // Global namespace modules declare var ai; @@ -6,7 +7,7 @@ declare var pdfjsLib; declare var ePub; declare var SillyTavern: { - getContext(): any; + getContext(): typeof getContext; llm: any; libs: typeof libs; }; diff --git a/public/index.html b/public/index.html index 648286958..9d515e296 100644 --- a/public/index.html +++ b/public/index.html @@ -2987,6 +2987,7 @@ + @@ -4183,7 +4184,7 @@