sillytavern 1.11.8 → 1.12.0-preview

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 (172) hide show
  1. package/.dockerignore +2 -1
  2. package/.eslintrc.js +11 -1
  3. package/Dockerfile +3 -13
  4. package/config.yaml +14 -2
  5. package/default/config.yaml +14 -2
  6. package/default/content/index.json +116 -1
  7. package/default/{settings.json → content/settings.json} +8 -6
  8. package/default/content/themes/Cappuccino.json +35 -0
  9. package/default/content/themes/Dark Lite.json +35 -0
  10. package/docker/docker-compose.yml +1 -2
  11. package/docker/docker-entrypoint.sh +1 -30
  12. package/index.d.ts +20 -0
  13. package/jsconfig.json +5 -2
  14. package/package.json +8 -1
  15. package/post-install.js +2 -27
  16. package/public/css/accounts.css +5 -0
  17. package/public/css/login.css +44 -0
  18. package/public/css/st-tailwind.css +12 -0
  19. package/public/img/logo.png +0 -0
  20. package/public/index.html +24 -10
  21. package/public/lib/epub.min.js +1 -0
  22. package/public/lib/jszip.min.js +13 -0
  23. package/public/login.html +81 -0
  24. package/public/script.js +19 -56
  25. package/public/scripts/RossAscends-mods.js +1 -1
  26. package/public/scripts/bulk-edit.js +1 -10
  27. package/public/scripts/chats.js +610 -20
  28. package/public/scripts/extensions/attachments/buttons.html +9 -0
  29. package/public/scripts/extensions/attachments/fandom-scrape.html +51 -0
  30. package/public/scripts/extensions/attachments/index.js +6 -0
  31. package/public/scripts/extensions/attachments/manager.html +118 -0
  32. package/public/scripts/extensions/attachments/manifest.json +11 -0
  33. package/public/scripts/extensions/attachments/notepad.html +10 -0
  34. package/public/scripts/extensions/attachments/style.css +29 -0
  35. package/public/scripts/extensions/attachments/web-scrape.html +3 -0
  36. package/public/scripts/extensions/attachments/youtube-scrape.html +20 -0
  37. package/public/scripts/extensions/caption/index.js +0 -6
  38. package/public/scripts/extensions/expressions/index.js +8 -0
  39. package/public/scripts/extensions/memory/index.js +1 -1
  40. package/public/scripts/extensions/shared.js +0 -1
  41. package/public/scripts/extensions/tts/alltalk.js +2 -2
  42. package/public/scripts/extensions/vectors/index.js +276 -12
  43. package/public/scripts/extensions/vectors/settings.html +91 -6
  44. package/public/scripts/extensions.js +2 -0
  45. package/public/scripts/loader.js +2 -5
  46. package/public/scripts/login.js +276 -0
  47. package/public/scripts/logprobs.js +1 -1
  48. package/public/scripts/openai.js +26 -1
  49. package/public/scripts/power-user.js +5 -5
  50. package/public/scripts/scrapers.js +416 -0
  51. package/public/scripts/templates/admin.html +115 -0
  52. package/public/scripts/templates/changeName.html +5 -0
  53. package/public/scripts/templates/changePassword.html +14 -0
  54. package/public/scripts/templates/deleteUser.html +26 -0
  55. package/public/scripts/templates/resetSettings.html +13 -0
  56. package/public/scripts/templates/snapshotsView.html +31 -0
  57. package/public/scripts/templates/userProfile.html +97 -0
  58. package/public/scripts/templates/userReset.html +18 -0
  59. package/public/scripts/textgen-settings.js +2 -1
  60. package/public/scripts/user.js +888 -0
  61. package/public/scripts/utils.js +105 -4
  62. package/public/scripts/world-info.js +1 -1
  63. package/public/style.css +5 -3
  64. package/recover.js +62 -0
  65. package/server.js +124 -72
  66. package/src/additional-headers.js +72 -22
  67. package/src/constants.js +59 -27
  68. package/src/endpoints/anthropic.js +1 -1
  69. package/src/endpoints/assets.js +40 -20
  70. package/src/endpoints/avatars.js +4 -4
  71. package/src/endpoints/backends/chat-completions.js +17 -15
  72. package/src/endpoints/backends/scale-alt.js +43 -18
  73. package/src/endpoints/backgrounds.js +12 -11
  74. package/src/endpoints/characters.js +381 -311
  75. package/src/endpoints/chats.js +107 -92
  76. package/src/endpoints/content-manager.js +131 -89
  77. package/src/endpoints/extensions.js +13 -13
  78. package/src/endpoints/files.js +28 -3
  79. package/src/endpoints/google.js +2 -1
  80. package/src/endpoints/groups.js +13 -14
  81. package/src/endpoints/horde.js +5 -5
  82. package/src/endpoints/images.js +7 -8
  83. package/src/endpoints/moving-ui.js +1 -2
  84. package/src/endpoints/novelai.js +4 -4
  85. package/src/endpoints/openai.js +8 -8
  86. package/src/endpoints/presets.js +14 -14
  87. package/src/endpoints/quick-replies.js +2 -3
  88. package/src/endpoints/secrets.js +46 -84
  89. package/src/endpoints/serpapi.js +89 -3
  90. package/src/endpoints/settings.js +151 -30
  91. package/src/endpoints/sprites.js +14 -10
  92. package/src/endpoints/stable-diffusion.js +22 -23
  93. package/src/endpoints/stats.js +74 -76
  94. package/src/endpoints/themes.js +2 -3
  95. package/src/endpoints/thumbnails.js +84 -49
  96. package/src/endpoints/tokenizers.js +4 -2
  97. package/src/endpoints/translate.js +6 -6
  98. package/src/endpoints/users-admin.js +255 -0
  99. package/src/endpoints/users-private.js +257 -0
  100. package/src/endpoints/users-public.js +199 -0
  101. package/src/endpoints/vectors.js +116 -33
  102. package/src/endpoints/worldinfo.js +8 -7
  103. package/src/express-common.js +22 -1
  104. package/src/middleware/whitelist.js +8 -17
  105. package/src/polyfill.js +2 -0
  106. package/src/users.js +727 -0
  107. package/src/util.js +32 -34
  108. package/src/vectors/cohere-vectors.js +65 -0
  109. package/src/{embedding.js → vectors/embedding.js} +1 -1
  110. package/src/{makersuite-vectors.js → vectors/makersuite-vectors.js} +7 -5
  111. package/src/{nomicai-vectors.js → vectors/nomicai-vectors.js} +7 -5
  112. package/src/{openai-vectors.js → vectors/openai-vectors.js} +8 -6
  113. package/start.sh +0 -6
  114. package/.github/close-label.yml +0 -2
  115. package/.github/issue-auto-comments.yml +0 -62
  116. package/.github/workflows/add-comment-from-tag.yml +0 -28
  117. package/.github/workflows/check-merge-conflicts.yml +0 -16
  118. package/.github/workflows/close-stale-issues.yml +0 -82
  119. package/.github/workflows/get-pr-size.yml +0 -39
  120. package/.github/workflows/manage-pending-labels-closed.yml +0 -17
  121. package/.github/workflows/manage-pending-labels.yml +0 -42
  122. package/public/NovelAI Settings/.gitkeep +0 -0
  123. package/public/OpenAI Settings/.gitkeep +0 -0
  124. package/public/TextGen Settings/.gitkeep +0 -0
  125. package/public/User Avatars/README.md +0 -1
  126. package/public/assets/ambient/.placeholder +0 -1
  127. package/public/assets/bgm/.placeholder +0 -1
  128. package/public/assets/blip/.placeholder +0 -1
  129. package/public/assets/live2d/.placeholder +0 -1
  130. package/public/assets/temp/.placeholder +0 -0
  131. package/public/assets/vrm/animation/.placeholder +0 -1
  132. package/public/assets/vrm/model/.placeholder +0 -1
  133. package/public/characters/.gitkeep +0 -8
  134. package/public/chats/.gitkeep +0 -5
  135. package/public/context/.gitkeep +0 -0
  136. package/public/group chats/.gitkeep +0 -1
  137. package/public/groups/.gitkeep +0 -1
  138. package/public/instruct/.gitkeep +0 -0
  139. package/public/settings.json +0 -633
  140. package/public/themes/.gitkeep +0 -0
  141. package/public/themes/Default (Dark) 1.7.1.json +0 -21
  142. package/public/themes/Ross v2.json +0 -21
  143. package/public/user/.gitkeep +0 -0
  144. package/public/worlds/README.md +0 -1
  145. /package/{public/KoboldAI Settings → data}/.gitkeep +0 -0
  146. /package/{public → default/content}/backgrounds/__transparent.png +0 -0
  147. /package/{public → default/content}/backgrounds/_black.jpg +0 -0
  148. /package/{public → default/content}/backgrounds/_white.jpg +0 -0
  149. /package/{public → default/content}/backgrounds/bedroom clean.jpg +0 -0
  150. /package/{public → default/content}/backgrounds/bedroom cyberpunk.jpg +0 -0
  151. /package/{public → default/content}/backgrounds/bedroom red.jpg +0 -0
  152. /package/{public → default/content}/backgrounds/bedroom tatami.jpg +0 -0
  153. /package/{public → default/content}/backgrounds/cityscape medieval market.jpg +0 -0
  154. /package/{public → default/content}/backgrounds/cityscape medieval night.jpg +0 -0
  155. /package/{public → default/content}/backgrounds/cityscape postapoc.jpg +0 -0
  156. /package/{public → default/content}/backgrounds/forest treehouse fireworks air baloons (by kallmeflocc).jpg +0 -0
  157. /package/{public → default/content}/backgrounds/japan classroom side.jpg +0 -0
  158. /package/{public → default/content}/backgrounds/japan classroom.jpg +0 -0
  159. /package/{public → default/content}/backgrounds/japan path cherry blossom.jpg +0 -0
  160. /package/{public → default/content}/backgrounds/japan university.jpg +0 -0
  161. /package/{public → default/content}/backgrounds/landscape autumn great tree.jpg +0 -0
  162. /package/{public → default/content}/backgrounds/landscape beach day.png +0 -0
  163. /package/{public → default/content}/backgrounds/landscape beach night.jpg +0 -0
  164. /package/{public → default/content}/backgrounds/landscape mountain lake.jpg +0 -0
  165. /package/{public → default/content}/backgrounds/landscape postapoc.jpg +0 -0
  166. /package/{public → default/content}/backgrounds/landscape winter lake house.jpg +0 -0
  167. /package/{public → default/content}/backgrounds/royal.jpg +0 -0
  168. /package/{public → default/content}/backgrounds/tavern day.jpg +0 -0
  169. /package/{public/movingUI → default/content/presets/moving-ui}/Black Magic Time.json +0 -0
  170. /package/{public/movingUI → default/content/presets/moving-ui}/Default.json +0 -0
  171. /package/{public/QuickReplies → default/content/presets/quick-replies}/Default.json +0 -0
  172. /package/src/{extras-vectors.js → vectors/extras-vectors.js} +0 -0
