Compare commits

..

10 Commits
1.8.2 ... 1.8.4

Author SHA1 Message Date
Cohee
e3e2b73b99 Bump package version 2023-07-19 11:53:12 +03:00
RossAscends
2305a536de Merge pull request #738 from BlueprintCoding/patch-2
Update poe-client.js
2023-07-19 14:23:37 +09:00
Blueprint Coding
f339f28b05 Update poe-client.js
Fixed poe by changing Get request to a Post request
2023-07-18 22:33:38 -06:00
Cohee
2befcd8712 Merge pull request #672 from Jaezmien/viewport-fallback
Add viewport fallback to small viewport units.
2023-07-09 20:11:25 +03:00
Jaezmien Naejara
f03df10972 Add viewport fallback to small viewport sizes 2023-07-09 14:02:40 +08:00
Cohee
880472df18 Merge pull request #662 from BlueprintCoding/patch-1
Update silerotts.js - Fixed Caching issue in some browsers
2023-07-07 23:49:34 +03:00
Blueprint Coding
6a3282cbc4 Update silerotts.js - Fixed Caching issue in some browsers
Added this line to disable caching of file so new files are always played instead of browser cached versions.
2023-07-07 13:44:01 -06:00
Cohee
243e89091a Bump package version 2023-07-07 12:26:49 +03:00
Cohee
f985b7eeb9 Merge pull request #649 from vbdev537/main
Temporary Poe Fix
2023-07-07 09:41:24 +03:00
Cohee
b6ac73631f #640 Fix group candidates filtering 2023-07-06 12:36:16 +03:00
6 changed files with 61 additions and 8 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "sillytavern", "name": "sillytavern",
"version": "1.8.2", "version": "1.8.4",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "sillytavern", "name": "sillytavern",
"version": "1.8.2", "version": "1.8.4",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"dependencies": { "dependencies": {
"@dqbd/tiktoken": "^1.0.2", "@dqbd/tiktoken": "^1.0.2",

View File

@@ -49,7 +49,7 @@
"type": "git", "type": "git",
"url": "https://github.com/SillyTavern/SillyTavern.git" "url": "https://github.com/SillyTavern/SillyTavern.git"
}, },
"version": "1.8.2", "version": "1.8.4",
"scripts": { "scripts": {
"start": "node server.js", "start": "node server.js",
"pkg": "pkg --compress Gzip --no-bytecode --public ." "pkg": "pkg --compress Gzip --no-bytecode --public ."

View File

@@ -109,7 +109,8 @@ class SileroTtsProvider {
{ {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json',
'Cache-Control': 'no-cache' // Added this line to disable caching of file so new files are always played - Rolyat 7/7/23
}, },
body: JSON.stringify({ body: JSON.stringify({
"text": inputText, "text": inputText,

View File

@@ -1234,7 +1234,7 @@ function filterGroupMembers() {
$("#rm_group_add_members .group_member").removeClass('hiddenBySearch'); $("#rm_group_add_members .group_member").removeClass('hiddenBySearch');
} else { } else {
$("#rm_group_add_members .group_member").each(function () { $("#rm_group_add_members .group_member").each(function () {
const isValidSearch = $(this).children(".ch_name").text().toLowerCase().includes(searchValue); const isValidSearch = $(this).find(".ch_name").text().toLowerCase().includes(searchValue);
$(this).toggleClass('hiddenBySearch', !isValidSearch); $(this).toggleClass('hiddenBySearch', !isValidSearch);
}); });
} }

View File

@@ -85,6 +85,7 @@ body {
padding: 0; padding: 0;
width: 100%; width: 100%;
/*fallback for JS load*/ /*fallback for JS load*/
height: 100vh;
height: 100svh; height: 100svh;
/*defaults as 100%, then reassigned via JS as pixels, will work on PC and Android*/ /*defaults as 100%, then reassigned via JS as pixels, will work on PC and Android*/
height: calc(var(--doc-height) - 1px); height: calc(var(--doc-height) - 1px);
@@ -352,10 +353,12 @@ hr {
#sheld { #sheld {
display: grid; display: grid;
grid-template-rows: auto min-content; grid-template-rows: auto min-content;
height: calc(100vh - 42px);
height: calc(100svh - 42px); height: calc(100svh - 42px);
overflow-x: hidden; overflow-x: hidden;
max-width: 800px; max-width: 800px;
position: absolute; position: absolute;
left: calc((100vw - var(--sheldWidth))/2);
left: calc((100svw - var(--sheldWidth))/2); left: calc((100svw - var(--sheldWidth))/2);
top: 41px; top: 41px;
margin: 0 auto; margin: 0 auto;
@@ -891,6 +894,7 @@ select {
#send_textarea { #send_textarea {
min-height: 40px; min-height: 40px;
max-height: 50vh;
max-height: 50svh; max-height: 50svh;
word-wrap: break-word; word-wrap: break-word;
height: 40px; height: 40px;
@@ -1453,6 +1457,7 @@ body.big-avatars .ch_description {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
width: calc(var(--sheldWidth) - 10px); width: calc(var(--sheldWidth) - 10px);
max-width: 100vw;
max-width: 100svw; max-width: 100svw;
justify-content: center; justify-content: center;
} }
@@ -1760,6 +1765,7 @@ grammarly-extension {
#dialogue_popup { #dialogue_popup {
width: 500px; width: 500px;
max-width: 90vw;
max-width: 90svw; max-width: 90svw;
position: absolute; position: absolute;
z-index: 9999; z-index: 9999;
@@ -1775,6 +1781,7 @@ grammarly-extension {
padding: 4px; padding: 4px;
background-color: var(--black30a); background-color: var(--black30a);
border-radius: 10px; border-radius: 10px;
max-height: 90vh;
max-height: 90svh; max-height: 90svh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -1782,11 +1789,14 @@ grammarly-extension {
} }
.large_dialogue_popup { .large_dialogue_popup {
height: 90vh !important;
height: 90svh !important; height: 90svh !important;
max-width: 90vw !important;
max-width: 90svw !important; max-width: 90svw !important;
} }
.wide_dialogue_popup { .wide_dialogue_popup {
max-width: 90vh !important;
max-width: 90svh !important; max-width: 90svh !important;
width: fit-content !important; width: fit-content !important;
} }
@@ -1903,6 +1913,7 @@ grammarly-extension {
opacity: 0.0; opacity: 0.0;
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100vh;
height: 100svh; height: 100svh;
z-index: 9999; z-index: 9999;
top: 0; top: 0;
@@ -1910,7 +1921,9 @@ grammarly-extension {
#bgtest { #bgtest {
display: none; display: none;
width: 100vw;
width: 100svw; width: 100svw;
height: 100vh;
height: 100svh; height: 100svh;
position: absolute; position: absolute;
z-index: -100; z-index: -100;
@@ -2436,6 +2449,7 @@ input[type="range"]::-webkit-slider-thumb {
opacity: 0.0; opacity: 0.0;
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100vh;
height: 100svh; height: 100svh;
z-index: 2055; z-index: 2055;
background-color: var(--black70a); background-color: var(--black70a);
@@ -2578,6 +2592,7 @@ input[type="range"]::-webkit-slider-thumb {
opacity: 1.0; opacity: 1.0;
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100vh;
height: 100svh; height: 100svh;
z-index: 2058; z-index: 2058;
} }
@@ -2590,8 +2605,11 @@ input[type="range"]::-webkit-slider-thumb {
min-width: 100px; min-width: 100px;
max-width: var(--sheldWidth); max-width: var(--sheldWidth);
height: calc(100vh - 84px);
height: calc(100svh - 84px); height: calc(100svh - 84px);
min-height: calc(100vh - 84px);
min-height: calc(100svh - 84px); min-height: calc(100svh - 84px);
max-height: calc(100vh - 84px);
max-height: calc(100svh - 84px); max-height: calc(100svh - 84px);
position: absolute; position: absolute;
z-index: 3002; z-index: 3002;
@@ -2670,6 +2688,7 @@ h5 {
opacity: 1.0; opacity: 1.0;
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100vh;
height: 100svh; height: 100svh;
z-index: 3001; z-index: 3001;
top: 0; top: 0;
@@ -2683,6 +2702,7 @@ h5 {
grid-template-rows: auto auto; grid-template-rows: auto auto;
max-width: var(--sheldWidth); max-width: var(--sheldWidth);
height: min-content; height: min-content;
max-height: calc(100vh - 40px);
max-height: calc(100svh - 40px); max-height: calc(100svh - 40px);
min-height: 100px; min-height: 100px;
position: absolute; position: absolute;
@@ -3552,11 +3572,14 @@ a {
display: block; display: block;
overflow-wrap: break-word; overflow-wrap: break-word;
white-space: normal; white-space: normal;
max-width: calc(((100vw - 500px) / 2) - 10px);
max-width: calc(((100svw - 500px) / 2) - 10px); max-width: calc(((100svw - 500px) / 2) - 10px);
position: absolute; position: absolute;
z-index: 9999; z-index: 9999;
max-height: 90vh;
max-height: 90svh; max-height: 90svh;
/*unsure why, but this prevents scrollbars*/ /*unsure why, but this prevents scrollbars*/
height: 49vh;
height: 49svh; height: 49svh;
padding: 5px; padding: 5px;
@@ -3591,8 +3614,11 @@ a {
/* ############################################################# */ /* ############################################################# */
#right-nav-panel { #right-nav-panel {
width: calc((100vw - var(--sheldWidth) - 2px) /2);
width: calc((100svw - var(--sheldWidth) - 2px) /2); width: calc((100svw - var(--sheldWidth) - 2px) /2);
max-height: calc(100vh - 42px);
max-height: calc(100svh - 42px); max-height: calc(100svh - 42px);
height: calc(100vh - 42px);
height: calc(100svh - 42px); height: calc(100svh - 42px);
position: fixed; position: fixed;
top: 0; top: 0;
@@ -3652,6 +3678,7 @@ a {
.mes_img { .mes_img {
border-radius: 10px; border-radius: 10px;
max-width: 100%; max-width: 100%;
max-height: 40vh;
max-height: 40svh; max-height: 40svh;
image-rendering: -webkit-optimize-contrast; image-rendering: -webkit-optimize-contrast;
} }
@@ -3914,6 +3941,7 @@ label[for="extensions_autoconnect"] {
min-width: 450px; min-width: 450px;
width: var(--sheldWidth); width: var(--sheldWidth);
overflow-y: auto; overflow-y: auto;
max-height: calc(100vh - 70px);
max-height: calc(100svh - 70px); max-height: calc(100svh - 70px);
display: none; display: none;
position: absolute; position: absolute;
@@ -3937,8 +3965,11 @@ label[for="extensions_autoconnect"] {
} }
.fillLeft { .fillLeft {
width: calc((100vw - var(--sheldWidth) - 2px) /2);
width: calc((100svw - var(--sheldWidth) - 2px) /2); width: calc((100svw - var(--sheldWidth) - 2px) /2);
height: calc(100vh - 42px);
height: calc(100svh - 42px); height: calc(100svh - 42px);
max-height: calc(100vh - 42px);
max-height: calc(100svh - 42px); max-height: calc(100svh - 42px);
position: fixed; position: fixed;
top: 0; top: 0;
@@ -4357,6 +4388,7 @@ body.waifuMode #top-bar {
} }
body.waifuMode #sheld { body.waifuMode #sheld {
height: 40vh;
height: 40svh; height: 40svh;
top: calc(100% - 40vh); top: calc(100% - 40vh);
bottom: 0; bottom: 0;
@@ -4540,7 +4572,9 @@ body.waifuMode .zoomed_avatar {
top: 50px; top: 50px;
aspect-ratio: 2 / 3; aspect-ratio: 2 / 3;
width: fit-content; width: fit-content;
max-height: calc(60vh - 60px);
max-height: calc(60svh - 60px); max-height: calc(60svh - 60px);
max-width: 90vw;
max-width: 90svw; max-width: 90svw;
} }
@@ -4591,6 +4625,7 @@ body.waifuMode .zoomed_avatar {
.drawer-content { .drawer-content {
min-width: unset; min-width: unset;
width: 100%; width: 100%;
max-height: calc(100vh - 45px);
max-height: calc(100svh - 45px); max-height: calc(100svh - 45px);
position: fixed; position: fixed;
left: 0; left: 0;
@@ -4608,12 +4643,15 @@ body.waifuMode .zoomed_avatar {
#top-bar { #top-bar {
position: fixed; position: fixed;
padding-top: 8px; padding-top: 8px;
width: 100vw;
width: 100svw; width: 100svw;
} }
#bg1, #bg1,
#bg_custom { #bg_custom {
height: 100vh !important;
height: 100svh !important; height: 100svh !important;
width: 100vw !important;
width: 100svw !important; width: 100svw !important;
background-position: center; background-position: center;
@@ -4627,6 +4665,7 @@ body.waifuMode .zoomed_avatar {
/* , /* ,
#world_popup */ #world_popup */
{ {
max-height: calc(100vh - 40px);
max-height: calc(100svh - 40px); max-height: calc(100svh - 40px);
width: 100% !important; width: 100% !important;
margin: 0 auto; margin: 0 auto;
@@ -4685,6 +4724,7 @@ body.waifuMode .zoomed_avatar {
#right-nav-panel, #right-nav-panel,
#left-nav-panel, #left-nav-panel,
#floatingPrompt { #floatingPrompt {
height: calc(100vh - 45px);
height: calc(100svh - 45px); height: calc(100svh - 45px);
min-width: 100% !important; min-width: 100% !important;
width: 100% !important; width: 100% !important;
@@ -4748,7 +4788,9 @@ body.waifuMode .zoomed_avatar {
} }
body.waifuMode #sheld { body.waifuMode #sheld {
height: 40vh;
height: 40svh; height: 40svh;
top: 60vh;
top: 60svh; top: 60svh;
bottom: 0 !important; bottom: 0 !important;
} }
@@ -4775,13 +4817,16 @@ body.waifuMode .zoomed_avatar {
body.waifuMode .zoomed_avatar { body.waifuMode .zoomed_avatar {
width: fit-content; width: fit-content;
max-height: calc(60vh - 60px);
max-height: calc(60svh - 60px); max-height: calc(60svh - 60px);
max-width: 90vw;
max-width: 90svw; max-width: 90svw;
} }
.scrollableInner { .scrollableInner {
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
max-height: calc(100vh - 90px);
max-height: calc(100svh - 90px); max-height: calc(100svh - 90px);
} }
@@ -4807,7 +4852,9 @@ body.waifuMode .zoomed_avatar {
body:not(.waifuMode) .zoomed_avatar { body:not(.waifuMode) .zoomed_avatar {
width: fit-content; width: fit-content;
max-height: calc(60vh - 60px);
max-height: calc(60svh - 60px); max-height: calc(60svh - 60px);
max-width: 90vw;
max-width: 90svw; max-width: 90svw;
} }
} }
@@ -4872,7 +4919,9 @@ body.waifuMode .zoomed_avatar {
max-width: unset; max-width: unset;
min-height: unset; min-height: unset;
max-height: unset; max-height: unset;
width: 100vw;
width: 100svw; width: 100svw;
height: calc(100vh - 40px);
height: calc(100svh - 40px); height: calc(100svh - 40px);
padding-right: max(env(safe-area-inset-right), 0px); padding-right: max(env(safe-area-inset-right), 0px);
padding-left: max(env(safe-area-inset-left), 0px); padding-left: max(env(safe-area-inset-left), 0px);
@@ -4902,8 +4951,10 @@ body.waifuMode .zoomed_avatar {
right: 0; right: 0;
top: 0; top: 0;
margin: 0 auto; margin: 0 auto;
height: calc(100vh - 70px);
height: calc(100svh - 70px); height: calc(100svh - 70px);
width: calc(100% - 5px); width: calc(100% - 5px);
max-height: calc(100vh - 70px);
max-height: calc(100svh - 70px); max-height: calc(100svh - 70px);
max-width: calc(100% - 5px); max-width: calc(100% - 5px);
@@ -5058,4 +5109,4 @@ body.waifuMode .zoomed_avatar {
background-color: var(--SmartThemeBlurTintColor); background-color: var(--SmartThemeBlurTintColor);
text-align: center; text-align: center;
line-height: 14px; line-height: 14px;
} }

View File

@@ -312,7 +312,7 @@ function logObjectStructure(obj, indent = 0, depth = Infinity) {
class Client { class Client {
gql_url = "https://poe.com/api/gql_POST"; gql_url = "https://poe.com/api/gql_POST";
gql_recv_url = "https://poe.com/api/receive_POST"; gql_recv_url = "https://poe.com/api/receive_POST";
home_url = "https://poe.com"; home_url = "https://poe.com/Sage";
settings_url = "https://poe.com/api/settings"; settings_url = "https://poe.com/api/settings";
formkey = ""; formkey = "";
@@ -381,6 +381,7 @@ class Client {
await this.connect_ws(); await this.connect_ws();
console.log('Client initialized.'); console.log('Client initialized.');
} }
get_device_id() { get_device_id() {
const user_id = this.viewer["poeUser"]["id"]; const user_id = this.viewer["poeUser"]["id"];
@@ -397,7 +398,7 @@ class Client {
const botNameKeyName = 'chatOfBotHandle' const botNameKeyName = 'chatOfBotHandle'
const defaultBotKeyName = 'defaultBotNickname' const defaultBotKeyName = 'defaultBotNickname'
const r = await request_with_retries(() => this.session.get(this.home_url)); const r = await request_with_retries(() => this.session.post(this.home_url));
const jsonRegex = /<script id="__NEXT_DATA__" type="application\/json">(.+?)<\/script>/; const jsonRegex = /<script id="__NEXT_DATA__" type="application\/json">(.+?)<\/script>/;
const jsonText = jsonRegex.exec(r.data)[1]; const jsonText = jsonRegex.exec(r.data)[1];
const nextData = JSON.parse(jsonText); const nextData = JSON.parse(jsonText);