sillytavern 1.16.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/.dockerignore +1 -0
  2. package/.eslintrc.cjs +23 -0
  3. package/config.yaml +24 -1
  4. package/default/config.yaml +24 -1
  5. package/default/content/index.json +4 -0
  6. package/default/content/presets/instruct/KoboldAI.json +1 -1
  7. package/default/content/presets/reasoning/Think XML.json +6 -0
  8. package/default/content/settings.json +1 -1
  9. package/index.d.ts +1 -1
  10. package/package.json +11 -9
  11. package/plugins.js +4 -3
  12. package/public/css/backgrounds.css +207 -16
  13. package/public/css/loader.css +57 -0
  14. package/public/css/mobile-styles.css +72 -1
  15. package/public/css/popup.css +4 -0
  16. package/public/css/toggle-dependent.css +6 -0
  17. package/public/global.d.ts +4 -1
  18. package/public/index.html +131 -9
  19. package/public/lib.js +5 -0
  20. package/public/locales/ar-sa.json +17 -1
  21. package/public/locales/de-de.json +17 -1
  22. package/public/locales/es-es.json +17 -1
  23. package/public/locales/fr-fr.json +21 -5
  24. package/public/locales/is-is.json +17 -1
  25. package/public/locales/it-it.json +17 -1
  26. package/public/locales/ja-jp.json +17 -1
  27. package/public/locales/ko-kr.json +18 -2
  28. package/public/locales/nl-nl.json +17 -1
  29. package/public/locales/pt-pt.json +17 -1
  30. package/public/locales/ru-ru.json +20 -4
  31. package/public/locales/th-th.json +17 -1
  32. package/public/locales/uk-ua.json +17 -1
  33. package/public/locales/vi-vn.json +17 -1
  34. package/public/locales/zh-cn.json +1813 -482
  35. package/public/locales/zh-tw.json +21 -5
  36. package/public/script.js +426 -275
  37. package/public/scripts/BulkEditOverlay.js +10 -9
  38. package/public/scripts/PromptManager.js +1 -3
  39. package/public/scripts/RossAscends-mods.js +15 -19
  40. package/public/scripts/action-loader-slashcommands.js +355 -0
  41. package/public/scripts/action-loader.js +572 -0
  42. package/public/scripts/authors-note.js +2 -4
  43. package/public/scripts/autocomplete/AutoComplete.js +0 -5
  44. package/public/scripts/autocomplete/AutoCompleteFuzzyScore.js +0 -3
  45. package/public/scripts/autocomplete/AutoCompleteNameResult.js +0 -1
  46. package/public/scripts/autocomplete/AutoCompleteNameResultBase.js +2 -3
  47. package/public/scripts/autocomplete/AutoCompleteOption.js +1 -2
  48. package/public/scripts/backgrounds.js +799 -33
  49. package/public/scripts/bookmarks.js +58 -16
  50. package/public/scripts/bulk-edit.js +1 -1
  51. package/public/scripts/cfg-scale.js +0 -1
  52. package/public/scripts/chat-backups.js +1 -1
  53. package/public/scripts/chats.js +3 -6
  54. package/public/scripts/constants.js +2 -0
  55. package/public/scripts/custom-request.js +1 -1
  56. package/public/scripts/data-maid.js +0 -1
  57. package/public/scripts/dynamic-styles.js +1 -2
  58. package/public/scripts/events.js +4 -0
  59. package/public/scripts/extensions/assets/index.js +7 -14
  60. package/public/scripts/extensions/attachments/manage-button.html +1 -1
  61. package/public/scripts/extensions/caption/index.js +4 -8
  62. package/public/scripts/extensions/caption/settings.html +9 -0
  63. package/public/scripts/extensions/expressions/index.js +16 -29
  64. package/public/scripts/extensions/gallery/index.js +21 -1
  65. package/public/scripts/extensions/memory/index.js +15 -8
  66. package/public/scripts/extensions/quick-reply/api/QuickReplyApi.js +9 -15
  67. package/public/scripts/extensions/quick-reply/index.js +13 -17
  68. package/public/scripts/extensions/quick-reply/src/AutoExecuteHandler.js +1 -5
  69. package/public/scripts/extensions/quick-reply/src/QuickReply.js +105 -116
  70. package/public/scripts/extensions/quick-reply/src/QuickReplyConfig.js +12 -20
  71. package/public/scripts/extensions/quick-reply/src/QuickReplyContextLink.js +0 -2
  72. package/public/scripts/extensions/quick-reply/src/QuickReplySet.js +25 -26
  73. package/public/scripts/extensions/quick-reply/src/QuickReplySetLink.js +6 -14
  74. package/public/scripts/extensions/quick-reply/src/QuickReplySettings.js +2 -8
  75. package/public/scripts/extensions/quick-reply/src/SlashCommandHandler.js +13 -21
  76. package/public/scripts/extensions/quick-reply/src/ui/ButtonUi.js +6 -14
  77. package/public/scripts/extensions/quick-reply/src/ui/SettingsUi.js +30 -38
  78. package/public/scripts/extensions/quick-reply/src/ui/ctx/ContextMenu.js +0 -4
  79. package/public/scripts/extensions/quick-reply/src/ui/ctx/MenuItem.js +0 -3
  80. package/public/scripts/extensions/quick-reply/src/ui/ctx/SubMenu.js +0 -4
  81. package/public/scripts/extensions/regex/index.js +0 -1
  82. package/public/scripts/extensions/shared.js +1 -0
  83. package/public/scripts/extensions/stable-diffusion/index.js +147 -32
  84. package/public/scripts/extensions/stable-diffusion/settings.html +1 -1
  85. package/public/scripts/extensions/token-counter/index.js +0 -1
  86. package/public/scripts/extensions/tts/alltalk.js +0 -1
  87. package/public/scripts/extensions/tts/chatterbox.js +0 -3
  88. package/public/scripts/extensions/tts/coqui.js +16 -21
  89. package/public/scripts/extensions/tts/cosyvoice.js +0 -6
  90. package/public/scripts/extensions/tts/elevenlabs.js +1 -1
  91. package/public/scripts/extensions/tts/google-native.js +0 -2
  92. package/public/scripts/extensions/tts/gpt-sovits-v2.js +0 -8
  93. package/public/scripts/extensions/tts/gsvi.js +0 -9
  94. package/public/scripts/extensions/tts/index.js +59 -35
  95. package/public/scripts/extensions/tts/kokoro-worker.js +1 -1
  96. package/public/scripts/extensions/tts/minimax.js +0 -2
  97. package/public/scripts/extensions/tts/openai.js +0 -1
  98. package/public/scripts/extensions/tts/silerotts.js +0 -1
  99. package/public/scripts/extensions/tts/system.js +1 -2
  100. package/public/scripts/extensions/tts/vits.js +2 -4
  101. package/public/scripts/extensions/tts/xtts.js +0 -1
  102. package/public/scripts/extensions/vectors/index.js +57 -6
  103. package/public/scripts/extensions/vectors/settings.html +11 -0
  104. package/public/scripts/extensions.js +89 -10
  105. package/public/scripts/f-localStorage.js +0 -1
  106. package/public/scripts/filters.js +1 -3
  107. package/public/scripts/group-chats.js +29 -35
  108. package/public/scripts/horde.js +1 -2
  109. package/public/scripts/i18n.js +5 -0
  110. package/public/scripts/input-md-formatting.js +4 -5
  111. package/public/scripts/instruct-mode.js +0 -1
  112. package/public/scripts/kai-settings.js +1 -2
  113. package/public/scripts/keyboard.js +6 -0
  114. package/public/scripts/loader.js +49 -66
  115. package/public/scripts/logit-bias.js +4 -10
  116. package/public/scripts/macros/definitions/chat-macros.js +12 -0
  117. package/public/scripts/macros/definitions/core-macros.js +24 -3
  118. package/public/scripts/macros/definitions/env-macros.js +24 -0
  119. package/public/scripts/macros/engine/MacroCstWalker.js +2 -3
  120. package/public/scripts/macros/engine/MacroEnv.types.js +2 -0
  121. package/public/scripts/macros/engine/MacroEnvBuilder.js +10 -1
  122. package/public/scripts/macros.js +8 -2
  123. package/public/scripts/nai-settings.js +6 -12
  124. package/public/scripts/openai.js +245 -144
  125. package/public/scripts/personas.js +18 -44
  126. package/public/scripts/popup.js +146 -10
  127. package/public/scripts/power-user.js +103 -235
  128. package/public/scripts/preset-manager.js +2 -5
  129. package/public/scripts/reasoning.js +80 -5
  130. package/public/scripts/request-compression.js +131 -0
  131. package/public/scripts/samplerSelect.js +2 -5
  132. package/public/scripts/secrets.js +31 -1
  133. package/public/scripts/showdown-underscore.js +1 -1
  134. package/public/scripts/slash-commands/SlashCommand.js +3 -6
  135. package/public/scripts/slash-commands/SlashCommandArgument.js +1 -2
  136. package/public/scripts/slash-commands/SlashCommandAutoCompleteNameResult.js +13 -13
  137. package/public/scripts/slash-commands/SlashCommandBrowser.js +15 -15
  138. package/public/scripts/slash-commands/SlashCommandClosure.js +17 -17
  139. package/public/scripts/slash-commands/SlashCommandCommandAutoCompleteOption.js +0 -2
  140. package/public/scripts/slash-commands/SlashCommandCommonEnumsProvider.js +7 -1
  141. package/public/scripts/slash-commands/SlashCommandDebugController.js +4 -9
  142. package/public/scripts/slash-commands/SlashCommandEnumAutoCompleteOption.js +1 -2
  143. package/public/scripts/slash-commands/SlashCommandExecutionError.js +0 -1
  144. package/public/scripts/slash-commands/SlashCommandExecutor.js +6 -6
  145. package/public/scripts/slash-commands/SlashCommandParser.js +20 -20
  146. package/public/scripts/slash-commands/SlashCommandScope.js +3 -5
  147. package/public/scripts/slash-commands.js +1365 -74
  148. package/public/scripts/sse-stream.js +20 -32
  149. package/public/scripts/st-context.js +8 -0
  150. package/public/scripts/stats.js +1 -2
  151. package/public/scripts/swipe-picker.js +403 -0
  152. package/public/scripts/tags.js +96 -18
  153. package/public/scripts/templates/itemizationText.html +11 -11
  154. package/public/scripts/templates/tabbyDownloader.html +1 -1
  155. package/public/scripts/templates/wandMenu.html +1 -0
  156. package/public/scripts/templates/welcomePanel.html +1 -1
  157. package/public/scripts/textgen-models.js +84 -6
  158. package/public/scripts/textgen-settings.js +13 -12
  159. package/public/scripts/tokenizers.js +37 -68
  160. package/public/scripts/tool-calling.js +3 -1
  161. package/public/scripts/user.js +7 -6
  162. package/public/scripts/util/SimpleMutex.js +1 -2
  163. package/public/scripts/util/ThemeGenerator.js +322 -0
  164. package/public/scripts/utils.js +67 -13
  165. package/public/scripts/variables.js +1 -33
  166. package/public/scripts/welcome-screen.js +1 -2
  167. package/public/scripts/world-info.js +111 -31
  168. package/public/style.css +83 -8
  169. package/src/command-line.js +6 -2
  170. package/src/constants.js +15 -0
  171. package/src/endpoints/assets.js +12 -25
  172. package/src/endpoints/backends/chat-completions.js +45 -37
  173. package/src/endpoints/backends/text-completions.js +1 -4
  174. package/src/endpoints/backgrounds.js +111 -54
  175. package/src/endpoints/backups.js +3 -5
  176. package/src/endpoints/characters.js +9 -13
  177. package/src/endpoints/chats.js +27 -7
  178. package/src/endpoints/content-manager.js +22 -13
  179. package/src/endpoints/extensions.js +9 -7
  180. package/src/endpoints/groups.js +2 -3
  181. package/src/endpoints/horde.js +1 -4
  182. package/src/endpoints/image-metadata.js +283 -36
  183. package/src/endpoints/minimax.js +0 -2
  184. package/src/endpoints/novelai.js +3 -6
  185. package/src/endpoints/openai.js +43 -3
  186. package/src/endpoints/search.js +2 -1
  187. package/src/endpoints/secrets.js +5 -1
  188. package/src/endpoints/settings.js +12 -2
  189. package/src/endpoints/sprites.js +1 -2
  190. package/src/endpoints/stable-diffusion.js +15 -12
  191. package/src/endpoints/thumbnails.js +1 -2
  192. package/src/endpoints/tokenizers.js +20 -11
  193. package/src/endpoints/users-private.js +8 -1
  194. package/src/endpoints/vectors.js +12 -0
  195. package/src/git/client.js +138 -0
  196. package/src/middleware/webpack-serve.js +7 -5
  197. package/src/prompt-converters.js +37 -13
  198. package/src/server-main.js +1 -5
  199. package/src/server-startup.js +61 -7
  200. package/src/users.js +26 -9
  201. package/src/util.js +3 -7
  202. package/src/vectors/extras-vectors.js +1 -2
  203. package/src/vectors/llamacpp-vectors.js +3 -2
  204. package/src/vectors/ollama-vectors.js +19 -23
  205. package/src/vectors/openai-vectors.js +13 -4
  206. package/src/vectors/vllm-vectors.js +3 -2
  207. package/tests/frontend/MacroEnvBuilder.e2e.js +2 -0
  208. package/tests/package-lock.json +9 -9
  209. package/tests/util-pure.test.js +421 -0
  210. package/webpack.config.js +64 -14
