sillytavern 1.13.3 → 1.13.4
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/config.yaml +18 -0
- package/default/config.yaml +18 -0
- package/default/public/error/host-not-allowed.html +21 -0
- package/package.json +9 -8
- package/public/css/backgrounds.css +229 -0
- package/public/css/mobile-styles.css +81 -4
- package/public/css/popup.css +25 -8
- package/public/error/host-not-allowed.html +21 -0
- package/public/global.d.ts +11 -11
- package/public/img/azure_openai.svg +1 -0
- package/public/img/electronhub.svg +1 -0
- package/public/index.html +106 -37
- package/public/locales/ar-sa.json +2 -0
- package/public/locales/de-de.json +2 -0
- package/public/locales/es-es.json +2 -0
- package/public/locales/fr-fr.json +2 -0
- package/public/locales/it-it.json +2 -0
- package/public/locales/ja-jp.json +2 -0
- package/public/locales/ko-kr.json +2 -0
- package/public/locales/lang.json +66 -17
- package/public/locales/pt-pt.json +2 -0
- package/public/locales/ru-ru.json +153 -84
- package/public/locales/th-th.json +1461 -0
- package/public/locales/uk-ua.json +2 -0
- package/public/locales/vi-vn.json +2 -0
- package/public/locales/zh-cn.json +378 -182
- package/public/locales/zh-tw.json +2 -0
- package/public/login.html +1 -1
- package/public/script.js +12 -2
- package/public/scripts/RossAscends-mods.js +16 -7
- package/public/scripts/a11y.js +116 -0
- package/public/scripts/backgrounds.js +51 -12
- package/public/scripts/chats.js +28 -1
- package/public/scripts/dynamic-styles.js +52 -16
- package/public/scripts/extensions/caption/index.js +14 -4
- package/public/scripts/extensions/caption/settings.html +28 -7
- package/public/scripts/extensions/connection-manager/index.js +11 -0
- package/public/scripts/extensions/gallery/index.js +45 -5
- package/public/scripts/extensions/gallery/style.css +3 -2
- package/public/scripts/extensions/regex/debugger.css +263 -0
- package/public/scripts/extensions/regex/debugger.html +175 -0
- package/public/scripts/extensions/regex/dropdown.html +20 -0
- package/public/scripts/extensions/regex/index.js +905 -6
- package/public/scripts/extensions/regex/style.css +10 -8
- package/public/scripts/extensions/shared.js +19 -6
- package/public/scripts/extensions/stable-diffusion/index.js +129 -13
- package/public/scripts/extensions/stable-diffusion/settings.html +5 -1
- package/public/scripts/extensions/translate/index.js +4 -2
- package/public/scripts/extensions/tts/index.js +77 -4
- package/public/scripts/extensions.js +2 -0
- package/public/scripts/keyboard.js +1 -1
- package/public/scripts/login.js +4 -0
- package/public/scripts/openai.js +301 -57
- package/public/scripts/reasoning.js +23 -0
- package/public/scripts/secrets.js +6 -0
- package/public/scripts/slash-commands/SlashCommand.js +14 -15
- package/public/scripts/slash-commands.js +504 -512
- package/public/scripts/textgen-models.js +2 -0
- package/public/scripts/tokenizers.js +4 -0
- package/public/scripts/tool-calling.js +9 -0
- package/public/scripts/world-info.js +6 -6
- package/public/style.css +2 -172
- package/src/command-line.js +8 -0
- package/src/constants.js +41 -0
- package/src/electron/package-lock.json +3 -3
- package/src/endpoints/backends/chat-completions.js +365 -56
- package/src/endpoints/backends/text-completions.js +2 -1
- package/src/endpoints/content-manager.js +4 -1
- package/src/endpoints/openai.js +16 -0
- package/src/endpoints/openrouter.js +1 -1
- package/src/endpoints/secrets.js +2 -0
- package/src/endpoints/stable-diffusion.js +113 -0
- package/src/middleware/hostWhitelist.js +48 -0
- package/src/server-main.js +3 -0
- package/src/server-startup.js +2 -0
- package/tests/package-lock.json +4 -4
package/config.yaml
CHANGED
|
@@ -40,9 +40,15 @@ browserLaunch:
|
|
|
40
40
|
port: 8000
|
|
41
41
|
# -- SSL options --
|
|
42
42
|
ssl:
|
|
43
|
+
# Enable SSL/TLS encryption
|
|
43
44
|
enabled: false
|
|
45
|
+
# Path to certificate (relative to server root)
|
|
44
46
|
certPath: "./certs/cert.pem"
|
|
47
|
+
# Path to private key (relative to server root)
|
|
45
48
|
keyPath: "./certs/privkey.pem"
|
|
49
|
+
# Private key passphrase (leave empty if not needed)
|
|
50
|
+
# For better security, use a CLI argument or an environment variable (SILLYTAVERN_SSL_KEYPASSPHRASE)
|
|
51
|
+
keyPassphrase: ""
|
|
46
52
|
# -- SECURITY CONFIGURATION --
|
|
47
53
|
# Toggle whitelist mode
|
|
48
54
|
whitelistMode: true
|
|
@@ -88,6 +94,18 @@ autheliaAuth: false
|
|
|
88
94
|
# the username and passwords for basic auth are the same as those
|
|
89
95
|
# for the individual accounts
|
|
90
96
|
perUserBasicAuth: false
|
|
97
|
+
# Host whitelist configuration. Recommended if you're using a listen mode
|
|
98
|
+
hostWhitelist:
|
|
99
|
+
# Enable or disable host whitelisting
|
|
100
|
+
enabled: false
|
|
101
|
+
# Scan incoming requests for potential host header spoofing
|
|
102
|
+
scan: true
|
|
103
|
+
# List of allowed hosts. Do not include localhost or IPs, these are safe.
|
|
104
|
+
# Use a dot to create subdomain patterns.
|
|
105
|
+
# Examples:
|
|
106
|
+
# - example.com
|
|
107
|
+
# - .trycloudflare.com
|
|
108
|
+
hosts: []
|
|
91
109
|
|
|
92
110
|
# User session timeout *in seconds* (defaults to 24 hours).
|
|
93
111
|
## Set to a positive number to expire session after a certain time of inactivity
|
package/default/config.yaml
CHANGED
|
@@ -40,9 +40,15 @@ browserLaunch:
|
|
|
40
40
|
port: 8000
|
|
41
41
|
# -- SSL options --
|
|
42
42
|
ssl:
|
|
43
|
+
# Enable SSL/TLS encryption
|
|
43
44
|
enabled: false
|
|
45
|
+
# Path to certificate (relative to server root)
|
|
44
46
|
certPath: "./certs/cert.pem"
|
|
47
|
+
# Path to private key (relative to server root)
|
|
45
48
|
keyPath: "./certs/privkey.pem"
|
|
49
|
+
# Private key passphrase (leave empty if not needed)
|
|
50
|
+
# For better security, use a CLI argument or an environment variable (SILLYTAVERN_SSL_KEYPASSPHRASE)
|
|
51
|
+
keyPassphrase: ""
|
|
46
52
|
# -- SECURITY CONFIGURATION --
|
|
47
53
|
# Toggle whitelist mode
|
|
48
54
|
whitelistMode: true
|
|
@@ -88,6 +94,18 @@ autheliaAuth: false
|
|
|
88
94
|
# the username and passwords for basic auth are the same as those
|
|
89
95
|
# for the individual accounts
|
|
90
96
|
perUserBasicAuth: false
|
|
97
|
+
# Host whitelist configuration. Recommended if you're using a listen mode
|
|
98
|
+
hostWhitelist:
|
|
99
|
+
# Enable or disable host whitelisting
|
|
100
|
+
enabled: false
|
|
101
|
+
# Scan incoming requests for potential host header spoofing
|
|
102
|
+
scan: true
|
|
103
|
+
# List of allowed hosts. Do not include localhost or IPs, these are safe.
|
|
104
|
+
# Use a dot to create subdomain patterns.
|
|
105
|
+
# Examples:
|
|
106
|
+
# - example.com
|
|
107
|
+
# - .trycloudflare.com
|
|
108
|
+
hosts: []
|
|
91
109
|
|
|
92
110
|
# User session timeout *in seconds* (defaults to 24 hours).
|
|
93
111
|
## Set to a positive number to expire session after a certain time of inactivity
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<title>Forbidden</title>
|
|
6
|
+
</head>
|
|
7
|
+
|
|
8
|
+
<body>
|
|
9
|
+
<h1>Forbidden</h1>
|
|
10
|
+
<p>
|
|
11
|
+
If you are the system administrator, add the hostname you are accessing from to the
|
|
12
|
+
host whitelist, or disable host whitelisting in the
|
|
13
|
+
<code>config.yaml</code> file located in the root directory of your installation.
|
|
14
|
+
</p>
|
|
15
|
+
<hr />
|
|
16
|
+
<p>
|
|
17
|
+
<em>Access from this host is not allowed. This attempt has been logged.</em>
|
|
18
|
+
</p>
|
|
19
|
+
</body>
|
|
20
|
+
|
|
21
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@adobe/css-tools": "^4.4.
|
|
3
|
+
"@adobe/css-tools": "^4.4.4",
|
|
4
4
|
"@agnai/sentencepiece-js": "^1.1.1",
|
|
5
5
|
"@agnai/web-tokenizers": "^0.1.3",
|
|
6
6
|
"@iconfu/svg-inject": "^1.2.3",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"archiver": "^7.0.1",
|
|
33
33
|
"bing-translate-api": "^4.1.0",
|
|
34
34
|
"body-parser": "^1.20.2",
|
|
35
|
-
"bowser": "^2.
|
|
35
|
+
"bowser": "^2.12.1",
|
|
36
36
|
"bytes": "^3.1.2",
|
|
37
|
-
"chalk": "^5.
|
|
37
|
+
"chalk": "^5.6.0",
|
|
38
38
|
"command-exists": "^1.2.9",
|
|
39
39
|
"compression": "^1.8.1",
|
|
40
40
|
"cookie-parser": "^1.4.6",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"handlebars": "^4.7.8",
|
|
55
55
|
"helmet": "^8.1.0",
|
|
56
56
|
"highlight.js": "^11.11.1",
|
|
57
|
+
"host-validation-middleware": "^0.1.1",
|
|
57
58
|
"html-entities": "^2.6.0",
|
|
58
59
|
"iconv-lite": "^0.6.3",
|
|
59
60
|
"ip-matching": "^2.1.2",
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
"lodash": "^4.17.21",
|
|
65
66
|
"mime-types": "^3.0.1",
|
|
66
67
|
"moment": "^2.30.1",
|
|
67
|
-
"morphdom": "^2.7.
|
|
68
|
+
"morphdom": "^2.7.7",
|
|
68
69
|
"multer": "^2.0.2",
|
|
69
70
|
"node-fetch": "^3.3.2",
|
|
70
71
|
"node-persist": "^4.0.4",
|
|
@@ -80,14 +81,14 @@
|
|
|
80
81
|
"sillytavern-transformers": "2.14.6",
|
|
81
82
|
"simple-git": "^3.28.0",
|
|
82
83
|
"slidetoggle": "^4.0.0",
|
|
83
|
-
"tiktoken": "^1.0.
|
|
84
|
+
"tiktoken": "^1.0.22",
|
|
84
85
|
"url-join": "^5.0.0",
|
|
85
86
|
"vectra": "^0.2.2",
|
|
86
87
|
"wavefile": "^11.0.0",
|
|
87
88
|
"webpack": "^5.98.0",
|
|
88
89
|
"write-file-atomic": "^5.0.1",
|
|
89
90
|
"ws": "^8.18.3",
|
|
90
|
-
"yaml": "^2.8.
|
|
91
|
+
"yaml": "^2.8.1",
|
|
91
92
|
"yargs": "^17.7.1",
|
|
92
93
|
"yauzl": "^3.2.0"
|
|
93
94
|
},
|
|
@@ -112,7 +113,7 @@
|
|
|
112
113
|
"type": "git",
|
|
113
114
|
"url": "https://github.com/SillyTavern/SillyTavern.git"
|
|
114
115
|
},
|
|
115
|
-
"version": "1.13.
|
|
116
|
+
"version": "1.13.4",
|
|
116
117
|
"scripts": {
|
|
117
118
|
"start": "node server.js",
|
|
118
119
|
"debug": "node --inspect server.js",
|
|
@@ -145,7 +146,7 @@
|
|
|
145
146
|
"@types/cors": "^2.8.19",
|
|
146
147
|
"@types/deno": "^2.3.0",
|
|
147
148
|
"@types/express": "^4.17.23",
|
|
148
|
-
"@types/jquery": "^3.5.
|
|
149
|
+
"@types/jquery": "^3.5.33",
|
|
149
150
|
"@types/jquery-cropper": "^1.0.4",
|
|
150
151
|
"@types/jquery.transit": "^0.9.33",
|
|
151
152
|
"@types/jqueryui": "^1.12.24",
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/* Main Page Backgrounds */
|
|
2
|
+
#bg1,
|
|
3
|
+
#bg_custom {
|
|
4
|
+
background-repeat: no-repeat;
|
|
5
|
+
background-attachment: fixed;
|
|
6
|
+
background-size: cover;
|
|
7
|
+
position: absolute;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
transition: background-image var(--animation-duration-3x) ease-in-out;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Fitting options */
|
|
14
|
+
#background_fitting {
|
|
15
|
+
max-width: 6em;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Fill/Cover - scales to fill width while maintaining aspect ratio */
|
|
19
|
+
#bg1.cover,
|
|
20
|
+
#bg_custom.cover {
|
|
21
|
+
background-size: cover;
|
|
22
|
+
background-position: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Fit/Contain - shows entire image maintaining aspect ratio */
|
|
26
|
+
#bg1.contain,
|
|
27
|
+
#bg_custom.contain {
|
|
28
|
+
background-size: contain;
|
|
29
|
+
background-position: center;
|
|
30
|
+
background-repeat: no-repeat;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Stretch - stretches to fill entire space */
|
|
34
|
+
#bg1.stretch,
|
|
35
|
+
#bg_custom.stretch {
|
|
36
|
+
background-size: 100% 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Center - centers without scaling */
|
|
40
|
+
#bg1.center,
|
|
41
|
+
#bg_custom.center {
|
|
42
|
+
background-size: auto;
|
|
43
|
+
background-position: center;
|
|
44
|
+
background-repeat: no-repeat;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
body.reduced-motion #bg1,
|
|
48
|
+
body.reduced-motion #bg_custom {
|
|
49
|
+
transition: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
#bg1 {
|
|
53
|
+
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=');
|
|
54
|
+
z-index: -3;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
#bg_custom {
|
|
58
|
+
background-image: none;
|
|
59
|
+
z-index: -2;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.bg_example.flex-container.locked:not(:focus-visible) {
|
|
63
|
+
outline-color: var(--golden);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* This is the main flex container for the entire drawer */
|
|
67
|
+
#Backgrounds.drawer-content.openDrawer.bg-drawer-layout {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
height: calc(100vh - var(--topBarBlockSize));
|
|
71
|
+
max-height: calc(100vh - var(--topBarBlockSize));
|
|
72
|
+
height: calc(100dvh - var(--topBarBlockSize));
|
|
73
|
+
max-height: calc(100dvh - var(--topBarBlockSize));
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
width: var(--sheldWidth);
|
|
76
|
+
max-width: var(--sheldWidth);
|
|
77
|
+
padding: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
#bg-header-fixed {
|
|
81
|
+
flex-shrink: 0;
|
|
82
|
+
padding: 5px;
|
|
83
|
+
background-color: var(--SmartThemeBlurTintColor);
|
|
84
|
+
border-bottom: 1px solid var(--SmartThemeBorderColor);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
#bg-header-fixed>.flex-container {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
gap: 5px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
#bg-scrollable-content {
|
|
94
|
+
flex-grow: 1;
|
|
95
|
+
overflow-y: auto;
|
|
96
|
+
overflow-x: hidden;
|
|
97
|
+
padding: 0 5px 5px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
#bg-filter {
|
|
101
|
+
font-size: calc(var(--mainFontSize) * 0.95);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Thumbnail Menu & Buttons */
|
|
105
|
+
.bg_example .mobile-only-menu-toggle {
|
|
106
|
+
display: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.bg_example.flex-container {
|
|
110
|
+
width: 30%;
|
|
111
|
+
max-width: 200px;
|
|
112
|
+
margin: 5px;
|
|
113
|
+
aspect-ratio: 16/9;
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
box-shadow: 0 0 7px var(--black50a);
|
|
116
|
+
|
|
117
|
+
position: relative;
|
|
118
|
+
overflow: hidden;
|
|
119
|
+
border-radius: 8px;
|
|
120
|
+
border: 0px solid transparent;
|
|
121
|
+
outline: 2px solid var(--SmartThemeBorderColor);
|
|
122
|
+
outline-offset: -1px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.bg_example.flex-container:focus-visible {
|
|
126
|
+
outline-offset: inherit;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.bg_example_img {
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: -2px;
|
|
132
|
+
left: -2px;
|
|
133
|
+
right: -2px;
|
|
134
|
+
bottom: -2px;
|
|
135
|
+
|
|
136
|
+
background-image: inherit;
|
|
137
|
+
|
|
138
|
+
background-size: cover;
|
|
139
|
+
background-position: center;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.bg_example .jg-menu {
|
|
143
|
+
display: flex;
|
|
144
|
+
position: absolute;
|
|
145
|
+
top: 2px;
|
|
146
|
+
right: 2px;
|
|
147
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
148
|
+
border-radius: 8px;
|
|
149
|
+
gap: 3px;
|
|
150
|
+
padding: 3px 5px;
|
|
151
|
+
z-index: 3;
|
|
152
|
+
backdrop-filter: blur(4px);
|
|
153
|
+
border: 1px solid var(--SmartThemeBorderColor);
|
|
154
|
+
justify-items: center;
|
|
155
|
+
align-items: center;
|
|
156
|
+
|
|
157
|
+
opacity: 0;
|
|
158
|
+
visibility: hidden;
|
|
159
|
+
transform: scale(0.9);
|
|
160
|
+
transform-origin: center;
|
|
161
|
+
transition: opacity var(--animation-duration) ease-out, visibility var(--animation-duration) ease-out, transform var(--animation-duration) ease-out;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.bg_example:hover .jg-menu,
|
|
165
|
+
.bg_example:focus-within .jg-menu {
|
|
166
|
+
opacity: 1;
|
|
167
|
+
visibility: visible;
|
|
168
|
+
transform: scale(1);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.bg_example .jg-button {
|
|
172
|
+
display: flex;
|
|
173
|
+
width: 30px;
|
|
174
|
+
height: 30px;
|
|
175
|
+
align-items: center;
|
|
176
|
+
justify-content: center;
|
|
177
|
+
color: white;
|
|
178
|
+
padding: 5px;
|
|
179
|
+
font-size: 1.1em;
|
|
180
|
+
border-radius: 6px;
|
|
181
|
+
transition: background-color var(--animation-duration) ease;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.bg_example .jg-button:hover {
|
|
185
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.bg_example .jg-unlock {
|
|
189
|
+
display: none;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.bg_example.locked .jg-lock {
|
|
193
|
+
display: none;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.bg_example.locked .jg-unlock {
|
|
197
|
+
display: flex;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.bg_example:not([custom="true"]) .jg-copy,
|
|
201
|
+
.bg_example[custom="true"] .jg-edit {
|
|
202
|
+
display: none;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* Thumbnail Title */
|
|
206
|
+
.bg_example .BGSampleTitle {
|
|
207
|
+
position: absolute;
|
|
208
|
+
bottom: 0;
|
|
209
|
+
left: 0;
|
|
210
|
+
right: 0;
|
|
211
|
+
background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
|
|
212
|
+
color: var(--SmartThemeBodyColor);
|
|
213
|
+
font-size: 0.9em;
|
|
214
|
+
font-weight: 600;
|
|
215
|
+
padding: 0px 6px 2px;
|
|
216
|
+
text-align: center;
|
|
217
|
+
white-space: nowrap;
|
|
218
|
+
overflow: hidden;
|
|
219
|
+
text-overflow: ellipsis;
|
|
220
|
+
opacity: 0;
|
|
221
|
+
transition: opacity var(--animation-duration) ease-in-out;
|
|
222
|
+
pointer-events: none;
|
|
223
|
+
border-radius: 0 0 8px 8px;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.bg_example:hover .BGSampleTitle,
|
|
227
|
+
.bg_example:focus-within .BGSampleTitle {
|
|
228
|
+
opacity: 1;
|
|
229
|
+
}
|
|
@@ -25,6 +25,87 @@
|
|
|
25
25
|
font-size: 15px;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
#Backgrounds .bg_example .BGSampleTitle {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
bottom: 0px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.bg_example:hover .jg-menu,
|
|
34
|
+
.bg_example:focus-within .jg-menu {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.bg_example.mobile-menu-open .jg-menu {
|
|
39
|
+
display: flex;
|
|
40
|
+
z-index: 4;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.bg_example .mobile-only-menu-toggle {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: 5px;
|
|
49
|
+
right: 5px;
|
|
50
|
+
width: 30px;
|
|
51
|
+
height: 30px;
|
|
52
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
53
|
+
color: white;
|
|
54
|
+
border-radius: 6px;
|
|
55
|
+
z-index: 3;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
backdrop-filter: blur(2px);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
#bg-header-controls {
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
row-gap: 10px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
#bg-header-fixed>.flex-container {
|
|
66
|
+
flex-wrap: wrap;
|
|
67
|
+
row-gap: 0px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#Backgrounds:not(.selection-mode-active) #bg-header-fixed>.flex-container::after {
|
|
71
|
+
content: '';
|
|
72
|
+
order: 1;
|
|
73
|
+
flex-basis: 100%;
|
|
74
|
+
height: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* --- Row 1 Item --- */
|
|
78
|
+
#bg-header-fixed #bg-header-title {
|
|
79
|
+
order: 1;
|
|
80
|
+
flex-grow: 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
#bg-header-fixed #background_fitting,
|
|
84
|
+
#bg-header-fixed #auto_background {
|
|
85
|
+
order: 1;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* --- Row 2 Item --- */
|
|
89
|
+
#bg-header-fixed #bg-filter {
|
|
90
|
+
order: 2;
|
|
91
|
+
flex-grow: 1;
|
|
92
|
+
min-width: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* --- Row 3 Item --- */
|
|
96
|
+
#bg-header-fixed #add_background_button_top {
|
|
97
|
+
order: 3;
|
|
98
|
+
width: 100%;
|
|
99
|
+
text-align: center;
|
|
100
|
+
padding-top: 0.5em;
|
|
101
|
+
padding-bottom: 0.5em;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
#Backgrounds.drawer-content.openDrawer.bg-drawer-layout {
|
|
105
|
+
width: 100dvw;
|
|
106
|
+
max-width: 100dvw;
|
|
107
|
+
}
|
|
108
|
+
|
|
28
109
|
#extensions_settings,
|
|
29
110
|
#extensions_settings2 {
|
|
30
111
|
width: 100% !important;
|
|
@@ -412,10 +493,6 @@
|
|
|
412
493
|
flex-basis: max(calc(100% / 2 - 10px), 180px);
|
|
413
494
|
}
|
|
414
495
|
|
|
415
|
-
.BGSampleTitle {
|
|
416
|
-
display: none;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
496
|
.tag.excluded:after {
|
|
420
497
|
top: unset;
|
|
421
498
|
bottom: unset;
|
package/public/css/popup.css
CHANGED
|
@@ -26,7 +26,6 @@ dialog {
|
|
|
26
26
|
|
|
27
27
|
/* Fix weird animation issue with font-scaling during popup open */
|
|
28
28
|
backface-visibility: hidden;
|
|
29
|
-
transform: translateZ(0);
|
|
30
29
|
-webkit-font-smoothing: subpixel-antialiased;
|
|
31
30
|
|
|
32
31
|
/* Variables setup */
|
|
@@ -93,6 +92,11 @@ dialog {
|
|
|
93
92
|
animation: fade-in var(--popup-animation-speed) ease-in-out;
|
|
94
93
|
}
|
|
95
94
|
|
|
95
|
+
/* Fix toast container snapping into the backdrop while the animation is running */
|
|
96
|
+
.popup[opening] #toast-container {
|
|
97
|
+
visibility: hidden;
|
|
98
|
+
}
|
|
99
|
+
|
|
96
100
|
/* Open state of the dialog */
|
|
97
101
|
.popup[open] {
|
|
98
102
|
color: var(--SmartThemeBodyColor);
|
|
@@ -118,17 +122,30 @@ body.no-blur .popup[open]::backdrop {
|
|
|
118
122
|
animation: fade-out var(--popup-animation-speed) ease-in-out;
|
|
119
123
|
}
|
|
120
124
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
left: 50%;
|
|
126
|
-
transform: translate(-50%, -50%);
|
|
125
|
+
/* Edge inset to match Toastr default spacing */
|
|
126
|
+
:root {
|
|
127
|
+
--toast-edge: 12px;
|
|
128
|
+
}
|
|
127
129
|
|
|
128
|
-
|
|
130
|
+
.popup #toast-container {
|
|
131
|
+
/* Popups are centered by default; toasts should not be */
|
|
129
132
|
text-align: left;
|
|
130
133
|
}
|
|
131
134
|
|
|
135
|
+
/* Per-position position adjustments caused by the top bar, inside the popup */
|
|
136
|
+
.popup #toast-container.toast-top-left {
|
|
137
|
+
top: calc(var(--toast-edge) + var(--topBarBlockSize));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.popup #toast-container.toast-top-center {
|
|
141
|
+
/* toastr in core does not have a top offset on center, so we don't do that either in popups */
|
|
142
|
+
top: var(--topBarBlockSize);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.popup #toast-container.toast-top-right {
|
|
146
|
+
top: calc(var(--toast-edge) + var(--topBarBlockSize));
|
|
147
|
+
}
|
|
148
|
+
|
|
132
149
|
.popup-crop-wrap {
|
|
133
150
|
margin: 10px auto;
|
|
134
151
|
max-height: 75vh;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<title>Forbidden</title>
|
|
6
|
+
</head>
|
|
7
|
+
|
|
8
|
+
<body>
|
|
9
|
+
<h1>Forbidden</h1>
|
|
10
|
+
<p>
|
|
11
|
+
If you are the system administrator, add the hostname you are accessing from to the
|
|
12
|
+
host whitelist, or disable host whitelisting in the
|
|
13
|
+
<code>config.yaml</code> file located in the root directory of your installation.
|
|
14
|
+
</p>
|
|
15
|
+
<hr />
|
|
16
|
+
<p>
|
|
17
|
+
<em>Access from this host is not allowed. This attempt has been logged.</em>
|
|
18
|
+
</p>
|
|
19
|
+
</body>
|
|
20
|
+
|
|
21
|
+
</html>
|
package/public/global.d.ts
CHANGED
|
@@ -5,20 +5,20 @@ import { QuickReplyApi } from './scripts/extensions/quick-reply/api/QuickReplyAp
|
|
|
5
5
|
|
|
6
6
|
declare global {
|
|
7
7
|
// Custom types
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
type InstructSettings = typeof power_user.instruct;
|
|
9
|
+
type ContextSettings = typeof power_user.context;
|
|
10
|
+
type ReasoningSettings = typeof power_user.reasoning;
|
|
11
11
|
|
|
12
12
|
// Global namespace modules
|
|
13
13
|
interface Window {
|
|
14
14
|
ai: any;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
var pdfjsLib;
|
|
18
|
+
var ePub;
|
|
19
|
+
var quickReplyApi: QuickReplyApi;
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
var SillyTavern: {
|
|
22
22
|
getContext(): typeof getContext;
|
|
23
23
|
llm: any;
|
|
24
24
|
libs: typeof libs;
|
|
@@ -63,7 +63,7 @@ declare global {
|
|
|
63
63
|
* @param lang Target language
|
|
64
64
|
* @param provider Translation provider
|
|
65
65
|
*/
|
|
66
|
-
|
|
66
|
+
function translate(text: string, lang: string, provider?: string | null): Promise<string>;
|
|
67
67
|
|
|
68
68
|
interface ConvertVideoArgs {
|
|
69
69
|
buffer: Uint8Array;
|
|
@@ -76,9 +76,9 @@ declare global {
|
|
|
76
76
|
*/
|
|
77
77
|
function convertVideoToAnimatedWebp(args: ConvertVideoArgs): Promise<Uint8Array>;
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
type ColorPickerEvent = Omit<JQuery.ChangeEvent<HTMLElement>, "detail"> & {
|
|
80
80
|
detail: {
|
|
81
81
|
rgba: string;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
84
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg id="uuid-adbdae8e-5a41-46d1-8c18-aa73cdbfee32" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" height="100px" width="100px" transform="rotate(0) scale(1, 1)"><path d="m0,2.7v12.6c0,1.491,1.209,2.7,2.7,2.7h12.6c1.491,0,2.7-1.209,2.7-2.7V2.7c0-1.491-1.209-2.7-2.7-2.7H2.7C1.209,0,0,1.209,0,2.7ZM10.8,0v3.6c0,3.976,3.224,7.2,7.2,7.2h-3.6c-3.976,0-7.199,3.222-7.2,7.198v-3.598c0-3.976-3.224-7.2-7.2-7.2h3.6c3.976,0,7.2-3.224,7.2-7.2Z" stroke-width="0"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="118.66667" height="177.33333" viewBox="0 0 89 133"><path d="M14.5 1.8c-6.3 3-11.3 8.8-13.2 15.1C-.1 21.8-.2 27.6.6 70.6l.9 48.2 3.1 4.4c1.9 2.6 5.3 5.4 8.4 7l5.2 2.8h26.7c14.8 0 28.2-.5 30.2-1 5.4-1.5 11.6-8.6 12.4-14.3 1-6.5-.2-10.4-4.7-15.3-5.1-5.5-8.3-6.4-23.3-6.4C46.2 96 43 94.9 43 90.5c0-4.3 3.3-5.5 15.4-5.5 13 0 18-1.8 22.7-8.3 5.4-7.5 5-14.4-1.3-21.3-5.1-5.5-11-7.4-22.8-7.4-9.2 0-13-1.5-13-5 0-3.9 3.6-5 16.9-5 14.5 0 19.4-1.6 23.7-7.9 5.4-7.9 5.2-15.9-.6-22.5-5.4-6.1-6.7-6.4-37.5-7.1-26.3-.6-28.2-.5-32 1.3z"/></svg>
|