diff --git a/.github/readme.md b/.github/readme.md index 11d99e105..e0f2df585 100644 --- a/.github/readme.md +++ b/.github/readme.md @@ -144,12 +144,14 @@ A full list of included extensions and tutorials on how to use them can be found 8. The server will then start, and SillyTavern will pop up in your browser. ## Installing via SillyTavern Launcher - 1. Install [Git for Windows](https://gitforwindows.org/) - 2. Open Windows Explorer (`Win+E`) and make or choose a folder where you wanna install the launcher to - 3. Open a Command Prompt inside that folder by clicking in the 'Address Bar' at the top, typing `cmd`, and pressing Enter. - 4. When you see a black box, insert the following command: `git clone https://github.com/SillyTavern/SillyTavern-Launcher.git` - 5. Double-click on `installer.bat` and choose what you wanna install - 6. After installation double-click on `launcher.bat` +1. On your keyboard: press **`WINDOWS + R`** to open Run dialog box. Then, run the following command to install git: +```shell +cmd /c winget install -e --id Git.Git +``` +2. On your keyboard: press **`WINDOWS + E`** to open File Explorer, then navigate to the folder where you want to install the launcher. Once in the desired folder, type `cmd` into the address bar and press enter. Then, run the following command: +```shell +git clone https://github.com/SillyTavern/SillyTavern-Launcher.git && cd SillyTavern-Launcher && start installer.bat +``` ## Installing via GitHub Desktop (This allows git usage **only** in GitHub Desktop, if you want to use `git` on the command line too, you also need to install [Git for Windows](https://gitforwindows.org/)) @@ -183,18 +185,40 @@ For MacOS / Linux all of these will be done in a Terminal. ### For Linux users 1. Open your favorite terminal and install git -2. Download Sillytavern Launcher with: `git clone https://github.com/SillyTavern/SillyTavern-Launcher.git` -3. Navigate to the SillyTavern-Launcher with: `cd SillyTavern-Launcher` -4. Start the install launcher with: `chmod +x install.sh && ./install.sh` and choose what you wanna install -5. After installation start the launcher with: `chmod +x launcher.sh && ./launcher.sh` +2. Git clone the Sillytavern-Launcher with: +```shell +git clone https://github.com/SillyTavern/SillyTavern-Launcher.git && cd SillyTavern-Launcher +``` +3. Start the installer.sh with: +```shell +chmod +x install.sh && ./install.sh +``` +4. After installation start the launcher.sh with: +```shell +chmod +x launcher.sh && ./launcher.sh +``` ### For Mac users -1. Open a terminal and install brew with: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` -2. Then install git with: `brew install git` -3. Download Sillytavern Launcher with: `git clone https://github.com/SillyTavern/SillyTavern-Launcher.git` -4. Navigate to the SillyTavern-Launcher with: `cd SillyTavern-Launcher` -5. Start the install launcher with: `chmod +x install.sh && ./install.sh` and choose what you wanna install -6. After installation start the launcher with: `chmod +x launcher.sh && ./launcher.sh` +1. Open a terminal and install brew with: +```shell +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +``` +2. Install git with: +```shell +brew install git +``` +3. Git clone the Sillytavern-Launcher with: +```shell +git clone https://github.com/SillyTavern/SillyTavern-Launcher.git && cd SillyTavern-Launcher +``` +4. Start the installer.sh with: +```shell +chmod +x install.sh && ./install.sh +``` +5. After installation start the launcher.sh with: +```shell +chmod +x launcher.sh && ./launcher.sh +``` ## 🐋 Installing via Docker @@ -244,7 +268,7 @@ You will need two mandatory directory mappings and a port mapping to allow Silly ## API keys management -SillyTavern saves your API keys to a `secrets.json` file in the server directory. +SillyTavern saves your API keys to a `secrets.json` file in the user data directory (`/data/default-user/secrets.json` is the default path). By default, they will not be exposed to a frontend after you enter them and reload the page. @@ -259,7 +283,7 @@ Most often this is for people who want to use SillyTavern on their mobile phones However, it can be used to allow remote connections from anywhere as well. -**IMPORTANT: SillyTavern is a single-user program, so anyone who logs in will be able to see all characters and chats, and be able to change any settings inside the UI.** +**IMPORTANT: Refer to the official guide if you want to configure SillyTavern user accounts with (optional) password protection: [Users](https://docs.sillytavern.app/installation/st-1.12.0-migration-guide/#users).** ### 1. Managing whitelisted IPs diff --git a/default/content/index.json b/default/content/index.json index afefe114d..82cce2384 100644 --- a/default/content/index.json +++ b/default/content/index.json @@ -476,7 +476,11 @@ "type": "context" }, { - "filename": "presets/context/DreamGen Role-Play V1.json", + "filename": "presets/context/DreamGen Role-Play V1 ChatML.json", + "type": "context" + }, + { + "filename": "presets/context/DreamGen Role-Play V1 Llama3.json", "type": "context" }, { @@ -556,7 +560,11 @@ "type": "instruct" }, { - "filename": "presets/instruct/DreamGen Role-Play V1.json", + "filename": "presets/instruct/DreamGen Role-Play V1 ChatML.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/DreamGen Role-Play V1 Llama3.json", "type": "instruct" }, { diff --git a/default/content/presets/context/DreamGen Role-Play V1.json b/default/content/presets/context/DreamGen Role-Play V1 ChatML.json similarity index 94% rename from default/content/presets/context/DreamGen Role-Play V1.json rename to default/content/presets/context/DreamGen Role-Play V1 ChatML.json index 6698d27fa..9042ed758 100644 --- a/default/content/presets/context/DreamGen Role-Play V1.json +++ b/default/content/presets/context/DreamGen Role-Play V1 ChatML.json @@ -8,5 +8,5 @@ "trim_sentences": true, "include_newline": false, "single_line": false, - "name": "DreamGen Role-Play V1" + "name": "DreamGen Role-Play V1 ChatML" } \ No newline at end of file diff --git a/default/content/presets/context/DreamGen Role-Play V1 Llama3.json b/default/content/presets/context/DreamGen Role-Play V1 Llama3.json new file mode 100644 index 000000000..965e9632c --- /dev/null +++ b/default/content/presets/context/DreamGen Role-Play V1 Llama3.json @@ -0,0 +1,12 @@ +{ + "story_string": "<|start_header_id|>system<|end_header_id|>\n\n{{#if system}}{{system}}\n\n\n{{/if}}## Overall plot description:\n\n{{#if scenario}}{{scenario}}{{else}}Conversation between {{char}} and {{user}}.{{/if}}{{#if wiBefore}}\n\n{{wiBefore}}{{/if}}\n\n\n## Characters:\n\n### {{char}}\n\n{{#if description}}{{description}}\n\n{{/if}}{{#if personality}}{{personality}}\n\n{{/if}}### {{user}}\n\n{{#if persona}}{{persona}}{{else}}{{user}} is the protagonist of the role-play.{{/if}}{{#if wiAfter}}\n\n{{wiAfter}}{{/if}}{{#if mesExamples}}\n\n{{mesExamples}}{{/if}}", + "example_separator": "<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nWrite an example narrative / conversation that is not part of the main story.", + "chat_start": "<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nStart the role-play between {{char}} and {{user}}.", + "use_stop_strings": false, + "allow_jailbreak": false, + "always_force_name2": false, + "trim_sentences": true, + "include_newline": false, + "single_line": false, + "name": "DreamGen Role-Play V1 Llama3" +} \ No newline at end of file diff --git a/default/content/presets/instruct/DreamGen Role-Play V1.json b/default/content/presets/instruct/DreamGen Role-Play V1 ChatML.json similarity index 94% rename from default/content/presets/instruct/DreamGen Role-Play V1.json rename to default/content/presets/instruct/DreamGen Role-Play V1 ChatML.json index 002878b4d..0bca83455 100644 --- a/default/content/presets/instruct/DreamGen Role-Play V1.json +++ b/default/content/presets/instruct/DreamGen Role-Play V1 ChatML.json @@ -20,5 +20,5 @@ "user_alignment_message": "", "system_same_as_user": true, "last_system_sequence": "", - "name": "DreamGen Role-Play V1" + "name": "DreamGen Role-Play V1 ChatML" } diff --git a/default/content/presets/instruct/DreamGen Role-Play V1 Llama3.json b/default/content/presets/instruct/DreamGen Role-Play V1 Llama3.json new file mode 100644 index 000000000..ca1e285f3 --- /dev/null +++ b/default/content/presets/instruct/DreamGen Role-Play V1 Llama3.json @@ -0,0 +1,18 @@ +{ + "system_prompt": "You are an intelligent, skilled, versatile writer.\n\nYour task is to write a role-play based on the information below.", + "input_sequence": "<|eot_id|>\n<|start_header_id|>writer character: {{user}}<|end_header_id|>\n\n", + "output_sequence": "<|eot_id|>\n<|start_header_id|>writer character: {{char}}<|end_header_id|>\n\n", + "first_output_sequence": "", + "last_output_sequence": "", + "system_sequence_prefix": "", + "system_sequence_suffix": "", + "stop_sequence": "", + "separator_sequence": "", + "wrap": false, + "macro": true, + "names": false, + "names_force_groups": false, + "activation_regex": "", + "skip_examples": false, + "name": "DreamGen Role-Play V1 Llama3" +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 54a5ef2b0..fc3c67537 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,7 @@ "vectra": "^0.2.2", "wavefile": "^11.0.0", "write-file-atomic": "^5.0.1", - "ws": "^8.13.0", + "ws": "^8.17.1", "yaml": "^2.3.4", "yargs": "^17.7.1", "yauzl": "^2.10.0" @@ -4659,8 +4659,9 @@ } }, "node_modules/ws": { - "version": "8.13.0", - "license": "MIT", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "engines": { "node": ">=10.0.0" }, diff --git a/package.json b/package.json index d6ed0d933..d8496ad7a 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "vectra": "^0.2.2", "wavefile": "^11.0.0", "write-file-atomic": "^5.0.1", - "ws": "^8.13.0", + "ws": "^8.17.1", "yaml": "^2.3.4", "yargs": "^17.7.1", "yauzl": "^2.10.0" diff --git a/public/css/animations.css b/public/css/animations.css new file mode 100644 index 000000000..7ce3c8f0e --- /dev/null +++ b/public/css/animations.css @@ -0,0 +1,122 @@ +/* Fade animations with opacity */ +@keyframes fade-in { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes fade-out { + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +} + +/* Pop animations with opacity and vertical scaling */ +@keyframes pop-in { + 0% { + opacity: 0; + transform: scaleY(0); + } + + /* Make the scaling faster on pop-in, otherwise it looks a bit weird */ + 33% { + transform: scaleY(1); + } + + 100% { + opacity: 1; + transform: scaleY(1); + } +} + +@keyframes pop-out { + 0% { + opacity: 1; + transform: scaleY(1); + } + + 100% { + opacity: 0; + transform: scaleY(0); + } +} + +/* Flashing for highlighting animation */ +@keyframes flash { + + 20%, + 60%, + 100% { + opacity: 1; + } + + 0%, + 40%, + 80% { + opacity: 0.2; + } +} + +/* Pulsing highlight, slightly resizing the element */ +@keyframes pulse { + from { + transform: scale(1); + filter: brightness(1.1); + } + + to { + transform: scale(1.01); + filter: brightness(1.3); + } +} + +/* Ellipsis animation */ +@keyframes ellipsis { + 0% { + content: "" + } + + 25% { + content: "." + } + + 50% { + content: ".." + } + + 75% { + content: "..." + } +} + +/* HEINOUS */ +@keyframes infinite-spinning { + from { + transform: rotate(0deg); + } + + to { + transform: rotate(360deg); + } +} + +/* STscript animation */ +@keyframes script_progress_pulse { + + 0%, + 100% { + border-top-color: var(--progColor); + } + + 50% { + border-top-color: var(--progFlashColor); + } +} diff --git a/public/css/logprobs.css b/public/css/logprobs.css index a47089467..4f129932a 100644 --- a/public/css/logprobs.css +++ b/public/css/logprobs.css @@ -98,7 +98,7 @@ font-weight: bold; } -.logprobs_top_candidate:not([disabled]):hover, .logprobs_top_candidate:not([disabled]):focus { +.logprobs_top_candidate:not([disabled]):hover { background-color: rgba(0, 0, 0, 0.3); } diff --git a/public/css/popup.css b/public/css/popup.css new file mode 100644 index 000000000..345f69f9b --- /dev/null +++ b/public/css/popup.css @@ -0,0 +1,131 @@ +dialog { + color: var(--SmartThemeBodyColor); +} + +/* Closed state of the dialog */ +.popup { + width: 500px; + text-align: center; + box-shadow: 0px 0px 14px var(--black70a); + border: 1px solid var(--SmartThemeBorderColor); + padding: 4px 14px; + background-color: var(--SmartThemeBlurTintColor); + border-radius: 10px; + display: flex; + flex-direction: column; + + /* Overflow visible so elements (like toasts) can appear outside of the dialog. '.popup-body' is hiding overflow for the real content. */ + overflow: visible; + + /* Fix weird animation issue with font-scaling during popup open */ + backface-visibility: hidden; + transform: translateZ(0); + -webkit-font-smoothing: subpixel-antialiased; +} + +.popup .popup-body { + display: flex; + flex-direction: column; + overflow: hidden; + width: 100%; + height: 100%; + padding: 1px; +} + +.popup .popup-content { + margin-top: 10px; + padding: 0 8px; + overflow: hidden; + flex-grow: 1; +} + +.popup .popup-content h3:first-child { + /* No double spacing for the first heading needed, the .popup-content already has margin */ + margin-top: 0px; +} + +.popup.vertical_scrolling_dialogue_popup .popup-content { + overflow-y: auto; +} + +.popup.horizontal_scrolling_dialogue_popup .popup-content { + overflow-x: auto; +} + +/* Opening animation */ +.popup[opening] { + animation: pop-in var(--animation-duration-slow) ease-in-out; +} + +.popup[opening]::backdrop { + animation: fade-in var(--animation-duration-slow) ease-in-out; +} + +/* Open state of the dialog */ +.popup[open] { + color: var(--SmartThemeBodyColor); +} + +.popup[open]::backdrop { + backdrop-filter: blur(calc(var(--SmartThemeBlurStrength) * 2)); + -webkit-backdrop-filter: blur(calc(var(--SmartThemeBlurStrength) * 2)); + background-color: var(--black30a); +} + +/* Closing animation */ +.popup[closing] { + animation: pop-out var(--animation-duration-slow) ease-in-out; +} + +.popup[closing]::backdrop { + animation: fade-out var(--animation-duration-slow) ease-in-out; +} + +/* Fix toastr in dialogs by actually placing it at the top of the screen via transform */ +.popup #toast-container { + height: 100svh; + top: calc(50% + var(--topBarBlockSize)); + left: 50%; + transform: translate(-50%, -50%); +} + +.popup-input { + margin-top: 10px; +} + +.popup-controls { + margin-top: 10px; + display: flex; + align-self: center; + gap: 20px; +} + +.menu_button.menu_button_default { + box-shadow: 0 0 5px var(--white20a); +} + +.menu_button.popup-button-ok { + background-color: var(--crimson70a); + cursor: pointer; +} + +.menu_button.popup-button-ok:hover { + background-color: var(--crimson-hover); +} + +.menu_button.popup-button-custom { + /* Custom buttons should not scale to smallest size, otherwise they will always break to multiline */ + width: unset; +} + +.popup-controls .menu_button { + /* Fix weird animation issue with fonts on brightness filter */ + backface-visibility: hidden; + transform: translateZ(0); + -webkit-font-smoothing: subpixel-antialiased; +} + +.popup-controls .menu_button:hover:focus-visible { + filter: brightness(1.3) saturate(1.3); +} + diff --git a/public/css/select2-overrides.css b/public/css/select2-overrides.css index a67f7bf10..01577846e 100644 --- a/public/css/select2-overrides.css +++ b/public/css/select2-overrides.css @@ -181,8 +181,9 @@ } .select2-selection__choice__display { - /* Fix weird alignment on the left side */ - margin-left: 1px; + /* Fix weird alignment of the inside block */ + margin-left: 3px; + margin-right: 1px; } /* Styling for choice remove icon */ diff --git a/public/css/st-tailwind.css b/public/css/st-tailwind.css index 143a6167c..d43bd8e01 100644 --- a/public/css/st-tailwind.css +++ b/public/css/st-tailwind.css @@ -292,6 +292,14 @@ flex-wrap: nowrap; } +.inline-flex { + display: inline-flex; +} + +.inline-block { + display: inline-block; +} + .alignitemscenter, .alignItemsCenter { align-items: center; @@ -348,6 +356,10 @@ margin-right: 5px; } +.margin-r2 { + margin-right: 2px; +} + .flex0 { flex: 0; } diff --git a/public/css/tags.css b/public/css/tags.css index f9896d992..4de9e89cc 100644 --- a/public/css/tags.css +++ b/public/css/tags.css @@ -14,7 +14,7 @@ display: flex; flex-direction: row; align-items: center; - gap: 10px; + gap: 6px; margin-bottom: 5px; } @@ -27,8 +27,19 @@ flex: 1; } +.tag_view_color_picker { + position: relative; +} + +.tag_view_color_picker .link_icon { + position: absolute; + top: 50%; + right: 0px; + opacity: 0.5; +} + .tag_delete { - padding-right: 0; + padding: 2px 4px; color: var(--SmartThemeBodyColor) !important; } @@ -108,6 +119,14 @@ opacity: 0.6; } +#tagList .tag:has(.tag_remove:hover) { + opacity: 1; +} + +#tagList .tag:has(.tag_remove:hover) .tag_name { + opacity: 0.6; +} + .tags.tags_inline { opacity: 0.6; column-gap: 0.2rem; @@ -164,6 +183,7 @@ .tag.selected { opacity: 1 !important; filter: none !important; + border: 1px solid lightgreen; } .tag.excluded { diff --git a/public/index.html b/public/index.html index 3db82436b..04b88404a 100644 --- a/public/index.html +++ b/public/index.html @@ -33,7 +33,6 @@ - @@ -73,8 +72,8 @@
@@ -2552,6 +2551,7 @@

Claude Model

-
+

@@ -4491,7 +4491,7 @@
-

+

-