package/.dockerignore CHANGED
@@ -11,6 +11,7 @@
11
11
  /docker/extensions
12
12
  /docker/data
13
13
  /docker/plugins
14
+ /docker/dist
14
15
  /public/scripts/extensions/third-party
15
16
 
16
17
  # --- Plugins (keep only package files) ---
package/.eslintrc.cjs CHANGED
@@ -102,5 +102,28 @@ module.exports = {
102
102
  // These rules should eventually be enabled.
103
103
  'no-async-promise-executor': 'off',
104
104
  'no-inner-declarations': 'off',
105
+ // Additional formatting rules based on codebase conventions
106
+ 'brace-style': ['error', '1tbs', { allowSingleLine: true }],
107
+ 'array-bracket-spacing': ['error', 'never'],
108
+ 'computed-property-spacing': ['error', 'never'],
109
+ 'block-spacing': ['error', 'always'],
110
+ 'keyword-spacing': ['error', { before: true, after: true }],
111
+ 'space-before-blocks': ['error', 'always'],
112
+ 'space-before-function-paren': ['error', { anonymous: 'always', named: 'never', asyncArrow: 'always' }],
113
+ 'space-in-parens': ['error', 'never'],
114
+ 'comma-spacing': ['error', { before: false, after: true }],
115
+ 'key-spacing': ['error', { beforeColon: false, afterColon: true }],
116
+ 'func-call-spacing': ['error', 'never'],
117
+ 'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 1, maxBOF: 0 }],
118
+ 'padded-blocks': ['error', 'never'],
119
+ 'no-whitespace-before-property': 'error',
120
+ 'space-unary-ops': ['error', { words: true, nonwords: false }],
121
+ 'arrow-spacing': ['error', { before: true, after: true }],
122
+ 'template-curly-spacing': ['error', 'never'],
123
+ 'rest-spread-spacing': ['error', 'never'],
124
+ 'generator-star-spacing': ['error', { before: false, after: true }],
125
+ 'yield-star-spacing': ['error', { before: false, after: true }],
126
+ 'template-tag-spacing': ['error', 'never'],
127
+ 'switch-colon-spacing': ['error', { after: true, before: false }],
105
128
  },
