diff --git a/.github/close-label.yml b/.github/close-label.yml new file mode 100644 index 000000000..5f2bfa5ee --- /dev/null +++ b/.github/close-label.yml @@ -0,0 +1,2 @@ +πŸ› Bug: βœ… Fixed +πŸ¦„ Feature Request: βœ… Implemented \ No newline at end of file diff --git a/.github/issue-auto-comments.yml b/.github/issue-auto-comments.yml new file mode 100644 index 000000000..8947d4e1a --- /dev/null +++ b/.github/issue-auto-comments.yml @@ -0,0 +1,62 @@ +comment: + footer: | + --- + > I am a bot, and this is an automated message πŸ€– +labels: + - name: βœ–οΈ Invalid + labeled: + issue: + action: close + body: > + Hello @{{ issue.user.login }} your ticket has been marked as invalid. + Please ensure you follow the issue template, provide all requested info, + and be sure to check the docs + previous issues prior to raising tickets. + pr: + body: Thank you @{{ pull_request.user.login }} for suggesting this. Please follow the pull request templates. + action: close + + - name: πŸ‘©β€πŸ’» Good First Issue + labeled: + issue: + body: > + This issue has been marked as a good first issue for first-time contributors to implement! + This is a great way to support the project, while also improving your skills, you'll also be credited as a contributor once your PR is merged. + If you're new to SillyTavern [here are a collection of resources](https://docs.sillytavern.app/) + If you need any support at all, feel free to reach out via [Discord](https://discord.gg/sillytavern). + + - name: ❌ wontfix + labeled: + issue: + action: close + body: > + This ticked has been marked as 'wontfix', which usually means it is out-of-scope, or not feasible at this time. + You can still fork the project and make the changes yourself. + + - name: βœ… Fixed + labeled: + issue: + body: > + Hello @{{ issue.user.login }}! It looks like all or part of this issue has now been implemented. + + + - name: ‼️ High Priority + labeled: + issue: + body: > + This ticket has been marked as high priority, and has been bumped to the top of the priority list. + You should expect an implementation to be pushed out soon. Thank you for your patience. + + - name: πŸ’€ Spam + labeled: + issue: + action: close + locking: lock + lock_reason: spam + body: > + This issue has been identified as spam, and is now locked. + Users who repeatedly raise spam issues may be blocked or reported. + + - name: β›” Don't Merge + labeled: + pr: + body: This PR has been temporarily blocked from merging. \ No newline at end of file diff --git a/.github/workflows/add-comment-from-tag.yml b/.github/workflows/add-comment-from-tag.yml new file mode 100644 index 000000000..548f83eac --- /dev/null +++ b/.github/workflows/add-comment-from-tag.yml @@ -0,0 +1,28 @@ +# Based on a label applied to an issue, the bot will add a comment with some additional info + +name: 🎯 Auto-Reply to Labeled Tickets +on: + issues: + types: + - labeled + - unlabeled + pull_request_target: + types: + - labeled + - unlabeled +permissions: + contents: read + issues: write + pull-requests: write + +jobs: + comment: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Label Commenter + uses: peaceiris/actions-label-commenter@v1 + with: + config_file: .github/issue-auto-comments.yml + github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/check-merge-conflicts.yml b/.github/workflows/check-merge-conflicts.yml new file mode 100644 index 000000000..e1cbc9d0a --- /dev/null +++ b/.github/workflows/check-merge-conflicts.yml @@ -0,0 +1,16 @@ +# Detect and label pull requests that have merge conflicts +name: πŸ—οΈ Check Merge Conflicts +on: + push: + branches: + - staging +jobs: + check-conflicts: + runs-on: ubuntu-latest + steps: + - uses: mschilde/auto-label-merge-conflicts@master + with: + CONFLICT_LABEL_NAME: "🚫 Merge Conflicts" + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + MAX_RETRIES: 5 + WAIT_MS: 5000 \ No newline at end of file diff --git a/.github/workflows/close-stale-issues.yml b/.github/workflows/close-stale-issues.yml new file mode 100644 index 000000000..1d34a6b1c --- /dev/null +++ b/.github/workflows/close-stale-issues.yml @@ -0,0 +1,82 @@ +# Closes any issues that no longer have user interaction +name: 🎯 Close Stale Issues + +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * *' # Runs every day at midnight UTC + +jobs: + stale: + runs-on: ubuntu-latest + + steps: + # Comment on, then close issues that haven't been updated for ages + - name: Close Stale Issues + uses: actions/stale@v4 + with: + repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + days-before-stale: 360 + days-before-close: 5 + 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. + 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. + close-issue-message: > + This issue was automatically closed because it has been stalled for over 1 year with no activity. + close-pr-message: > + This pull request was automatically closed because it has been stalled for over 1 year with no activity. + stale-issue-label: '⚰️ Stale' + close-issue-label: 'πŸ•ΈοΈ Inactive' + stale-pr-label: '⚰️ Stale' + close-pr-label: 'πŸ•ΈοΈ Inactive' + exempt-issue-labels: 'πŸ“Œ Keep Open' + exempt-pr-labels: 'πŸ“Œ Keep Open' + labels-to-add-when-unstale: 'πŸ“Œ Keep Open' + + # Comment on, then close issues that required a response from the user, but didn't get one + - name: Close Issues without Response + uses: actions/stale@v4 + with: + repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + days-before-stale: 5 + days-before-close: 3 + operations-per-run: 30 + remove-stale-when-updated: true + stale-issue-message: > + Hi! Looks like additional info is required for this issue to be addressed. + Don't forget to provide this within the next few days to keep your ticket open. + close-issue-message: 'Issue closed due to no response from user.' + only-labels: '🚏 Awaiting User Response' + labels-to-remove-when-unstale: '🚏 Awaiting User Response, πŸ›‘ No Response' + stale-issue-label: 'πŸ›‘ No Response' + close-issue-label: 'πŸ•ΈοΈ Inactive' + exempt-issue-labels: 'πŸ“Œ Keep Open' + exempt-pr-labels: 'πŸ“Œ Keep Open' + + # Comment on issues that we should have replied to + - name: Notify Repo Owner to Respond + uses: actions/stale@v4 + with: + repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + days-before-stale: 7 + days-before-close: 365 + operations-per-run: 30 + remove-stale-when-updated: true + stale-issue-message: Hey SillyTavern, - Don't forget to respond! + stale-pr-message: Hey SillyTavern, - Don't forget to respond! + only-labels: 'πŸ‘€ Awaiting Maintainer Response' + labels-to-remove-when-unstale: 'πŸ‘€ Awaiting Maintainer Response' + close-issue-message: 'Closed due to no response from repo author for over a year' + close-pr-message: 'Closed due to no response from repo author for over a year' + stale-issue-label: 'πŸ‘€ Awaiting Maintainer Response' + stale-pr-label: 'πŸ‘€ Awaiting Maintainer Response' + close-issue-label: 'πŸ•ΈοΈ Inactive' + close-pr-label: 'πŸ•ΈοΈ Inactive' + exempt-issue-labels: 'πŸ“Œ Keep Open' + exempt-pr-labels: 'πŸ“Œ Keep Open' \ No newline at end of file diff --git a/.github/workflows/get-pr-size.yml b/.github/workflows/get-pr-size.yml new file mode 100644 index 000000000..ac5f9d4d3 --- /dev/null +++ b/.github/workflows/get-pr-size.yml @@ -0,0 +1,39 @@ +# Adds a comment to new PRs, showing the compressed size and size difference of new code +# And also labels the PR based on the number of lines changes + +name: 🌈 Check PR Size +on: [pull_request] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + # Find and comment with compressed size + - name: Get Compressed Size + uses: preactjs/compressed-size-action@v2 + with: + repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + pattern: './dist/**/*.{js,css,html}' + strip-hash: '\\b\\w{8}\\.' + exclude: '**/node_modules/**' + minimum-change-threshold: 100 + # Check number of lines of code added + - name: Label based on Lines of Code + uses: codelytv/pr-size-labeler@v1 + with: + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + xs_max_size: '10' + s_max_size: '100' + m_max_size: '500' + l_max_size: '1000' + s_label: '🟩 PR - Small' + m_label: '🟨 PR - Medium' + l_label: '🟧 PR - Large' + xl_label: 'πŸŸ₯ PR - XL' + fail_if_xl: 'false' + message_if_xl: > + It looks like this PR is very large (over 1000 lines). + Try to avoid addressing multiple issues in a single PR, and + in the future consider breaking large tasks down into smaller steps. + This it to make reviewing, testing, reverting and general quality management easier. \ No newline at end of file diff --git a/.github/workflows/manage-pending-labels-closed.yml b/.github/workflows/manage-pending-labels-closed.yml new file mode 100644 index 000000000..892f2f8f9 --- /dev/null +++ b/.github/workflows/manage-pending-labels-closed.yml @@ -0,0 +1,17 @@ +# When a new comment is added to an issue, if it had the Stale or Awaiting User Response labels, then those labels will be removed + +name: 🎯 Remove Pending Labels on Close +on: + issues: + types: [closed] +jobs: + remove-labels: + runs-on: ubuntu-latest + steps: + - name: Remove Labels when Closed + uses: actions-cool/issues-helper@v2 + with: + actions: remove-labels + token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + labels: '🚏 Awaiting User Response,⚰️ Stale,πŸ‘€ Awaiting Maintainer Response' \ No newline at end of file diff --git a/.github/workflows/manage-pending-labels.yml b/.github/workflows/manage-pending-labels.yml new file mode 100644 index 000000000..44d91b523 --- /dev/null +++ b/.github/workflows/manage-pending-labels.yml @@ -0,0 +1,42 @@ +# When a new comment is added to an issue, if it had the Stale or Awaiting User Response labels, then those labels will be removed + +name: 🎯 Add/ Remove Awaiting Response Labels +on: + issue_comment: + types: [created] +jobs: + remove-stale: + runs-on: ubuntu-latest + if: ${{ github.event.comment.author_association != 'COLLABORATOR' && github.event.comment.author_association != 'OWNER' }} + steps: + - name: Remove Stale labels when Updated + uses: actions-cool/issues-helper@v2 + with: + actions: remove-labels + token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + labels: '🚏 Awaiting User Response,⚰️ Stale' + + add-awaiting-author: + runs-on: ubuntu-latest + if: ${{!github.event.issue.pull_request && github.event.comment.author_association != 'COLLABORATOR' && github.event.comment.author_association != 'OWNER' && github.event.issue.state == 'open' }} + steps: + - name: Add Awaiting Author labels when Updated + uses: actions-cool/issues-helper@v2 + with: + actions: add-labels + token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + labels: 'πŸ‘€ Awaiting Maintainer Response' + + remove-awaiting-author: + runs-on: ubuntu-latest + if: ${{ github.event.comment.author_association == 'OWNER' }} + steps: + - name: Remove Awaiting Author labels when Updated + uses: actions-cool/issues-helper@v2 + with: + actions: remove-labels + token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + labels: 'πŸ‘€ Awaiting Maintainer Response' \ No newline at end of file diff --git a/default/content/index.json b/default/content/index.json index 73c869a20..390bad271 100644 --- a/default/content/index.json +++ b/default/content/index.json @@ -651,4 +651,20 @@ "filename": "presets/quick-replies/Default.json", "type": "quick_replies" } + { + "filename": "presets/instruct/Llama-3-Instruct-Names.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/ChatML-Names.json", + "type": "instruct" + }, + { + "filename": "presets/context/Llama-3-Instruct-Names.json", + "type": "context" + }, + { + "filename": "presets/context/ChatML-Names.json", + "type": "context" + }, ] diff --git a/default/content/presets/context/ChatML-Names.json b/default/content/presets/context/ChatML-Names.json new file mode 100644 index 000000000..691d3179c --- /dev/null +++ b/default/content/presets/context/ChatML-Names.json @@ -0,0 +1,12 @@ +{ + "story_string": "<|im_start|>system\n{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{trim}}<|im_end|>", + "example_separator": "", + "chat_start": "", + "use_stop_strings": false, + "allow_jailbreak": false, + "always_force_name2": true, + "trim_sentences": false, + "include_newline": false, + "single_line": false, + "name": "ChatML-Names" +} diff --git a/default/content/presets/context/Llama-3-Instruct-Names.json b/default/content/presets/context/Llama-3-Instruct-Names.json new file mode 100644 index 000000000..2850293e0 --- /dev/null +++ b/default/content/presets/context/Llama-3-Instruct-Names.json @@ -0,0 +1,12 @@ +{ + "story_string": "<|start_header_id|>system<|end_header_id|>\n\n{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{trim}}<|eot_id|>", + "example_separator": "", + "chat_start": "", + "use_stop_strings": false, + "allow_jailbreak": false, + "always_force_name2": true, + "trim_sentences": false, + "include_newline": false, + "single_line": false, + "name": "Llama-3-Instruct-Names" +} diff --git a/default/content/presets/instruct/ChatML-Names.json b/default/content/presets/instruct/ChatML-Names.json new file mode 100644 index 000000000..d79682005 --- /dev/null +++ b/default/content/presets/instruct/ChatML-Names.json @@ -0,0 +1,24 @@ +{ + "system_prompt": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.", + "input_sequence": "<|im_start|>[{{name}}]", + "output_sequence": "<|im_start|>[{{name}}]", + "last_output_sequence": "", + "system_sequence": "<|im_start|>system", + "stop_sequence": "<|im_end|>", + "wrap": true, + "macro": true, + "names": false, + "names_force_groups": false, + "activation_regex": "", + "system_sequence_prefix": "", + "system_sequence_suffix": "", + "first_output_sequence": "", + "skip_examples": false, + "output_suffix": "<|im_end|>\n", + "input_suffix": "<|im_end|>\n", + "system_suffix": "<|im_end|>\n", + "user_alignment_message": "", + "system_same_as_user": false, + "last_system_sequence": "", + "name": "ChatML-Names" +} diff --git a/default/content/presets/instruct/Llama-3-Instruct-Names.json b/default/content/presets/instruct/Llama-3-Instruct-Names.json new file mode 100644 index 000000000..0df661835 --- /dev/null +++ b/default/content/presets/instruct/Llama-3-Instruct-Names.json @@ -0,0 +1,24 @@ +{ + "system_prompt": "You are an expert actor that can fully immerse yourself into any role given. You do not break character for any reason, even if someone tries addressing you as an AI or language model. Currently your role is {{char}}, which is described in detail below. As {{char}}, continue the exchange with {{user}}.", + "input_sequence": "<|start_header_id|>[{{name}}]<|end_header_id|>\n\n", + "output_sequence": "<|start_header_id|>[{{name}}]<|end_header_id|>\n\n", + "last_output_sequence": "", + "system_sequence": "<|start_header_id|>system<|end_header_id|>\n\n", + "stop_sequence": "<|eot_id|>", + "wrap": false, + "macro": true, + "names": false, + "names_force_groups": false, + "activation_regex": "", + "system_sequence_prefix": "", + "system_sequence_suffix": "", + "first_output_sequence": "", + "skip_examples": false, + "output_suffix": "<|eot_id|>", + "input_suffix": "<|eot_id|>", + "system_suffix": "<|eot_id|>", + "user_alignment_message": "", + "system_same_as_user": true, + "last_system_sequence": "", + "name": "Llama-3-Instruct-Names" +} diff --git a/public/css/mobile-styles.css b/public/css/mobile-styles.css index 8456d54a0..0a9345316 100644 --- a/public/css/mobile-styles.css +++ b/public/css/mobile-styles.css @@ -309,6 +309,10 @@ object-fit: cover; } + body.waifuMode .zoomed_avatar_container { + height: 100%; + } + body.waifuMode .zoomed_avatar { width: fit-content; max-height: calc(60vh - 60px); diff --git a/public/css/toggle-dependent.css b/public/css/toggle-dependent.css index 834e31c31..942ada831 100644 --- a/public/css/toggle-dependent.css +++ b/public/css/toggle-dependent.css @@ -19,7 +19,8 @@ body.no-timer .mes_timer, body.no-timestamps .timestamp, body.no-tokenCount .tokenCounterDisplay, body.no-mesIDDisplay .mesIDDisplay, -body.no-modelIcons .icon-svg { +body.no-modelIcons .icon-svg, +body.hideChatAvatars .mesAvatarWrapper .avatar { display: none !important; } @@ -123,10 +124,16 @@ body.charListGrid #rm_print_characters_block .bogus_folder_select_back .avatar { } /* Hack for keeping the spacing */ +/* body.charListGrid #rm_print_characters_block .ch_add_placeholder { display: flex !important; opacity: 0; } +*/ + +body.charListGrid #rm_print_characters_block .ch_additional_info { + display: none; +} /*big avatars mode page-wide changes*/ diff --git a/public/index.html b/public/index.html index 3e0a29374..e9e6fb490 100644 --- a/public/index.html +++ b/public/index.html @@ -650,36 +650,36 @@
-
- Scenario format template +
+ Scenario format template
- Use {{scenario}} to mark a place where the content is inserted. + Use {{scenario}} to mark a place where the content is inserted.
-
- Personality format template +
+ Personality format template
- Use {{personality}} to mark a place where the content is inserted. + Use {{personality}} to mark a place where the content is inserted.
-
- Group Nudge prompt template +
+ Group Nudge prompt template
@@ -694,8 +694,8 @@
-
- New Chat +
+ New Chat
@@ -742,14 +742,14 @@
-
- Continue nudge +
+ Continue nudge
- + Set at the end of the chat history when the continue button is pressed.
@@ -1690,7 +1690,7 @@
Continue Postfix - + ()
@@ -2810,7 +2810,7 @@ - View hidden API keys + View hidden API keys
@@ -3520,7 +3520,7 @@ Account
-
-

Theme Settings

+
Avatars: @@ -3581,50 +3581,98 @@
-
-
- - Main Text +
+
+ Theme Colors +
-
- - Italics Text -
-
- - Underlined Text -
-
- - Quote Text -
-
- - Text Shadow -
-
- - Chat Background -
-
- - UI Background -
-
- - UI Border -
-
- - User Message -
-
- - AI Message +
+
+
+ + Main Text +
+
+ + Italics Text +
+
+ + Underlined Text +
+
+ + Quote Text +
+
+ + Text Shadow +
+
+ + Chat Background +
+
+ + UI Background +
+
+ + UI Border +
+
+ + User Message +
+
+ + AI Message +
+
-
-
+
+
+ +
+ + Chat Width +
+
+ + +
+ +
+ + Font Scale +
+
+ + +
+ +
+ + Blur Strength +
+
+ + +
+ +
+ + Text Shadow Width +
+
+ + +
+ + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + +
+ +
-
-

Theme Toggles

-
- + +
@@ -5074,7 +5159,7 @@ Content - (Tokens:  counting...)  + (Tokens:  counting...
@@ -5389,9 +5474,9 @@

Welcome to SillyTavern!

SillyTavern is aimed at advanced users. @@ -5412,7 +5497,7 @@ Before you get started, you must select a persona name. - This can be changed at any time via the icon. + This can be changed at any time via the icon.

Persona Name:

@@ -5573,17 +5658,17 @@
- Author's Note + Author's Note
- Unique to this chat.
- Checkpoints inherit the Note from their parent, and can be changed individually after that.
+ Unique to this chat.
+ Checkpoints inherit the Note from their parent, and can be changed individually after that.
- Tokens: 0 + Tokens: 0

- User inputs until next insertion: (disabled) + User inputs until next insertion: (disabled)

@@ -5636,11 +5721,11 @@
- Will be automatically added as the author's note for this character. Will be used in groups, but + Will be automatically added as the author's note for this character. Will be used in groups, but can't be modified when a group chat is open.
- Tokens: 0 + Tokens: 0
@@ -5665,14 +5750,14 @@
- Default Author's Note + Default Author's Note
- Will be automatically added as the Author's Note for all new chats. + Will be automatically added as the Author's Note for all new chats.
- Tokens: 0 + Tokens: 0