package/.dockerignore CHANGED
@@ -4,6 +4,7 @@ npm-debug.log
4
4
  readme*
5
5
  Start.bat
6
6
  /dist
7
- /backups/
7
+ /backups
8
8
  cloudflared.exe
9
9
  access.log
10
+ /data
package/.eslintrc.js CHANGED
@@ -42,11 +42,21 @@ module.exports = {
42
42
  showdownKatex: 'readonly',
43
43
  SVGInject: 'readonly',
44
44
  toastr: 'readonly',
45
+ Readability: 'readonly',
46
+ isProbablyReaderable: 'readonly',
45
47
  },
46
48
  },
47
49
  ],
48
50
  // There are various vendored libraries that shouldn't be linted
49
- ignorePatterns: ['public/lib/**/*', '*.min.js', 'src/ai_horde/**/*'],
51
+ ignorePatterns: [
52
+ 'public/lib/**/*',
53
+ '*.min.js',
54
+ 'src/ai_horde/**/*',
55
+ 'plugins/**/*',
56
+ 'data/**/*',
57
+ 'backups/**/*',
58
+ 'node_modules/**/*',
59
+ ],
50
60
  rules: {
51
61
  'no-unused-vars': ['error', { args: 'none' }],
52
62
  'no-control-regex': 'off',
package/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM node:19.1.0-alpine3.16
1
+ FROM node:lts-alpine3.18
2
2
 
3
3
  # Arguments
4
4
  ARG APP_HOME=/home/node/app
@@ -26,19 +26,9 @@ COPY . ./
26
26
 
27
27
  # Copy default chats, characters and user avatars to <folder>.default folder
28
28
  RUN \
29
- IFS="," RESOURCES="assets,backgrounds,user,context,instruct,QuickReplies,movingUI,themes,characters,chats,groups,group chats,User Avatars,worlds,OpenAI Settings,NovelAI Settings,KoboldAI Settings,TextGen Settings" && \
30
- \
31
- echo "*** Store default $RESOURCES in <folder>.default ***" && \
32
- for R in $RESOURCES; do mv "public/$R" "public/$R.default"; done || true && \
33
- \
34
- echo "*** Create symbolic links to config directory ***" && \
35
- for R in $RESOURCES; do ln -s "../config/$R" "public/$R"; done || true && \
36
- \
37
- rm -f "config.yaml" "public/settings.json" || true && \
29
+ rm -f "config.yaml" || true && \
38
30
  ln -s "./config/config.yaml" "config.yaml" || true && \
39
- ln -s "../config/settings.json" "public/settings.json" || true && \
40
- mkdir "config" || true && \
41
- mkdir -p "public/user" || true
31
+ mkdir "config" || true
42
32
 
43
33
  # Cleanup unnecessary files
44
34
  RUN \
package/config.yaml CHANGED
@@ -1,8 +1,12 @@
1
- # -- NETWORK CONFIGURATION --
1
+ # -- DATA CONFIGURATION --
2
+ # Root directory for user data storage
3
+ dataRoot: ./data
4
+ # -- SERVER CONFIGURATION --
2
5
  # Listen for incoming connections
3
6
  listen: false
4
7
  # Server port
5
8
  port: 8000
9
+ # -- SECURITY CONFIGURATION --
6
10
  # Toggle whitelist mode
7
11
  whitelistMode: true
8
12
  # Whitelist of allowed IP addresses
@@ -16,7 +20,15 @@ basicAuthUser:
16
20
  password: "password"
17
21
  # Enables CORS proxy middleware
18
22
  enableCorsProxy: false
19
- # Disable security checks - NOT RECOMMENDED
23
+ # Enable multi-user mode
24
+ enableUserAccounts: false
25
+ # Enable discreet login mode: hides user list on the login screen
26
+ enableDiscreetLogin: false
27
+ # Used to sign session cookies. Will be auto-generated if not set
28
+ cookieSecret: ''
29
+ # Disable CSRF protection - NOT RECOMMENDED
30
+ disableCsrfProtection: false
31
+ # Disable startup security checks - NOT RECOMMENDED
20
32
  securityOverride: false
21
33
  # -- ADVANCED CONFIGURATION --
22
34
  # Open the browser automatically
@@ -1,8 +1,12 @@
1
- # -- NETWORK CONFIGURATION --
1
+ # -- DATA CONFIGURATION --
2
+ # Root directory for user data storage
3
+ dataRoot: ./data
4
+ # -- SERVER CONFIGURATION --
2
5
  # Listen for incoming connections
3
6
  listen: false
4
7
  # Server port
5
8
  port: 8000
9
+ # -- SECURITY CONFIGURATION --
6
10
  # Toggle whitelist mode
7
11
  whitelistMode: true
8
12
  # Whitelist of allowed IP addresses
@@ -16,7 +20,15 @@ basicAuthUser:
16
20
  password: "password"
17
21
  # Enables CORS proxy middleware
18
22
  enableCorsProxy: false
19
- # Disable security checks - NOT RECOMMENDED
23
+ # Enable multi-user mode
24
+ enableUserAccounts: false
25
+ # Enable discreet login mode: hides user list on the login screen
26
+ enableDiscreetLogin: false
27
+ # Used to sign session cookies. Will be auto-generated if not set
28
+ cookieSecret: ''
29
+ # Disable CSRF protection - NOT RECOMMENDED
30
+ disableCsrfProtection: false
31
+ # Disable startup security checks - NOT RECOMMENDED
20
32
  securityOverride: false
21
33
  # -- ADVANCED CONFIGURATION --
22
34
  # Open the browser automatically
@@ -1,4 +1,108 @@
1
1
  [
2
+ {
3
+ "filename": "settings.json",
4
+ "type": "settings"
5
+ },
6
+ {
7
+ "filename": "themes/Dark Lite.json",
8
+ "type": "theme"
9
+ },
10
+ {
11
+ "filename": "themes/Cappuccino.json",
12
+ "type": "theme"
13
+ },
14
+ {
15
+ "filename": "backgrounds/__transparent.png",
16
+ "type": "background"
17
+ },
18
+ {
19
+ "filename": "backgrounds/_black.jpg",
20
+ "type": "background"
21
+ },
22
+ {
23
+ "filename": "backgrounds/_white.jpg",
24
+ "type": "background"
25
+ },
26
+ {
27
+ "filename": "backgrounds/bedroom clean.jpg",
28
+ "type": "background"
29
+ },
30
+ {
31
+ "filename": "backgrounds/bedroom cyberpunk.jpg",
32
+ "type": "background"
33
+ },
34
+ {
35
+ "filename": "backgrounds/bedroom red.jpg",
36
+ "type": "background"
37
+ },
38
+ {
39
+ "filename": "backgrounds/bedroom tatami.jpg",
40
+ "type": "background"
41
+ },
42
+ {
43
+ "filename": "backgrounds/cityscape medieval market.jpg",
44
+ "type": "background"
45
+ },
46
+ {
47
+ "filename": "backgrounds/cityscape medieval night.jpg",
48
+ "type": "background"
49
+ },
50
+ {
51
+ "filename": "backgrounds/cityscape postapoc.jpg",
52
+ "type": "background"
53
+ },
54
+ {
55
+ "filename": "backgrounds/forest treehouse fireworks air baloons (by kallmeflocc).jpg",
56
+ "type": "background"
57
+ },
58
+ {
59
+ "filename": "backgrounds/japan classroom side.jpg",
60
+ "type": "background"
61
+ },
62
+ {
63
+ "filename": "backgrounds/japan classroom.jpg",
64
+ "type": "background"
65
+ },
66
+ {
67
+ "filename": "backgrounds/japan path cherry blossom.jpg",
68
+ "type": "background"
69
+ },
70
+ {
71
+ "filename": "backgrounds/japan university.jpg",
72
+ "type": "background"
73
+ },
74
+ {
75
+ "filename": "backgrounds/landscape autumn great tree.jpg",
76
+ "type": "background"
77
+ },
78
+ {
79
+ "filename": "backgrounds/landscape beach day.png",
80
+ "type": "background"
81
+ },
82
+ {
83
+ "filename": "backgrounds/landscape beach night.jpg",
84
+ "type": "background"
85
+ },
86
+ {
87
+ "filename": "backgrounds/landscape mountain lake.jpg",
88
+ "type": "background"
89
+ },
90
+ {
91
+ "filename": "backgrounds/landscape postapoc.jpg",
92
+ "type": "background"
93
+ },
94
+ {
95
+ "filename": "backgrounds/landscape winter lake house.jpg",
96
+ "type": "background"
97
+ },
98
+ {
99
+ "filename": "backgrounds/royal.jpg",
100
+ "type": "background"
101
+ },
102
+ {
103
+ "filename": "backgrounds/tavern day.jpg",
104
+ "type": "background"
105
+ },
2
106
  {
3
107
  "filename": "default_Seraphina.png",
4
108
  "type": "character"
@@ -211,7 +315,6 @@
211
315
  "filename": "presets/novel/Writers-Daemon-Kayra.json",
212
316
  "type": "novel_preset"
213
317
  },
214
-
215
318
  {
216
319
  "filename": "presets/textgen/Asterism.json",
217
320
  "type": "textgen_preset"
@@ -527,5 +630,17 @@
527
630
  {
528
631
  "filename": "presets/instruct/Llama 3 Instruct.json",
529
632
  "type": "instruct"
633
+ },
634
+ {
635
+ "filename": "presets/moving-ui/Default.json",
636
+ "type": "moving_ui"
637
+ },
638
+ {
639
+ "filename": "presets/moving-ui/Black Magic Time.json",
640
+ "type": "moving_ui"
641
+ },
642
+ {
643
+ "filename": "presets/quick-replies/Default.json",
644
+ "type": "quick_replies"
530
645
  }
531
646
  ]
@@ -95,7 +95,7 @@
95
95
  "user_prompt_bias": "",
96
96
  "show_user_prompt_bias": true,
97
97
  "markdown_escape_strings": "",
98
- "fast_ui_mode": false,
98
+ "fast_ui_mode": true,
99
99
  "avatar_style": 0,
100
100
  "chat_display": 0,
101
101
  "chat_width": 50,
@@ -115,16 +115,17 @@
115
115
  "italics_text_color": "rgba(145, 145, 145, 1)",
116
116
  "underline_text_color": "rgba(188, 231, 207, 1)",
117
117
  "quote_text_color": "rgba(225, 138, 36, 1)",
118
+ "chat_tint_color": "rgba(23, 23, 23, 1)",
118
119
  "blur_tint_color": "rgba(23, 23, 23, 1)",
119
- "user_mes_blur_tint_color": "rgba(0, 0, 0, 0.9)",
120
- "bot_mes_blur_tint_color": "rgba(0, 0, 0, 0.9)",
120
+ "user_mes_blur_tint_color": "rgba(30, 30, 30, 0.9)",
121
+ "bot_mes_blur_tint_color": "rgba(30, 30, 30, 0.9)",
121
122
  "shadow_color": "rgba(0, 0, 0, 1)",
122
123
  "waifuMode": false,
123
124
  "movingUI": false,
124
125
  "movingUIState": {},
125
126
  "movingUIPreset": "Default",
126
127
  "noShadows": true,
127
- "theme": "Default (Dark) 1.7.1",
128
+ "theme": "Dark Lite",
128
129
  "auto_swipe": false,
129
130
  "auto_swipe_minimum_length": 0,
130
131
  "auto_swipe_blacklist": [],
@@ -139,7 +140,7 @@
139
140
  "hotswap_enabled": true,
140
141
  "timer_enabled": false,
141
142
  "timestamps_enabled": true,
142
- "timestamp_model_icon": false,
143
+ "timestamp_model_icon": true,
143
144
  "mesIDDisplay_enabled": false,
144
145
  "max_context_unlocked": false,
145
146
  "prefer_character_prompt": true,
@@ -193,7 +194,8 @@
193
194
  "encode_tags": false,
194
195
  "enableLabMode": false,
195
196
  "enableZenSliders": false,
196
- "ui_mode": 1
197
+ "ui_mode": 1,
198
+ "forbid_external_media": true
197
199
  },
198
200
  "extension_settings": {
199
201
  "apiUrl": "http://localhost:5100",
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "Cappuccino",
3
+ "blur_strength": 3,
4
+ "main_text_color": "rgba(255, 255, 255, 1)",
5
+ "italics_text_color": "rgba(230, 210, 190, 1)",
6
+ "underline_text_color": "rgba(205, 180, 160, 1)",
7
+ "quote_text_color": "rgba(165, 140, 115, 1)",
8
+ "blur_tint_color": "rgba(34, 30, 32, 0.95)",
9
+ "chat_tint_color": "rgba(50, 45, 50, 0.75)",
10
+ "user_mes_blur_tint_color": "rgba(34, 30, 32, 0.75)",
11
+ "bot_mes_blur_tint_color": "rgba(34, 30, 32, 0.75)",
12
+ "shadow_color": "rgba(0, 0, 0, 0.3)",
13
+ "shadow_width": 1,
14
+ "border_color": "rgba(80, 80, 80, 0.89)",
15
+ "font_scale": 1,
16
+ "fast_ui_mode": false,
17
+ "waifuMode": false,
18
+ "avatar_style": 0,
19
+ "chat_display": 1,
20
+ "noShadows": false,
21
+ "chat_width": 50,
22
+ "timer_enabled": false,
23
+ "timestamps_enabled": true,
24
+ "timestamp_model_icon": true,
25
+ "mesIDDisplay_enabled": true,
26
+ "message_token_count_enabled": false,
27
+ "expand_message_actions": false,
28
+ "enableZenSliders": false,
29
+ "enableLabMode": false,
30
+ "hotswap_enabled": true,
31
+ "custom_css": "",
32
+ "bogus_folders": true,
33
+ "reduced_motion": false,
34
+ "compact_input_area": true
35
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "Dark Lite",
3
+ "blur_strength": 10,
4
+ "main_text_color": "rgba(220, 220, 210, 1)",
5
+ "italics_text_color": "rgba(145, 145, 145, 1)",
6
+ "underline_text_color": "rgba(188, 231, 207, 1)",
7
+ "quote_text_color": "rgba(225, 138, 36, 1)",
8
+ "blur_tint_color": "rgba(23, 23, 23, 1)",
9
+ "chat_tint_color": "rgba(23, 23, 23, 1)",
10
+ "user_mes_blur_tint_color": "rgba(30, 30, 30, 0.9)",
11
+ "bot_mes_blur_tint_color": "rgba(30, 30, 30, 0.9)",
12
+ "shadow_color": "rgba(0, 0, 0, 1)",
13
+ "shadow_width": 2,
14
+ "border_color": "rgba(0, 0, 0, 1)",
15
+ "font_scale": 1,
16
+ "fast_ui_mode": true,
17
+ "waifuMode": false,
18
+ "avatar_style": 0,
19
+ "chat_display": 0,
20
+ "noShadows": true,
21
+ "chat_width": 50,
22
+ "timer_enabled": false,
23
+ "timestamps_enabled": true,
24
+ "timestamp_model_icon": true,
25
+ "mesIDDisplay_enabled": false,
26
+ "message_token_count_enabled": false,
27
+ "expand_message_actions": false,
28
+ "enableZenSliders": "",
29
+ "enableLabMode": "",
30
+ "hotswap_enabled": true,
31
+ "custom_css": "",
32
+ "bogus_folders": true,
33
+ "reduced_motion": false,
34
+ "compact_input_area": true
35
+ }
@@ -8,7 +8,6 @@ services:
8
8
  ports:
9
9
  - "8000:8000"
10
10
  volumes:
11
- - "./extensions:/home/node/app/public/scripts/extensions/third-party"
12
11
  - "./config:/home/node/app/config"
13
- - "./user:/home/node/app/public/user"
12
+ - "./data:/home/node/app/data"
14
13
  restart: unless-stopped
@@ -1,38 +1,9 @@
1
1
  #!/bin/sh
2
2
 
3
- # Initialize missing user files
4
- IFS="," RESOURCES="assets,backgrounds,user,context,instruct,QuickReplies,movingUI,themes,characters,chats,groups,group chats,User Avatars,worlds,OpenAI Settings,NovelAI Settings,KoboldAI Settings,TextGen Settings"
5
- for R in $RESOURCES; do
6
- if [ ! -e "config/$R" ]; then
7
- echo "Resource not found, copying from defaults: $R"
8
- cp -r "public/$R.default" "config/$R"
9
- fi
10
- done
11
-
12
3
  if [ ! -e "config/config.yaml" ]; then
13
4
  echo "Resource not found, copying from defaults: config.yaml"
14
5
  cp -r "default/config.yaml" "config/config.yaml"
15
6
  fi
16
7
 
17
- if [ ! -e "config/settings.json" ]; then
18
- echo "Resource not found, copying from defaults: settings.json"
19
- cp -r "default/settings.json" "config/settings.json"
20
- fi
21
-
22
- CONFIG_FILE="config.yaml"
23
-
24
- echo "Starting with the following config:"
25
- cat $CONFIG_FILE
26
-
27
- if grep -q "listen: false" $CONFIG_FILE; then
28
- echo -e "\033[1;31mThe listen parameter is set to false. If you can't connect to the server, edit the \"docker/config/config.yaml\" file and restart the container.\033[0m"
29
- sleep 5
30
- fi
31
-
32
- if grep -q "whitelistMode: true" $CONFIG_FILE; then
33
- echo -e "\033[1;31mThe whitelistMode parameter is set to true. If you can't connect to the server, edit the \"docker/config/config.yaml\" file and restart the container.\033[0m"
34
- sleep 5
35
- fi
36
-
37
8
  # Start the server
38
- exec node server.js
9
+ exec node server.js --listen
package/index.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ import { UserDirectoryList, User } from "./src/users";
2
+
3
+ declare global {
4
+ namespace Express {
5
+ export interface Request {
6
+ user: {
7
+ profile: User;
8
+ directories: UserDirectoryList;
9
+ };
10
+ }
11
+ }
12
+ }
13
+
14
+ declare module 'express-session' {
15
+ export interface SessionData {
16
+ handle: string;
17
+ touch: number;
18
+ // other properties...
19
+ }
20
+ }
package/jsconfig.json CHANGED
@@ -12,6 +12,9 @@
12
12
  },