106
129
  };
package/config.yaml CHANGED
@@ -165,6 +165,8 @@ rateLimiting:
165
165
 
166
166
  ## BACKUP CONFIGURATION
167
167
  backups:
168
+ # Allow users to create a full backup archive of their data
169
+ allowFullDataBackup: true
168
170
  # Common settings for all backup types
169
171
  common:
170
172
  # Number of backups to keep for each chat and settings file
@@ -202,6 +204,16 @@ performance:
202
204
  memoryCacheCapacity: '100mb'
203
205
  # Enables disk caching for character cards. Improves performances with large card libraries.
204
206
  useDiskCache: true
207
+ # Configures gzip compression for client requests with large payloads (e.g. settings or chat saves).
208
+ requestCompression:
209
+ # Enable request compression.
210
+ enabled: false
211
+ # Minimum payload size to trigger compression. Set to 0 to compress all requests regardless of size.
212
+ minPayloadSize: '256kb'
213
+ # Hard upper payload size limit for compression. Set to 0 to allow compression of any size.
214
+ maxPayloadSize: '8mb'
215
+ # Timeout for request compression in milliseconds.
216
+ timeout: 4000
205
217
 
206
218
  # CACHE BUSTER CONFIGURATION
207
219
  # IMPORTANT: Requires localhost or a domain with HTTPS, otherwise will not work!
