diff --git a/.eslintrc.js b/.eslintrc.js index f05a857ad..8d9e36fe3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -55,6 +55,7 @@ module.exports = { isProbablyReaderable: 'readonly', ePub: 'readonly', diff_match_patch: 'readonly', + SillyTavern: 'readonly', }, }, ], diff --git a/.github/workflows/close-stale-issues.yml b/.github/workflows/close-stale-issues.yml index 1d34a6b1c..1d4382592 100644 --- a/.github/workflows/close-stale-issues.yml +++ b/.github/workflows/close-stale-issues.yml @@ -16,21 +16,21 @@ jobs: uses: actions/stale@v4 with: repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - days-before-stale: 360 - days-before-close: 5 + days-before-stale: 183 + days-before-close: 7 operations-per-run: 30 remove-stale-when-updated: true enable-statistics: true stale-issue-message: > - This issue has gone 3 months without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. - Otherwise it will be closed in 5 working days. + This issue has gone 6 months without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. + Otherwise it will be closed in 7 days. stale-pr-message: > - This PR is stale because it has been open 6 weeks with no activity. Either remove the stale label or comment below with a short update, - otherwise this PR will be closed in 5 days. + This PR is stale because it has been open 6 months with no activity. Either remove the stale label or comment below with a short update, + otherwise this PR will be closed in 7 days. close-issue-message: > - This issue was automatically closed because it has been stalled for over 1 year with no activity. + This issue was automatically closed because it has been stalled for over 6 months with no activity. close-pr-message: > - This pull request was automatically closed because it has been stalled for over 1 year with no activity. + This pull request was automatically closed because it has been stalled for over 6 months with no activity. stale-issue-label: '⚰️ Stale' close-issue-label: '🕸️ Inactive' stale-pr-label: '⚰️ Stale' @@ -44,8 +44,8 @@ jobs: uses: actions/stale@v4 with: repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - days-before-stale: 5 - days-before-close: 3 + days-before-stale: 7 + days-before-close: 7 operations-per-run: 30 remove-stale-when-updated: true stale-issue-message: > @@ -65,7 +65,7 @@ jobs: with: repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} days-before-stale: 7 - days-before-close: 365 + days-before-close: 183 operations-per-run: 30 remove-stale-when-updated: true stale-issue-message: Hey SillyTavern, - Don't forget to respond! @@ -79,4 +79,4 @@ jobs: close-issue-label: '🕸️ Inactive' close-pr-label: '🕸️ Inactive' exempt-issue-labels: '📌 Keep Open' - exempt-pr-labels: '📌 Keep Open' \ No newline at end of file + exempt-pr-labels: '📌 Keep Open' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 84253f028..b52fc7f6e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,4 +29,13 @@ - Updating GitHub Actions. - Hotfixing a critical bug. 4. Project maintainers will test and can change your code before merging. -5. Mind the license. Your contributions will be licensed under the GNU Affero General Public License. If you don't know what that implies, consult your lawyer. +5. Write at least somewhat meaningful PR descriptions. There's no "right" way to do it, but the following may help with outlining a general structure: + - What is the reason for a change? + - What did you do to achieve this? + - How would a reviewer test the change? +6. Mind the license. Your contributions will be licensed under the GNU Affero General Public License. If you don't know what that implies, consult your lawyer. + +## Further reading + +1. [How to write UI extensions](https://docs.sillytavern.app/for-contributors/writing-extensions/) +2. [How to write server plugins](https://docs.sillytavern.app/for-contributors/server-plugins) diff --git a/default/config.yaml b/default/config.yaml index 2c6f2fa98..b0d1996cd 100644 --- a/default/config.yaml +++ b/default/config.yaml @@ -4,8 +4,22 @@ dataRoot: ./data # -- SERVER CONFIGURATION -- # Listen for incoming connections listen: false +# Enables IPv6 and/or IPv4 protocols. Need to have at least one enabled! +protocol: + ipv4: true + ipv6: false +# Prefers IPv6 for DNS. Enable this on ISPs that don't have issues with IPv6 +dnsPreferIPv6: false +# The hostname that autorun opens. +# - Use "auto" to let the server decide +# - Use options like 'localhost', 'st.example.com' +autorunHostname: "auto" # Server port port: 8000 +# Overrides the port for autorun in browser. +# - Use -1 to use the server port. +# - Specify a port to override the default. +autorunPortOverride: -1 # -- SECURITY CONFIGURATION -- # Toggle whitelist mode whitelistMode: true @@ -13,6 +27,7 @@ whitelistMode: true enableForwardedWhitelist: true # Whitelist of allowed IP addresses whitelist: + - ::1 - 127.0.0.1 # Toggle basic authentication for endpoints basicAuthMode: false @@ -26,6 +41,11 @@ enableCorsProxy: false enableUserAccounts: false # Enable discreet login mode: hides user list on the login screen enableDiscreetLogin: false +# User session timeout *in seconds* (defaults to 24 hours). +## Set to a positive number to expire session after a certain time of inactivity +## Set to 0 to expire session when the browser is closed +## Set to a negative number to disable session expiration +sessionTimeout: 86400 # Used to sign session cookies. Will be auto-generated if not set cookieSecret: '' # Disable CSRF protection - NOT RECOMMENDED @@ -35,6 +55,9 @@ securityOverride: false # -- ADVANCED CONFIGURATION -- # Open the browser automatically autorun: true +# Avoids using 'localhost' for autorun in auto mode. +# use if you don't have 'localhost' in your hosts file +avoidLocalhost: false # Disable thumbnail generation disableThumbnails: false # Thumbnail quality (0-100) @@ -93,10 +116,26 @@ openai: deepl: # Available options: default, more, less, prefer_more, prefer_less formality: default +# -- MISTRAL API CONFIGURATION -- +mistral: + # Enables prefilling of the reply with the last assistant message in the prompt + # CAUTION: The prefix is echoed into the completion. You may want to use regex to trim it out. + enablePrefix: false +# -- OLLAMA API CONFIGURATION -- +ollama: + # Controls how long the model will stay loaded into memory following the request + # * -1: Keep the model loaded indefinitely + # * 0: Unload the model immediately after the request + # * 5m: Keep the model loaded for 5 minutes after the request. Accepts duration strings (e.g. 5h30m40s) + keepAlive: -1 +# -- ANTHROPIC CLAUDE API CONFIGURATION -- +claude: + # Enables caching of the system prompt (if supported). + # https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching + # -- IMPORTANT! -- + # Use only when the prompt before the chat history is static and doesn't change between requests + # (e.g {{random}} macro or lorebooks not as in-chat injections). + # Otherwise, you'll just waste money on cache misses. + enableSystemPromptCache: false # -- SERVER PLUGIN CONFIGURATION -- enableServerPlugins: false -# User session timeout *in seconds* (defaults to 24 hours). -## Set to a positive number to expire session after a certain time of inactivity -## Set to 0 to expire session when the browser is closed -## Set to a negative number to disable session expiration -sessionTimeout: 86400 diff --git a/default/content/presets/openai/Default.json b/default/content/presets/openai/Default.json index 6c3823086..e2345c687 100644 --- a/default/content/presets/openai/Default.json +++ b/default/content/presets/openai/Default.json @@ -1,7 +1,7 @@ { "chat_completion_source": "openai", - "openai_model": "gpt-3.5-turbo", - "claude_model": "claude-instant-v1", + "openai_model": "gpt-4-turbo", + "claude_model": "claude-3-5-sonnet-20240620", "windowai_model": "", "openrouter_model": "OR_Website", "openrouter_use_fallback": false, @@ -9,7 +9,7 @@ "openrouter_group_models": false, "openrouter_sort_models": "alphabetically", "ai21_model": "j2-ultra", - "mistralai_model": "mistral-medium-latest", + "mistralai_model": "mistral-large-latest", "custom_model": "", "custom_url": "", "custom_include_body": "", @@ -22,7 +22,7 @@ "count_penalty": 0, "top_p": 1, "top_k": 0, - "top_a": 1, + "top_a": 0, "min_p": 0, "repetition_penalty": 1, "openai_max_context": 4095, diff --git a/default/content/settings.json b/default/content/settings.json index 1a62513a3..1140accb0 100644 --- a/default/content/settings.json +++ b/default/content/settings.json @@ -610,9 +610,9 @@ } ] }, - "wi_format": "[Details of the fictional world the RP is set in:\n{0}]\n", - "openai_model": "gpt-3.5-turbo", - "claude_model": "claude-instant-v1", + "wi_format": "{0}", + "openai_model": "gpt-4-turbo", + "claude_model": "claude-3-5-sonnet-20240620", "ai21_model": "j2-ultra", "windowai_model": "", "openrouter_model": "OR_Website", diff --git a/index.d.ts b/index.d.ts index 2769df508..015d8e353 100644 --- a/index.d.ts +++ b/index.d.ts @@ -9,6 +9,11 @@ declare global { }; } } + + /** + * The root directory for user data. + */ + var DATA_ROOT: string; } declare module 'express-session' { diff --git a/package-lock.json b/package-lock.json index 922c11009..9c640abdd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sillytavern", - "version": "1.12.3", + "version": "1.12.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sillytavern", - "version": "1.12.3", + "version": "1.12.4", "hasInstallScript": true, "license": "AGPL-3.0", "dependencies": { @@ -42,7 +42,7 @@ "rate-limiter-flexible": "^5.0.0", "response-time": "^2.3.2", "sanitize-filename": "^1.6.3", - "sillytavern-transformers": "^2.14.6", + "sillytavern-transformers": "2.14.6", "simple-git": "^3.19.1", "tiktoken": "^1.0.15", "vectra": "^0.2.2", @@ -58,7 +58,7 @@ }, "devDependencies": { "@types/jquery": "^3.5.29", - "eslint": "^8.55.0", + "eslint": "^8.57.0", "jquery": "^3.6.4" }, "engines": { @@ -166,9 +166,9 @@ "license": "MIT" }, "node_modules/@eslint/js": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz", - "integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "license": "MIT", "engines": { @@ -185,14 +185,15 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "deprecated": "Use @eslint/config-array instead", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -200,9 +201,9 @@ } }, "node_modules/@humanwhocodes/config-array/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "license": "MIT", "dependencies": { @@ -239,9 +240,10 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", "dev": true, "license": "BSD-3-Clause" }, @@ -1391,12 +1393,11 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", - "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", - "license": "MIT", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -2456,17 +2457,17 @@ } }, "node_modules/eslint": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz", - "integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.55.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", diff --git a/package.json b/package.json index 3dd6007e7..6a282736c 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "rate-limiter-flexible": "^5.0.0", "response-time": "^2.3.2", "sanitize-filename": "^1.6.3", - "sillytavern-transformers": "^2.14.6", + "sillytavern-transformers": "2.14.6", "simple-git": "^3.19.1", "tiktoken": "^1.0.15", "vectra": "^0.2.2", @@ -70,7 +70,7 @@ "type": "git", "url": "https://github.com/SillyTavern/SillyTavern.git" }, - "version": "1.12.3", + "version": "1.12.4", "scripts": { "start": "node server.js", "start:no-csrf": "node server.js --disableCsrf", @@ -90,7 +90,7 @@ "main": "server.js", "devDependencies": { "@types/jquery": "^3.5.29", - "eslint": "^8.55.0", + "eslint": "^8.57.0", "jquery": "^3.6.4" } } diff --git a/public/css/character-group-overlay.css b/public/css/character-group-overlay.css index 5ccbefd9b..5327694a8 100644 --- a/public/css/character-group-overlay.css +++ b/public/css/character-group-overlay.css @@ -89,7 +89,7 @@ position: absolute; width: 100%; height: 100vh; - height: 100svh; + height: 100dvh; z-index: 9998; top: 0; } @@ -99,6 +99,6 @@ } #bulk_tag_shadow_popup #bulk_tag_popup #dialogue_popup_controls .menu_button { - width: 100px; + width: unset; padding: 0.25em; } diff --git a/public/css/extensions-panel.css b/public/css/extensions-panel.css index 2daff5749..da005bd70 100644 --- a/public/css/extensions-panel.css +++ b/public/css/extensions-panel.css @@ -7,7 +7,8 @@ background-color: green; } -.extensions_block input[type="checkbox"] { +.extensions_block input[type="checkbox"], +.extensions_block input[type="radio"] { margin-left: 10px; margin-right: 10px; } diff --git a/public/css/loader.css b/public/css/loader.css index dea0eb5a3..acf82613d 100644 --- a/public/css/loader.css +++ b/public/css/loader.css @@ -7,8 +7,8 @@ z-index: 999999; width: 100vw; height: 100vh; - width: 100svw; - height: 100svh; + width: 100dvw; + height: 100dvh; background-color: var(--SmartThemeBlurTintColor); color: var(--SmartThemeBodyColor); /*for some reason the full screen blur does not work on iOS*/ diff --git a/public/css/logprobs.css b/public/css/logprobs.css index 4f129932a..0cea4f67f 100644 --- a/public/css/logprobs.css +++ b/public/css/logprobs.css @@ -1,7 +1,7 @@ #logprobsViewer { overflow-y: auto; - max-width: 90svw; - max-height: 90svh; + max-width: 90dvw; + max-height: 90dvh; min-width: 100px; min-height: 50px; border-radius: 10px; @@ -16,7 +16,7 @@ top: 0; margin: 0; right: unset; - width: calc(((100svw - var(--sheldWidth)) / 2) - 1px); + width: calc(((100dvw - var(--sheldWidth)) / 2) - 1px); } .logprobs_panel_header { diff --git a/public/css/mobile-styles.css b/public/css/mobile-styles.css index 1aef0fde6..a36816725 100644 --- a/public/css/mobile-styles.css +++ b/public/css/mobile-styles.css @@ -1,6 +1,8 @@ /*will apply to anything 1000px or less. this catches ipads, horizontal phones, and vertical phones)*/ @media screen and (max-width: 1000px) { - #send_form.compact #leftSendForm, #send_form.compact #rightSendForm { + + #send_form.compact #leftSendForm, + #send_form.compact #rightSendForm { flex-wrap: nowrap; width: unset; } @@ -34,9 +36,9 @@ right: 0; width: fit-content; max-height: calc(60vh - 60px); - max-height: calc(60svh - 60px); + max-height: calc(60dvh - 60px); max-width: 90vw; - max-width: 90svw; + max-width: 90dvw; left: 50%; top: 50%; transform: translateX(-50%) translateY(-50%); @@ -102,7 +104,7 @@ min-width: unset; width: 100%; max-height: calc(100vh - 45px); - max-height: calc(100svh - 45px); + max-height: calc(100dvh - 45px); position: fixed; left: 0; top: 5px; @@ -130,15 +132,15 @@ #top-bar { position: fixed; width: 100vw; - width: 100svw; + width: 100dvw; } #bg1, #bg_custom { height: 100vh !important; - height: 100svh !important; + height: 100dvh !important; width: 100vw !important; - width: 100svw !important; + width: 100dvw !important; background-position: center; } @@ -146,13 +148,7 @@ #sheld, #character_popup, - .drawer-content - - /* , - #world_popup */ - { - /*max-height: calc(100vh - 36px); - max-height: calc(100svh - 36px);*/ + .drawer-content { width: 100% !important; margin: 0 auto; max-width: 100%; @@ -223,10 +219,10 @@ #floatingPrompt, #cfgConfig, #logprobsViewer, - #movingDivs > div { - /* 100vh are fallback units for browsers that don't support svh */ + #movingDivs>div { + /* 100vh are fallback units for browsers that don't support dvh */ height: calc(100vh - 45px); - height: calc(100svh - 45px); + height: calc(100dvh - 45px); min-width: 100% !important; width: 100% !important; max-width: 100% !important; @@ -249,7 +245,7 @@ #floatingPrompt, #cfgConfig, #logprobsViewer, - #movingDivs > div { + #movingDivs>div { height: min-content; } @@ -286,9 +282,9 @@ body.waifuMode #sheld { height: 40vh; - height: 40svh; + height: 40dvh; top: 60vh; - top: 60svh; + top: 60dvh; bottom: 0 !important; } @@ -325,16 +321,16 @@ body.waifuMode .zoomed_avatar { width: fit-content; max-height: calc(60vh - 60px); - max-height: calc(60svh - 60px); + max-height: calc(60dvh - 60px); max-width: 90vw; - max-width: 90svw; + max-width: 90dvw; } .scrollableInner { overflow-y: auto; overflow-x: hidden; max-height: calc(100vh - 90px); - max-height: calc(100svh - 90px); + max-height: calc(100dvh - 90px); } .horde_multiple_hint { @@ -370,9 +366,9 @@ body:not(.waifuMode) .zoomed_avatar { max-height: calc(60vh - 60px); - max-height: calc(60svh - 60px); + max-height: calc(60dvh - 60px); max-width: 90vw; - max-width: 90svw; + max-width: 90dvw; left: 50%; top: 50%; transform: translateX(-50%) translateY(-50%); @@ -453,9 +449,9 @@ min-height: unset; max-height: unset; width: 100vw; - width: 100svw; + width: 100dvw; height: calc(100vh - 36px); - height: calc(100svh - 36px); + height: calc(100dvh - 36px); padding-right: max(env(safe-area-inset-right), 0px); padding-left: max(env(safe-area-inset-left), 0px); padding-bottom: 0; @@ -485,10 +481,10 @@ top: 0; margin: 0 auto; height: calc(100vh - 70px); - height: calc(100svh - 70px); + height: calc(100dvh - 70px); width: calc(100% - 5px); max-height: calc(100vh - 70px); - max-height: calc(100svh - 70px); + max-height: calc(100dvh - 70px); max-width: calc(100% - 5px); } diff --git a/public/css/popup-safari-fix.css b/public/css/popup-safari-fix.css index 6838e3352..e9dbdc7f9 100644 --- a/public/css/popup-safari-fix.css +++ b/public/css/popup-safari-fix.css @@ -7,5 +7,5 @@ body.safari .popup.large_dialogue_popup .popup-body { body.safari .popup .popup-body { height: fit-content; max-height: 90vh; - max-height: 90svh; + max-height: 90dvh; } diff --git a/public/css/popup.css b/public/css/popup.css index f05006749..6809d7248 100644 --- a/public/css/popup.css +++ b/public/css/popup.css @@ -16,8 +16,8 @@ dialog { display: flex; flex-direction: column; - max-height: calc(100svh - 2em); - max-width: calc(100svw - 2em); + max-height: calc(100dvh - 2em); + max-width: calc(100dvw - 2em); min-height: fit-content; /* Overflow visible so elements (like toasts) can appear outside of the dialog. '.popup-body' is hiding overflow for the real content. */ @@ -103,7 +103,7 @@ body.no-blur .popup[open]::backdrop { .popup #toast-container { /* Fix toastr in dialogs by actually placing it at the top of the screen via transform */ - height: 100svh; + height: 100dvh; top: calc(50% + var(--topBarBlockSize)); left: 50%; transform: translate(-50%, -50%); @@ -115,7 +115,7 @@ body.no-blur .popup[open]::backdrop { .popup-crop-wrap { margin: 10px auto; max-height: 75vh; - max-height: 75svh; + max-height: 75dvh; max-width: 100%; } diff --git a/public/css/tags.css b/public/css/tags.css index c712a49a5..fb2c165fe 100644 --- a/public/css/tags.css +++ b/public/css/tags.css @@ -209,20 +209,20 @@ opacity: 1; } -.tag_as_folder { +.tag_as_folder.right_menu_button { filter: brightness(75%) saturate(0.6); } -.tag_as_folder:hover, -.tag_as_folder.flash { - filter: brightness(150%) saturate(0.6) !important; +.tag_as_folder.right_menu_button:hover, +.tag_as_folder.right_menu_button.flash { + filter: brightness(150%) saturate(0.6); } -.tag_as_folder.no_folder { +.tag_as_folder.right_menu_button.no_folder { filter: brightness(25%) saturate(0.25); } -.tag_as_folder .tag_folder_indicator { +.tag_as_folder.right_menu_button .tag_folder_indicator { position: absolute; top: calc(var(--mainFontSize) * -0.5); right: calc(var(--mainFontSize) * -0.5); diff --git a/public/css/toggle-dependent.css b/public/css/toggle-dependent.css index 774e86089..ef457ee25 100644 --- a/public/css/toggle-dependent.css +++ b/public/css/toggle-dependent.css @@ -28,6 +28,10 @@ body.hideChatAvatars .mesAvatarWrapper .avatar { display: none !important; } +body.hideChatAvatars .last_mes { + padding-bottom: 40px !important; +} + body.square-avatars .avatar, body.square-avatars .avatar img { border-radius: var(--avatar-base-border-radius) !important; @@ -360,7 +364,7 @@ body.waifuMode #top-bar { body.waifuMode #sheld { height: 40vh; - height: 40svh; + height: 40dvh; top: calc(100% - 40vh); bottom: 0; } @@ -450,4 +454,4 @@ body.expandMessageActions .mes .mes_buttons .extraMesButtonsHint { #smooth_streaming:checked~#smooth_streaming_speed_control { display: block; -} +} \ No newline at end of file diff --git a/public/css/world-info.css b/public/css/world-info.css index 6aab4efcb..3da519c02 100644 --- a/public/css/world-info.css +++ b/public/css/world-info.css @@ -120,6 +120,14 @@ flex-wrap: wrap; } +.world_entry .inline-drawer-header { + cursor: initial; +} + +.world_entry .killSwitch { + cursor: pointer; +} + .world_entry_form_control input[type=button] { cursor: pointer; } @@ -173,6 +181,10 @@ width: 7em; } +.world_entry .killSwitch.fa-toggle-on { + color: var(--SmartThemeQuoteColor); +} + .wi-card-entry { border: 1px solid; border-color: var(--SmartThemeBorderColor); diff --git a/public/global.d.ts b/public/global.d.ts index af42edf00..c8bfe14c2 100644 --- a/public/global.d.ts +++ b/public/global.d.ts @@ -14,8 +14,15 @@ declare var isProbablyReaderable; declare var ePub; declare var ai; +declare var SillyTavern: { + getContext(): any; + llm: any; +}; + // Jquery plugins interface JQuery { + nanogallery2(options?: any): JQuery; + nanogallery2(method: string, options?: any): JQuery; pagination(method: 'getCurrentPageNum'): number; pagination(method: string, options?: any): JQuery; pagination(options?: any): JQuery; diff --git a/public/img/blockentropy.svg b/public/img/blockentropy.svg new file mode 100644 index 000000000..fa52c3ea8 --- /dev/null +++ b/public/img/blockentropy.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/img/step-into.svg b/public/img/step-into.svg new file mode 100644 index 000000000..fcfa7ef16 --- /dev/null +++ b/public/img/step-into.svg @@ -0,0 +1,149 @@ + + + + diff --git a/public/img/step-out.svg b/public/img/step-out.svg new file mode 100644 index 000000000..aa7dd3ea2 --- /dev/null +++ b/public/img/step-out.svg @@ -0,0 +1,149 @@ + + + + diff --git a/public/img/step-over.svg b/public/img/step-over.svg new file mode 100644 index 000000000..6f23ff22a --- /dev/null +++ b/public/img/step-over.svg @@ -0,0 +1,149 @@ + + + + diff --git a/public/img/step-resume.svg b/public/img/step-resume.svg new file mode 100644 index 000000000..bf3e0647f --- /dev/null +++ b/public/img/step-resume.svg @@ -0,0 +1,218 @@ + + + + diff --git a/public/index.html b/public/index.html index 93a7d4750..7745ee2f8 100644 --- a/public/index.html +++ b/public/index.html @@ -383,7 +383,7 @@ Max Response Length (tokens)
- +
@@ -1273,7 +1273,7 @@
-
+

@@ -1358,7 +1358,7 @@

-
+

@@ -1387,7 +1387,7 @@

-
+

-
+

Contrastive Search

@@ -1544,7 +1544,7 @@

-
+

Samplers Order
- Samplers will be applied in a top-down order. + kcpp only. Samplers will be applied in a top-down order. Use with caution.
@@ -1597,10 +1597,10 @@ Load default order
-
+

- Samplers Order + Sampler Order

@@ -1618,7 +1618,7 @@ Load default order
-
+

Sampler Priority @@ -1660,16 +1660,24 @@

+
-
+
@@ -1815,10 +1823,16 @@
- Assistant Prefill - - Assistant Impersonation Prefill - +
+ Assistant Prefill + +
+ +
+ Assistant Impersonation Prefill + +
+

Perplexity Model

+
+

Block Entropy API Key

+
+ + +
+
+ For privacy reasons, your API key will be hidden after you reload the page. +
+

Select a Model

+
+ +
+

Custom Endpoint (Base URL)

@@ -3060,7 +3108,11 @@
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
@@ -4031,21 +4102,23 @@ Restore User Input - +
+ + +
-
@@ -4117,6 +4190,12 @@ Quick "Continue" button +
+
+ + +
@@ -4275,7 +4364,7 @@ -