13
13
  "exclude": [
14
14
  "node_modules",
15
- "**/node_modules/*"
15
+ "**/node_modules/*",
16
+ "public/lib",
17
+ "backups/*",
18
+ "data/*"
16
19
  ]
17
- }
20
+ }
package/package.json CHANGED
@@ -4,17 +4,21 @@
4
4
  "@agnai/web-tokenizers": "^0.1.3",
5
5
  "@dqbd/tiktoken": "^1.0.13",
6
6
  "@zeldafan0225/ai_horde": "^4.0.1",
7
+ "archiver": "^7.0.1",
7
8
  "bing-translate-api": "^2.9.1",
8
9
  "body-parser": "^1.20.2",
9
10
  "command-exists": "^1.2.9",
10
11
  "compression": "^1",
11
12
  "cookie-parser": "^1.4.6",
13
+ "cookie-session": "^2.1.0",
12
14
  "cors": "^2.8.5",
13
15
  "csrf-csrf": "^2.2.3",
14
16
  "express": "^4.19.2",
15
17
  "form-data": "^4.0.0",
16
18
  "google-translate-api-browser": "^3.0.1",
17
19
  "gpt3-tokenizer": "^1.1.5",
20
+ "he": "^1.2.0",
21
+ "helmet": "^7.1.0",
18
22
  "ip-matching": "^2.1.2",