@@ -250,6 +262,13 @@ extensions:
250
262
  speechToText: Xenova/whisper-small
251
263
  textToSpeech: Xenova/speecht5_tts
252
264
 
265
+ # Git backend for plugin/extension repository operations.
266
+ # - Use "auto" to prefer system git, falling back to the integrated backend
267
+ # - Use "system" to force system backend
268
+ # - Use "builtin" to force integrated backend
269
+ git:
270
+ backend: auto
271
+
253
272
  # Additional model tokenizers can be downloaded on demand.
254
273
  # Disabling will fallback to another locally available tokenizer.
255
274
  enableDownloadableTokenizers: true
@@ -293,7 +312,7 @@ claude:
293
312
  # Otherwise, you'll just waste money on cache misses.
294
313
  enableSystemPromptCache: false
295
314
  # Enables caching of the message history at depth (if supported).
296
- # https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
315
+ # https://platform.claude.com/docs/en/build-with-claude/prompt-caching
297
316
  # -- IMPORTANT! --
298
317
  # Use with caution. Behavior may be unpredictable and no guarantees can or will be made.
299
318
  # Set to an integer to specify the desired depth. 0 (which does NOT include the prefill)
@@ -304,6 +323,10 @@ claude:
304
323
  ## 5m: base price x 1.25
305
324
  ## 1h: base price x 2
306
325
  extendedTTL: false
326
+ # Enables adaptive thinking for supported models (Opus 4.6+).
327
+ # Disable to enforce legacy thinking mode (with thinking budget).
328
+ # https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking
329
+ enableAdaptiveThinking: false
307
330
  # -- GOOGLE GEMINI API CONFIGURATION --
308
331
  gemini:
309
332
  # API endpoint version ("v1beta" or "v1alpha")
@@ -165,6 +165,8 @@ rateLimiting:
165
165
 
166
166
  ## BACKUP CONFIGURATION
167
167
  backups:
168
+ # Allow users to create a full backup archive of their data
169
+ allowFullDataBackup: true
168
170
  # Common settings for all backup types
169
171
  common:
170
172
  # Number of backups to keep for each chat and settings file
@@ -202,6 +204,16 @@ performance:
202
204
  memoryCacheCapacity: '100mb'
