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.
- package/.dockerignore +1 -0
- package/.eslintrc.cjs +23 -0
- package/config.yaml +24 -1
- package/default/config.yaml +24 -1
- package/default/content/index.json +4 -0
- package/default/content/presets/instruct/KoboldAI.json +1 -1
- package/default/content/presets/reasoning/Think XML.json +6 -0
- package/default/content/settings.json +1 -1
- package/index.d.ts +1 -1
- package/package.json +11 -9
- package/plugins.js +4 -3
- package/public/css/backgrounds.css +207 -16
- package/public/css/loader.css +57 -0
- package/public/css/mobile-styles.css +72 -1
- package/public/css/popup.css +4 -0
- package/public/css/toggle-dependent.css +6 -0
- package/public/global.d.ts +4 -1
- package/public/index.html +131 -9
- package/public/lib.js +5 -0
- package/public/locales/ar-sa.json +17 -1
- package/public/locales/de-de.json +17 -1
- package/public/locales/es-es.json +17 -1
- package/public/locales/fr-fr.json +21 -5
- package/public/locales/is-is.json +17 -1
- package/public/locales/it-it.json +17 -1
- package/public/locales/ja-jp.json +17 -1
- package/public/locales/ko-kr.json +18 -2
- package/public/locales/nl-nl.json +17 -1
- package/public/locales/pt-pt.json +17 -1
- package/public/locales/ru-ru.json +20 -4
- package/public/locales/th-th.json +17 -1
- package/public/locales/uk-ua.json +17 -1
- package/public/locales/vi-vn.json +17 -1
- package/public/locales/zh-cn.json +1813 -482
- package/public/locales/zh-tw.json +21 -5
- package/public/script.js +426 -275
- package/public/scripts/BulkEditOverlay.js +10 -9
- package/public/scripts/PromptManager.js +1 -3
- package/public/scripts/RossAscends-mods.js +15 -19
- package/public/scripts/action-loader-slashcommands.js +355 -0
- package/public/scripts/action-loader.js +572 -0
- package/public/scripts/authors-note.js +2 -4
- package/public/scripts/autocomplete/AutoComplete.js +0 -5
- package/public/scripts/autocomplete/AutoCompleteFuzzyScore.js +0 -3
- package/public/scripts/autocomplete/AutoCompleteNameResult.js +0 -1
- package/public/scripts/autocomplete/AutoCompleteNameResultBase.js +2 -3
- package/public/scripts/autocomplete/AutoCompleteOption.js +1 -2
- package/public/scripts/backgrounds.js +799 -33
- package/public/scripts/bookmarks.js +58 -16
- package/public/scripts/bulk-edit.js +1 -1
- package/public/scripts/cfg-scale.js +0 -1
- package/public/scripts/chat-backups.js +1 -1
- package/public/scripts/chats.js +3 -6
- package/public/scripts/constants.js +2 -0
- package/public/scripts/custom-request.js +1 -1
- package/public/scripts/data-maid.js +0 -1
- package/public/scripts/dynamic-styles.js +1 -2
- package/public/scripts/events.js +4 -0
- package/public/scripts/extensions/assets/index.js +7 -14
- package/public/scripts/extensions/attachments/manage-button.html +1 -1
- package/public/scripts/extensions/caption/index.js +4 -8
- package/public/scripts/extensions/caption/settings.html +9 -0
- package/public/scripts/extensions/expressions/index.js +16 -29
- package/public/scripts/extensions/gallery/index.js +21 -1
- package/public/scripts/extensions/memory/index.js +15 -8
- package/public/scripts/extensions/quick-reply/api/QuickReplyApi.js +9 -15
- package/public/scripts/extensions/quick-reply/index.js +13 -17
- package/public/scripts/extensions/quick-reply/src/AutoExecuteHandler.js +1 -5
- package/public/scripts/extensions/quick-reply/src/QuickReply.js +105 -116
- package/public/scripts/extensions/quick-reply/src/QuickReplyConfig.js +12 -20
- package/public/scripts/extensions/quick-reply/src/QuickReplyContextLink.js +0 -2
- package/public/scripts/extensions/quick-reply/src/QuickReplySet.js +25 -26
- package/public/scripts/extensions/quick-reply/src/QuickReplySetLink.js +6 -14
- package/public/scripts/extensions/quick-reply/src/QuickReplySettings.js +2 -8
- package/public/scripts/extensions/quick-reply/src/SlashCommandHandler.js +13 -21
- package/public/scripts/extensions/quick-reply/src/ui/ButtonUi.js +6 -14
- package/public/scripts/extensions/quick-reply/src/ui/SettingsUi.js +30 -38
- package/public/scripts/extensions/quick-reply/src/ui/ctx/ContextMenu.js +0 -4
- package/public/scripts/extensions/quick-reply/src/ui/ctx/MenuItem.js +0 -3
- package/public/scripts/extensions/quick-reply/src/ui/ctx/SubMenu.js +0 -4
- package/public/scripts/extensions/regex/index.js +0 -1
- package/public/scripts/extensions/shared.js +1 -0
- package/public/scripts/extensions/stable-diffusion/index.js +147 -32
- package/public/scripts/extensions/stable-diffusion/settings.html +1 -1
- package/public/scripts/extensions/token-counter/index.js +0 -1
- package/public/scripts/extensions/tts/alltalk.js +0 -1
- package/public/scripts/extensions/tts/chatterbox.js +0 -3
- package/public/scripts/extensions/tts/coqui.js +16 -21
- package/public/scripts/extensions/tts/cosyvoice.js +0 -6
- package/public/scripts/extensions/tts/elevenlabs.js +1 -1
- package/public/scripts/extensions/tts/google-native.js +0 -2
- package/public/scripts/extensions/tts/gpt-sovits-v2.js +0 -8
- package/public/scripts/extensions/tts/gsvi.js +0 -9
- package/public/scripts/extensions/tts/index.js +59 -35
- package/public/scripts/extensions/tts/kokoro-worker.js +1 -1
- package/public/scripts/extensions/tts/minimax.js +0 -2
- package/public/scripts/extensions/tts/openai.js +0 -1
- package/public/scripts/extensions/tts/silerotts.js +0 -1
- package/public/scripts/extensions/tts/system.js +1 -2
- package/public/scripts/extensions/tts/vits.js +2 -4
- package/public/scripts/extensions/tts/xtts.js +0 -1
- package/public/scripts/extensions/vectors/index.js +57 -6
- package/public/scripts/extensions/vectors/settings.html +11 -0
- package/public/scripts/extensions.js +89 -10
- package/public/scripts/f-localStorage.js +0 -1
- package/public/scripts/filters.js +1 -3
- package/public/scripts/group-chats.js +29 -35
- package/public/scripts/horde.js +1 -2
- package/public/scripts/i18n.js +5 -0
- package/public/scripts/input-md-formatting.js +4 -5
- package/public/scripts/instruct-mode.js +0 -1
- package/public/scripts/kai-settings.js +1 -2
- package/public/scripts/keyboard.js +6 -0
- package/public/scripts/loader.js +49 -66
- package/public/scripts/logit-bias.js +4 -10
- package/public/scripts/macros/definitions/chat-macros.js +12 -0
- package/public/scripts/macros/definitions/core-macros.js +24 -3
- package/public/scripts/macros/definitions/env-macros.js +24 -0
- package/public/scripts/macros/engine/MacroCstWalker.js +2 -3
- package/public/scripts/macros/engine/MacroEnv.types.js +2 -0
- package/public/scripts/macros/engine/MacroEnvBuilder.js +10 -1
- package/public/scripts/macros.js +8 -2
- package/public/scripts/nai-settings.js +6 -12
- package/public/scripts/openai.js +245 -144
- package/public/scripts/personas.js +18 -44
- package/public/scripts/popup.js +146 -10
- package/public/scripts/power-user.js +103 -235
- package/public/scripts/preset-manager.js +2 -5
- package/public/scripts/reasoning.js +80 -5
- package/public/scripts/request-compression.js +131 -0
- package/public/scripts/samplerSelect.js +2 -5
- package/public/scripts/secrets.js +31 -1
- package/public/scripts/showdown-underscore.js +1 -1
- package/public/scripts/slash-commands/SlashCommand.js +3 -6
- package/public/scripts/slash-commands/SlashCommandArgument.js +1 -2
- package/public/scripts/slash-commands/SlashCommandAutoCompleteNameResult.js +13 -13
- package/public/scripts/slash-commands/SlashCommandBrowser.js +15 -15
- package/public/scripts/slash-commands/SlashCommandClosure.js +17 -17
- package/public/scripts/slash-commands/SlashCommandCommandAutoCompleteOption.js +0 -2
- package/public/scripts/slash-commands/SlashCommandCommonEnumsProvider.js +7 -1
- package/public/scripts/slash-commands/SlashCommandDebugController.js +4 -9
- package/public/scripts/slash-commands/SlashCommandEnumAutoCompleteOption.js +1 -2
- package/public/scripts/slash-commands/SlashCommandExecutionError.js +0 -1
- package/public/scripts/slash-commands/SlashCommandExecutor.js +6 -6
- package/public/scripts/slash-commands/SlashCommandParser.js +20 -20
- package/public/scripts/slash-commands/SlashCommandScope.js +3 -5
- package/public/scripts/slash-commands.js +1365 -74
- package/public/scripts/sse-stream.js +20 -32
- package/public/scripts/st-context.js +8 -0
- package/public/scripts/stats.js +1 -2
- package/public/scripts/swipe-picker.js +403 -0
- package/public/scripts/tags.js +96 -18
- package/public/scripts/templates/itemizationText.html +11 -11
- package/public/scripts/templates/tabbyDownloader.html +1 -1
- package/public/scripts/templates/wandMenu.html +1 -0
- package/public/scripts/templates/welcomePanel.html +1 -1
- package/public/scripts/textgen-models.js +84 -6
- package/public/scripts/textgen-settings.js +13 -12
- package/public/scripts/tokenizers.js +37 -68
- package/public/scripts/tool-calling.js +3 -1
- package/public/scripts/user.js +7 -6
- package/public/scripts/util/SimpleMutex.js +1 -2
- package/public/scripts/util/ThemeGenerator.js +322 -0
- package/public/scripts/utils.js +67 -13
- package/public/scripts/variables.js +1 -33
- package/public/scripts/welcome-screen.js +1 -2
- package/public/scripts/world-info.js +111 -31
- package/public/style.css +83 -8
- package/src/command-line.js +6 -2
- package/src/constants.js +15 -0
- package/src/endpoints/assets.js +12 -25
- package/src/endpoints/backends/chat-completions.js +45 -37
- package/src/endpoints/backends/text-completions.js +1 -4
- package/src/endpoints/backgrounds.js +111 -54
- package/src/endpoints/backups.js +3 -5
- package/src/endpoints/characters.js +9 -13
- package/src/endpoints/chats.js +27 -7
- package/src/endpoints/content-manager.js +22 -13
- package/src/endpoints/extensions.js +9 -7
- package/src/endpoints/groups.js +2 -3
- package/src/endpoints/horde.js +1 -4
- package/src/endpoints/image-metadata.js +283 -36
- package/src/endpoints/minimax.js +0 -2
- package/src/endpoints/novelai.js +3 -6
- package/src/endpoints/openai.js +43 -3
- package/src/endpoints/search.js +2 -1
- package/src/endpoints/secrets.js +5 -1
- package/src/endpoints/settings.js +12 -2
- package/src/endpoints/sprites.js +1 -2
- package/src/endpoints/stable-diffusion.js +15 -12
- package/src/endpoints/thumbnails.js +1 -2
- package/src/endpoints/tokenizers.js +20 -11
- package/src/endpoints/users-private.js +8 -1
- package/src/endpoints/vectors.js +12 -0
- package/src/git/client.js +138 -0
- package/src/middleware/webpack-serve.js +7 -5
- package/src/prompt-converters.js +37 -13
- package/src/server-main.js +1 -5
- package/src/server-startup.js +61 -7
- package/src/users.js +26 -9
- package/src/util.js +3 -7
- package/src/vectors/extras-vectors.js +1 -2
- package/src/vectors/llamacpp-vectors.js +3 -2
- package/src/vectors/ollama-vectors.js +19 -23
- package/src/vectors/openai-vectors.js +13 -4
- package/src/vectors/vllm-vectors.js +3 -2
- package/tests/frontend/MacroEnvBuilder.e2e.js +2 -0
- package/tests/package-lock.json +9 -9
- package/tests/util-pure.test.js +421 -0
- package/webpack.config.js +64 -14
package/.dockerignore
CHANGED
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://
|
|
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")
|
package/default/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://
|
|
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")
|
package/index.d.ts
CHANGED
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.
|
|
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.
|
|
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.
|
|
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.
|
|
91
|
+
"webpack": "^5.105.4",
|
|
90
92
|
"write-file-atomic": "^5.0.1",
|
|
91
93
|
"ws": "^8.18.3",
|
|
92
|
-
"yaml": "^2.8.
|
|
94
|
+
"yaml": "^2.8.3",
|
|
93
95
|
"yargs": "^17.7.1",
|
|
94
|
-
"yauzl": "^3.2.
|
|
96
|
+
"yauzl": "^3.2.1"
|
|
95
97
|
},
|
|
96
98
|
"engines": {
|
|
97
|
-
"node": ">=
|
|
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.
|
|
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.
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
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
|
+
}
|
package/public/css/loader.css
CHANGED
|
@@ -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
|
+
}
|