19
23
  "ipaddr.js": "^2.0.1",
20
24
  "jimp": "^0.22.10",
@@ -22,10 +26,12 @@
22
26
  "mime-types": "^2.1.35",
23
27
  "multer": "^1.4.5-lts.1",
24
28
  "node-fetch": "^2.6.11",
29
+ "node-persist": "^4.0.1",
25
30
  "open": "^8.4.2",
26
31
  "png-chunk-text": "^1.0.0",
27
32
  "png-chunks-encode": "^1.0.0",
28
33
  "png-chunks-extract": "^1.0.0",
34
+ "rate-limiter-flexible": "^5.0.0",
29
35
  "response-time": "^2.3.2",
30
36
  "sanitize-filename": "^1.6.3",
31
37
  "sillytavern-transformers": "^2.14.6",
@@ -62,7 +68,7 @@
62
68
  "type": "git",
63
69
  "url": "https://github.com/SillyTavern/SillyTavern.git"
64
70
  },
65
- "version": "1.11.8",
71
+ "version": "1.12.0-preview",
66
72
  "scripts": {
67
73
  "start": "node server.js",
68
74
  "start-multi": "node server.js --disableCsrf",
@@ -79,6 +85,7 @@
79
85
  },
80
86
  "main": "server.js",
81
87
  "devDependencies": {
88
+ "@types/jquery": "^3.5.29",
82
89
  "eslint": "^8.55.0",
83
90
  "jquery": "^3.6.4"
84
91
  }