203
205
  # Enables disk caching for character cards. Improves performances with large card libraries.
204
206
  useDiskCache: true
207
+ # Configures gzip compression for client requests with large payloads (e.g. settings or chat saves).
208
+ requestCompression:
209
+ # Enable request compression.
210
+ enabled: false
211
+ # Minimum payload size to trigger compression. Set to 0 to compress all requests regardless of size.
212
+ minPayloadSize: '256kb'
213
+ # Hard upper payload size limit for compression. Set to 0 to allow compression of any size.
214
+ maxPayloadSize: '8mb'
215
+ # Timeout for request compression in milliseconds.
216
+ timeout: 4000
205
217
 
206
218
  # CACHE BUSTER CONFIGURATION
207
219
  # IMPORTANT: Requires localhost or a domain with HTTPS, otherwise will not work!
@@ -250,6 +262,13 @@ extensions:
250
262
  speechToText: Xenova/whisper-small
251
263
  textToSpeech: Xenova/speecht5_tts
252
264
 
265
+ # Git backend for plugin/extension repository operations.
266
+ # - Use "auto" to prefer system git, falling back to the integrated backend
267
+ # - Use "system" to force system backend
268
+ # - Use "builtin" to force integrated backend
269
+ git:
270
+ backend: auto
271
+
253
272
  # Additional model tokenizers can be downloaded on demand.
254
273
  # Disabling will fallback to another locally available tokenizer.
255
274
  enableDownloadableTokenizers: true
@@ -293,7 +312,7 @@ claude:
293
312
  # Otherwise, you'll just waste money on cache misses.
294
313
  enableSystemPromptCache: false
295
314
  # Enables caching of the message history at depth (if supported).
296
- # https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
315
+ # https://platform.claude.com/docs/en/build-with-claude/prompt-caching
297
316
  # -- IMPORTANT! --
298
317
  # Use with caution. Behavior may be unpredictable and no guarantees can or will be made.
299
318
  # Set to an integer to specify the desired depth. 0 (which does NOT include the prefill)
@@ -304,6 +323,10 @@ claude:
304
323
  ## 5m: base price x 1.25
305
324
  ## 1h: base price x 2
306
325
  extendedTTL: false
326
+ # Enables adaptive thinking for supported models (Opus 4.6+).
327
+ # Disable to enforce legacy thinking mode (with thinking budget).
328
+ # https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking
329
+ enableAdaptiveThinking: false
307
330
  # -- GOOGLE GEMINI API CONFIGURATION --
308
331
  gemini:
309
332
  # API endpoint version ("v1beta" or "v1alpha")
@@ -638,5 +638,9 @@
638
638
  {
639
639
  "filename": "presets/reasoning/OpenAI Harmony.json",
640
640
  "type": "reasoning"
641
+ },
642
+ {
643
+ "filename": "presets/reasoning/Think XML.json",
644
+ "type": "reasoning"
641
645
  }
642
646
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "input_sequence": "{{[INPUT]}}",
3
- "output_sequence": "{{[OUPUT]}}",
3
+ "output_sequence": "{{[OUTPUT]}}",
4
4
  "last_output_sequence": "",
5
5
  "system_sequence": "{{[SYSTEM]}}",
6
6
  "stop_sequence": "",
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "Think XML",
3
+ "prefix": "<think>",
4
+ "suffix": "</think>",
5
+ "separator": "\n"
6
+ }
@@ -191,7 +191,7 @@
191
191
  "custom_stopping_strings_macro": true,
192
192
  "fuzzy_search": true,
193
193
  "encode_tags": false,
194
- "experimental_macro_engine": false,
194
+ "experimental_macro_engine": true,
195
195
  "enableLabMode": false,
196
196
  "enableZenSliders": false,
197
197
  "ui_mode": 1,
package/index.d.ts CHANGED
@@ -40,7 +40,7 @@ declare global {
40
40
  /**
41
41
  * Authenticated user handle.
42
42
  */
43
- handle: string;
43
+ handle: string | null;
44
44
  /**
45
45
  * Last time the session was extended.
46
46
  */
package/package.json CHANGED
@@ -48,10 +48,11 @@
48
48
  "droll": "^0.2.1",
49
49
  "env-paths": "^3.0.0",
50
50
  "express": "^4.21.0",
51
+ "fflate": "^0.8.2",
51
52
  "form-data": "^4.0.4",
52
53
  "fuse.js": "^7.1.0",
53
54
  "google-translate-api-x": "^10.7.2",
54
- "handlebars": "^4.7.8",
55
+ "handlebars": "^4.7.9",
55
56
  "helmet": "^8.1.0",
56
57
  "highlight.js": "^11.11.1",
57
58
  "host-validation-middleware": "^0.1.1",
@@ -62,12 +63,13 @@
62
63
  "ip-regex": "^5.0.0",
63
64
  "ipaddr.js": "^2.2.0",
64
65
  "is-docker": "^3.0.0",
66
+ "isomorphic-git": "^1.36.3",
65
67
  "localforage": "^1.10.0",
66
68
  "lodash": "^4.17.21",
67
69
  "mime-types": "^3.0.2",
68
70
  "moment": "^2.30.1",
69
71
  "morphdom": "^2.7.7",
70
- "multer": "^2.0.2",
72
+ "multer": "^2.1.1",
71
73
  "node-fetch": "^3.3.2",
72
74
  "node-persist": "^4.0.4",
73
75
  "open": "^10.2.0",
@@ -80,21 +82,21 @@
80
82
  "seedrandom": "^3.0.5",
81
83
  "showdown": "^2.1.0",
82
84
  "sillytavern-transformers": "2.14.6",
83
- "simple-git": "^3.28.0",
85
+ "simple-git": "^3.33.0",
84
86
  "slidetoggle": "^4.0.0",
85
87
  "tiktoken": "^1.0.22",
86
88
  "url-join": "^5.0.0",
87
89
  "vectra": "^0.2.2",
88
90
  "wavefile": "^11.0.0",
89
- "webpack": "^5.98.0",
91
+ "webpack": "^5.105.4",
90
92
  "write-file-atomic": "^5.0.1",
91
93
  "ws": "^8.18.3",
92
- "yaml": "^2.8.1",
94
+ "yaml": "^2.8.3",
93
95
  "yargs": "^17.7.1",
94
- "yauzl": "^3.2.0"
96
+ "yauzl": "^3.2.1"
95
97
  },
96
98
  "engines": {
97
- "node": ">= 18"
99
+ "node": ">= 20"
98
100
  },
99
101
  "overrides": {
100
102
  "vectra": {
@@ -111,7 +113,7 @@
111
113
  "type": "git",
112
114
  "url": "https://github.com/SillyTavern/SillyTavern.git"
113
115
  },
114
- "version": "1.16.0",
116
+ "version": "1.17.0",
115
117
  "scripts": {
116
118
  "start": "node server.js",
117
119
  "debug": "node --inspect server.js",
@@ -151,7 +153,7 @@
151
153
  "@types/jqueryui": "^1.12.24",
152
154
  "@types/lodash": "^4.17.20",
153
155
  "@types/mime-types": "^3.0.1",
154
- "@types/multer": "^2.0.0",
156
+ "@types/multer": "^2.1.0",
155
157
  "@types/node": "^18.19.84",
156
158
  "@types/node-persist": "^3.1.8",
157
159
  "@types/png-chunk-text": "^1.0.3",
package/plugins.js CHANGED
@@ -9,11 +9,13 @@ import process from 'node:process';
9
9
  import { fileURLToPath } from 'node:url';
10
10
 
11
11
  import { default as git, CheckRepoActions } from 'simple-git';
12
+ import { createGitClient } from './src/git/client.js';
12
13
  import { color } from './src/util.js';
13
14
 
14
15
  const __dirname = import.meta.dirname ?? path.dirname(fileURLToPath(import.meta.url));
15
16
  process.chdir(__dirname);
16
17
  const pluginsPath = './plugins';
18
+ const gitBackend = process.env.SILLYTAVERN_GIT_BACKEND || 'auto';
17
19
 
18
20
  const command = process.argv[2];
19
21
 
@@ -87,10 +89,9 @@ async function installPlugin(pluginName) {
87
89
  return console.log(color.yellow(`Directory already exists at ${pluginPath}`));
88
90
  }
89
91
 
90
- await git().clone(pluginName, pluginPath, { '--depth': 1 });
92
+ await createGitClient({ backend: gitBackend }).clone(pluginName, pluginPath, { depth: 1 });
91
93
  console.log(`Plugin ${color.green(pluginName)} installed to ${color.cyan(pluginPath)}`);
92
- }
93
- catch (error) {
94
+ } catch (error) {
94
95
  console.error(color.red(`Failed to install plugin ${pluginName}`), error);
95
96
  }
96
97
  }
@@ -107,7 +107,8 @@
107
107
  opacity: 1;
108
108
  }
109
109
 
110
- .bg_example .mobile-only-menu-toggle {
110
+ .bg_example .mobile-only-menu-toggle,
111
+ .bg_folder_tile .mobile-only-menu-toggle {
111
112
  display: none;
112
113
  }
113
114
 
@@ -135,19 +136,32 @@
135
136
  outline-offset: 0;
136
137
  }
137
138
 