package/post-install.js CHANGED
@@ -60,7 +60,8 @@ function convertConfig() {
60
60
  try {
61
61
  console.log(color.blue('Converting config.conf to config.yaml. Your old config.conf will be renamed to config.conf.bak'));
62
62
  const config = require(path.join(process.cwd(), './config.conf'));
63
- fs.renameSync('./config.conf', './config.conf.bak');
63
+ fs.copyFileSync('./config.conf', './config.conf.bak');
64
+ fs.rmSync('./config.conf');
64
65
  fs.writeFileSync('./config.yaml', yaml.stringify(config));
65
66
  console.log(color.green('Conversion successful. Please check your config.yaml and fix it if necessary.'));
66
67
  } catch (error) {
@@ -106,7 +107,6 @@ function addMissingConfigValues() {
106
107
  */
107
108
  function createDefaultFiles() {
108
109
  const files = {
109
- settings: './public/settings.json',
110
110
  config: './config.yaml',
111
111
  user: './public/css/user.css',
112
112
  };
@@ -167,29 +167,6 @@ function copyWasmFiles() {
167
167
  }
168
168
  }
169
169
 
170
- /**
171
- * Moves the custom background into settings.json.
172
- */
173
- function migrateBackground() {
174
- if (!fs.existsSync('./public/css/bg_load.css')) return;
175
-
176
- const bgCSS = fs.readFileSync('./public/css/bg_load.css', 'utf-8');
177
- const bgMatch = /url\('([^']*)'\)/.exec(bgCSS);
178
- if (!bgMatch) return;
179
- const bgFilename = bgMatch[1].replace('../backgrounds/', '');
180
-
181
- const settings = fs.readFileSync('./public/settings.json', 'utf-8');
182
- const settingsJSON = JSON.parse(settings);
183
- if (Object.hasOwn(settingsJSON, 'background')) {
184
- console.log(color.yellow('Both bg_load.css and the "background" setting exist. Please delete bg_load.css manually.'));
185
- return;
186
- }
187
-
188
- settingsJSON.background = { name: bgFilename, url: `url('backgrounds/${bgFilename}')` };
189
- fs.writeFileSync('./public/settings.json', JSON.stringify(settingsJSON, null, 4));
190
- fs.rmSync('./public/css/bg_load.css');
191
- }
192
-
193
170
  try {
194
171
  // 0. Convert config.conf to config.yaml
195
172
  convertConfig();
@@ -199,8 +176,6 @@ try {
199
176
  copyWasmFiles();
200
177
  // 3. Add missing config values
201
178
  addMissingConfigValues();
202
- // 4. Migrate bg_load.css to settings.json
203
- migrateBackground();
204
179
  } catch (error) {
205
180
  console.error(error);
206
181
  }
@@ -0,0 +1,5 @@
1
+ .userAccount {
2
+ border: 1px solid var(--SmartThemeBorderColor);
3
+ padding: 5px 10px;
4
+ border-radius: 5px;
5
+ }
@@ -0,0 +1,44 @@
1
+ body.login #shadow_popup {
2
+ opacity: 1;
3
+ display: flex;
4
+ }
5
+
6
+ body.login .logo {
7
+ max-width: 30px;
8
+ }
9
+
10
+ body.login #logoBlock {
11
+ align-items: center;
12
+ margin: 0 auto;
13
+ gap: 10px;
14
+ }
15
+
16
+ body.login .userSelect {
17
+ display: flex;
18
+ flex-direction: column;
19
+ color: var(--SmartThemeBodyColor);
20
+ border: 1px solid var(--SmartThemeBorderColor);
21
+ border-radius: 5px;
22
+ padding: 3px 5px;
23
+ width: 30%;
24
+ cursor: pointer;
25
+ margin: 5px 0;
26
+ transition: background-color 0.15s ease-in-out;
27
+ display: flex;
28
+ align-items: center;
29
+ justify-content: center;
30
+ text-align: center;
31
+ overflow: hidden;
32
+ }
33
+
34
+ body.login .userSelect .userName,
35
+ body.login .userSelect .userHandle {
36
+ width: 100%;
37
+ overflow: hidden;
38
+ text-overflow: ellipsis;
39
+ white-space: nowrap;
40
+ }
41
+
42
+ body.login .userSelect:hover {
43
+ background-color: var(--black30a);
44
+ }
@@ -102,6 +102,14 @@
102
102
  justify-content: space-between;
103
103
  }
104
104
 
105
+ .justifySpaceEvenly {
106
+ justify-content: space-evenly;
107
+ }
108
+
109
+ .justifySpaceAround {
110
+ justify-content: space-around;
111
+ }
112
+
105
113
  .alignitemsflexstart {
106
114
  align-items: flex-start !important;
107
115
  }
@@ -491,6 +499,10 @@ textarea:disabled {
491
499
  font-size: calc(var(--mainFontSize) * 1.2) !important;
492
500
  }
493
501
 
502
+ .fontsize90p {
503
+ font-size: calc(var(--mainFontSize) * 0.9) !important;
504
+ }
505
+
494
506
  .fontsize80p {
495
507
  font-size: calc(var(--mainFontSize) * 0.8) !important;
496
508
  }
Binary file