138
- .bg_example.locked-background::after {
139
- content: '\f023';
139
+ .bg_example.locked-background::after,
140
+ .bg_example.selected-background::before,
141
+ #Backgrounds.bg-selection-mode #bg_menu_content .bg_example.folder-group-selected::before {
140
142
  font-family: 'Font Awesome 6 Free';
141
143
  font-weight: 900;
142
-
143
144
  position: absolute;
145
+ z-index: 4;
146
+ filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
147
+ pointer-events: none;
148
+ }
149
+
150
+ .bg_example.selected-background::before,
151
+ #Backgrounds.bg-selection-mode #bg_menu_content .bg_example.folder-group-selected::before {
152
+ content: '\f00c';
153
+ top: 5px;
154
+ color: var(--white100);
155
+ font-size: calc(var(--mainFontSize) * 0.9);
156
+ }
157
+
158
+ .bg_example.locked-background::after {
159
+ content: '\f023';
144
160
  bottom: 5px;
145
161
  right: 5px;
146
- z-index: 4;
147
162
  color: var(--golden);
148
163
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
149
164
  font-size: calc(var(--mainFontSize) * 0.8);
150
- pointer-events: none;
151
165
  }
152
166
 
153
167
  .bg_example:not(.locked-background) .jg-unlock,
@@ -161,17 +175,28 @@
161
175
  }
162
176
 
163
177
  .bg_example.selected-background::before {
164
- content: '\f00c';
165
- font-family: 'Font Awesome 6 Free';
166
- font-weight: 900;
167
- position: absolute;
168
- top: 5px;
169
178
  left: 5px;
170
- z-index: 4;
171
- color: var(--white100);
172
- filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
173
- font-size: calc(var(--mainFontSize) * 0.9);
174
- pointer-events: none;
179
+ }
180
+
181
+ #bg_selection_mode_button.active {
182
+ color: var(--golden);
183
+ }
184
+
185
+ #bg_group_select_count {
186
+ font-weight: 700;
187
+ }
188
+
189
+ #Backgrounds.bg-selection-mode #bg_menu_content .bg_example .jg-menu {
190
+ display: none;
191
+ }
192
+
193
+ #Backgrounds.bg-selection-mode #bg_menu_content .bg_example.folder-group-selected {
194
+ outline: 2px solid var(--interactable-outline-color);
195
+ outline-offset: 0;
196
+ }
197
+
198
+ #Backgrounds.bg-selection-mode #bg_menu_content .bg_example.folder-group-selected::before {
199
+ right: 5px;
175
200
  }
176
201
 
177
202
  .bg_example .jg-menu {
@@ -376,3 +401,169 @@
376
401
  #bg_custom_content:not(:empty)~#bg_chat_hint {
377
402
  display: none;
378
403
  }
404
+
405
+ .bg_folder_grid.bg_list {
406
+ display: grid;
407
+ gap: 5px;
408
+ width: 100%;
409
+ grid-template-columns: repeat(calc(var(--bg-thumb-columns, 5) + 2), 1fr);
410
+ margin-bottom: 10px;
411
+ }
412
+
413
+ .bg_folder_grid:empty {
414
+ display: none;
415
+ }
416
+
417
+ .bg_folder_tile {
418
+ cursor: pointer;
419
+ position: relative;
420
+ overflow: hidden;
421
+ border-radius: 8px;
422
+ height: auto;
423
+ aspect-ratio: 1 / 1;
424
+ outline: 2px solid var(--SmartThemeBorderColor);
425
+ outline-offset: -1px;
426
+ box-shadow: 0 0 7px var(--black50a);
427
+ display: flex;
428
+ flex-direction: column;
429
+ align-items: center;
430
+ justify-content: center;
431
+ background-color: var(--SmartThemeBlurTintColor);
432
+ transition: filter var(--animation-duration) ease;
433
+ }
434
+
435
+ .bg_folder_tile:hover {
436
+ filter: brightness(1.1);
437
+ }
438
+
439
+ .bg_folder_tile_cover {
440
+ position: absolute;
441
+ top: 0;
442
+ left: 0;
443
+ right: 0;
444
+ bottom: 0;
445
+ background-size: cover;
446
+ background-position: center;
447
+ border-radius: inherit;
448
+ }
449
+
450
+ .bg_folder_tile_overlay {
451
+ position: absolute;
452
+ bottom: 0;
453
+ left: 0;
454
+ right: 0;
455
+ background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
456
+ color: var(--SmartThemeBodyColor);
457
+ padding: 6px 8px 4px;
458
+ display: flex;
459
+ align-items: center;
460
+ gap: 5px;
461
+ font-size: 0.85em;
462
+ font-weight: 600;
463
+ pointer-events: none;
464
+ border-radius: 0 0 8px 8px;
465
+ }
466
+
467
+ .bg_folder_tile_overlay i {
468
+ font-size: 0.9em;
469
+ opacity: 0.8;
470
+ }
471
+
472
+ .bg_folder_tile_name {
473
+ white-space: nowrap;
474
+ overflow: hidden;
475
+ text-overflow: ellipsis;
476
+ }
477
+
478
+ /* Folder tile action menu */
479
+ .bg_folder_tile .bg_folder_tile_menu {
480
+ display: flex;
481
+ position: absolute;
482
+ top: 2px;
483
+ right: 2px;
484
+ background-color: rgba(0, 0, 0, 0.5);
485
+ border-radius: 5px;
486
+ padding: 3px;
487
+ z-index: 3;
488
+ backdrop-filter: blur(4px);
489
+ border: 1px solid var(--SmartThemeBorderColor);
490
+ align-items: center;
491
+
492
+ opacity: 0;
493
+ visibility: hidden;
494
+ transform: scale(0.9);
495
+ transform-origin: center;
496
+ transition: opacity var(--animation-duration) ease-out, visibility var(--animation-duration) ease-out, transform var(--animation-duration) ease-out;
497
+ }
498
+
499
+ .bg_folder_tile:hover .bg_folder_tile_menu,
500
+ .bg_folder_tile:focus-within .bg_folder_tile_menu {
501
+ opacity: 1;
502
+ visibility: visible;
503
+ transform: scale(1);
504
+ }
505
+
506
+ .bg_folder_tile .jg-button {
507
+ display: flex;
508
+ width: 24px;
509
+ height: 24px;
510
+ align-items: center;
511
+ justify-content: center;
512
+ color: white;
513
+ padding: 5px;
514
+ font-size: 1.1em;
515
+ border-radius: 5px;
516
+ transition: background-color var(--animation-duration) ease;
517
+ }
518
+
519
+ .bg_folder_tile .jg-button:hover {
520
+ background-color: rgba(255, 255, 255, 0.2);
521
+ }
522
+
523
+ /* New Folder placeholder tile */
524
+ .bg_new_folder_tile {
525
+ border: 2px dashed var(--SmartThemeBorderColor);
526
+ outline: none;
527
+ color: var(--SmartThemeBodyColor);
528
+ opacity: 0.6;
529
+ gap: 6px;
530
+ font-size: 0.85em;
531
+ font-weight: 600;
532
+ }
533
+
534
+ .bg_new_folder_tile:hover {
535
+ opacity: 1;
536
+ transform: scale(1.03);
537
+ }
538
+
539
+ /* Breadcrumb bar */
540
+ .bg_folder_breadcrumb {
541
+ display: flex;
542
+ align-items: center;
543
+ gap: 8px;
544
+ padding: 5px 0;
545
+ margin-bottom: 5px;
546
+ }
547
+
548
+ .bg_current_folder_name {
549
+ font-weight: 600;
550
+ font-size: 1em;
551
+ color: var(--SmartThemeBodyColor);
552
+ white-space: nowrap;
553
+ overflow: hidden;
554
+ text-overflow: ellipsis;
555
+ }
556
+
557
+ #Backgrounds:not(.in-folder-view) .jg-set-cover {
558
+ display: none !important;
559
+ }
560
+
561
+ #Backgrounds.in-folder-view .jg-set-cover {
562
+ display: flex !important;
563
+ }
564
+
565
+ /* Hide folder actions on custom (chat-specific) backgrounds */
566
+ .bg_example[custom="true"] .jg-folder,
567
+ .bg_example[custom="true"] .jg-set-cover {
568
+ display: none !important;
569
+ }
@@ -29,3 +29,60 @@
29
29
  align-items: center;
30
30
  justify-content: center;
31
31
  }
32
+
33
+ /* Action loader toast styles */
34
+ .action-loader-toast {
35
+ display: flex;
36
+ align-items: center;
37
+ gap: 10px;
38
+ width: 100%;
39
+ }
40
+
41
+ .action-loader-message {
42
+ flex: 1;
43
+ }
44
+
45
+ .action-loader-stop {
46
+ cursor: pointer;
47
+ font-size: 1.2em;
48
+ opacity: 0.8;
49
+ transition: opacity 0.15s ease, color 0.15s ease;
50
+ }
51
+
52
+ .action-loader-stop:hover {
53
+ opacity: 1;
54
+ color: color-mix(in srgb, currentColor 40%, #e74c3c 60%);
55
+ }
56
+
57
+ /* Splash screen styles for branded loading */
58
+ #loader.splash-screen {
59
+ display: flex;
60
+ flex-direction: column;
61
+ align-items: center;
62
+ justify-content: center;
63
+ gap: 4rem;
64
+ width: 100%;
65
+ height: 100%;
66
+ transition: all var(--animation-duration-2x) ease-out;
67
+ }
68
+
69
+ #loader.splash-screen #load-spinner {
70
+ position: static;
71
+ top: unset;
72
+ left: unset;
73
+ }
74
+
75
+ .splash-logo {
76
+ /* max original px, or 50% on mobile */
77
+ width: min(150px, 50%);
78
+ height: auto;
79
+ filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
80
+ }
81
+
82
+ .splash-message {
83
+ margin: 0;
84
+ font-size: 1.25rem;
85
+ font-weight: 500;
86
+ opacity: 0.9;
87
+ letter-spacing: 0.02em;
88
+ }