From f5665f2b7dcbc073989cb68276f494d810a3ffdf Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Sat, 20 May 2023 20:04:26 +0900 Subject: [PATCH 1/7] Update remote connection info in readme.md --- readme.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 1687c59f2..adac7f87f 100644 --- a/readme.md +++ b/readme.md @@ -197,17 +197,27 @@ Now devices which have the IP specified in the file will be able to connect. *Note: `config.conf` also has a `whitelist` array, which you can use in the same way, but this array will be ignored if `whitelist.txt` exists.* -### 2. Connecting to ST from a remote device +### 2. Getting the IP for the ST host machine -After the whitelist has been setup, to connect over wifi you'll need the IP of the ST-hosting device. +After the whitelist has been setup, you'll need the IP of the ST-hosting device. -If the ST-hosting device is on the same wifi network, you will point your remote device's browser to the ST-host's internal wifi IP: +If the ST-hosting device is on the same wifi network, you will use the ST-host's internal wifi IP: * For Windows: windows button > type `cmd.exe` in the search bar > type `ipconfig` in the console, hit Enter > look for `IPv4` listing. If you (or someone else) wants to connect to your hosted ST while not being on the same network, you will need the public IP of your ST-hosting device. -While using the ST-hosting device, access [this page](https://whatismyipaddress.com/) and look for for `IPv4`. This is what you would use to connect from the remote device. +* While using the ST-hosting device, access [this page](https://whatismyipaddress.com/) and look for for `IPv4`. This is what you would use to connect from the remote device. + +### 3. Connect the remote device to the ST host machine. + +Whatever IP you ended up with for your situation, you will put that IP address and port number into the remote device's web browser. + +A typical address for an ST host on the same wifi network would look like: + +`http://192.168.0.5:8000` + +Use http:// NOT https:// ### Opening your ST to all IPs From 4b20abc38910e98d80234e9211bc366305ee094f Mon Sep 17 00:00:00 2001 From: Sanskar Tiwari Date: Sat, 20 May 2023 19:37:01 +0530 Subject: [PATCH 2/7] add batch file to update and start --- UpdateAndStart.bat | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 UpdateAndStart.bat diff --git a/UpdateAndStart.bat b/UpdateAndStart.bat new file mode 100644 index 000000000..261f13c33 --- /dev/null +++ b/UpdateAndStart.bat @@ -0,0 +1,16 @@ +@echo off +pushd %~dp0 +git --version > nul 2>&1 +if %errorlevel% neq 0 ( + echo Git is not installed on this system. Skipping update. +) else ( + call git pull + if %errorlevel% neq 0 ( + REM incase we get merge conflicts or something + echo There were errors while updating. Please download the latest version manually. + ) +) +call npm install +node server.js +pause +popd \ No newline at end of file From 9a537c8a14263913a085df75e8dc4aad3ebe49fd Mon Sep 17 00:00:00 2001 From: Sanskar Tiwari Date: Sat, 20 May 2023 21:07:28 +0530 Subject: [PATCH 3/7] add flags, lf, eof newline --- UpdateAndStart.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UpdateAndStart.bat b/UpdateAndStart.bat index 261f13c33..803a8c951 100644 --- a/UpdateAndStart.bat +++ b/UpdateAndStart.bat @@ -4,7 +4,7 @@ git --version > nul 2>&1 if %errorlevel% neq 0 ( echo Git is not installed on this system. Skipping update. ) else ( - call git pull + call git pull --rebase --autostash if %errorlevel% neq 0 ( REM incase we get merge conflicts or something echo There were errors while updating. Please download the latest version manually. From 46e26dbf443e123b25bc017652dfd5f3caad004e Mon Sep 17 00:00:00 2001 From: Sanskar Tiwari Date: Sat, 20 May 2023 21:08:04 +0530 Subject: [PATCH 4/7] add flags, lf, eof newline --- UpdateAndStart.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UpdateAndStart.bat b/UpdateAndStart.bat index 803a8c951..3f1d3a93c 100644 --- a/UpdateAndStart.bat +++ b/UpdateAndStart.bat @@ -6,11 +6,11 @@ if %errorlevel% neq 0 ( ) else ( call git pull --rebase --autostash if %errorlevel% neq 0 ( - REM incase we get merge conflicts or something + REM incase there is still something wrong echo There were errors while updating. Please download the latest version manually. ) ) call npm install node server.js pause -popd \ No newline at end of file +popd From b4d04dfdaaea1fc3530967ae32318f4bdb64f14a Mon Sep 17 00:00:00 2001 From: Cohee Date: Sat, 20 May 2023 19:00:20 +0300 Subject: [PATCH 5/7] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2dd35f857..e95525363 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,6 +7,8 @@ assignees: '' --- +> **Warning**. Complete **all** the fields below. Otherwise your bug report will be **ignored**! + **Describe the bug** A clear and concise description of what the bug is. From 06d980b0a7c39f903d2fde445c798c7c697d1297 Mon Sep 17 00:00:00 2001 From: Sanskar Tiwari Date: Sat, 20 May 2023 22:14:59 +0530 Subject: [PATCH 6/7] update documents --- .github/ISSUE_TEMPLATE/bug_report.md | 5 ++++- .github/ISSUE_TEMPLATE/feature_request.md | 3 +++ Update-Instructions.txt | 1 + readme.md | 10 +++++----- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index e95525363..572056eca 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: "Create a report to help us improve. PAY ATTENTION: Support requests for extenal programs (reverse proxies, 3rd party servers, other peoples' forks) will be refused!" +about: "Create a report to help us improve. PAY ATTENTION: Support requests for external programs (reverse proxies, 3rd party servers, other peoples' forks) will be refused!" title: "[BUG]" labels: '' assignees: '' @@ -9,6 +9,9 @@ assignees: '' > **Warning**. Complete **all** the fields below. Otherwise your bug report will be **ignored**! +**Have you searched for similar [bugs](https://github.com/Cohee1207/SillyTavern/issues?q=)?** +Yes/No + **Describe the bug** A clear and concise description of what the bug is. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 7e3a2deab..ad2eb1b2b 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -7,6 +7,9 @@ assignees: '' --- +**Have you searched for similar [requests](https://github.com/Cohee1207/SillyTavern/issues?q=)?** +Yes/No + **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] diff --git a/Update-Instructions.txt b/Update-Instructions.txt index 3864006aa..9a110b580 100644 --- a/Update-Instructions.txt +++ b/Update-Instructions.txt @@ -16,6 +16,7 @@ Method 1 - GIT We always recommend users install using 'git'. Here's why: When you have installed via `git clone`, all you have to do to update is type `git pull` in a command line in the ST folder. +You can also try running the 'UpdateAndStart.bat' file, which will almost do the same thing. (Windows only) Alternatively, if the command prompt gives you problems (and you have GitHub Desktop installed), you can use the 'Repository' menu and select 'Pull'. The updates are applied automatically and safely. diff --git a/readme.md b/readme.md index adac7f87f..85cc7f8a1 100644 --- a/readme.md +++ b/readme.md @@ -148,10 +148,10 @@ Easy to follow guide with pretty pictures: Installing via zip download - 1. install [NodeJS](https://nodejs.org/en) (latest LTS version is recommended) - 2. download the zip from this GitHub repo - 3. unzip it into a folder of your choice - 4. run start.bat via double-clicking or in a command line. + 1. Install [NodeJS](https://nodejs.org/en) (latest LTS version is recommended) + 2. Download the zip from this GitHub repo. (Get the `Source code (zip)` from [Releases](https://github.com/Cohee1207/SillyTavern/releases/latest)) + 3. Unzip it into a folder of your choice + 4. Run `Start.bat` via double-clicking or in a command line. 5. Once the server has prepared everything for you, it will open a tab in your browser. ### Linux @@ -221,7 +221,7 @@ Use http:// NOT https:// ### Opening your ST to all IPs -We do not reccomend doing this, but you can open `config.conf` and change `whitelist` to `false`. +We do not recommend doing this, but you can open `config.conf` and change `whitelist` to `false`. You must remove (or rename) `whitelist.txt` in the SillyTavern base install folder, if it exists. From e58360a4b4e960e644fec283c3c1b947a36b9e9f Mon Sep 17 00:00:00 2001 From: Sanskar Tiwari Date: Sun, 21 May 2023 02:03:09 +0530 Subject: [PATCH 7/7] subsitute user and char variable in world info keywords --- public/scripts/world-info.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 1ec51b112..89e16be83 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -506,16 +506,18 @@ function checkWorldInfo(chat) { if (Array.isArray(entry.key) && entry.key.length) { primary: for (let key of entry.key) { - if (key && textToScan.includes(key.trim().toLowerCase())) { + const substituted = substituteParams(key); + if (substituted && textToScan.includes(substituted.trim().toLowerCase())) { if ( entry.selective && Array.isArray(entry.keysecondary) && entry.keysecondary.length ) { secondary: for (let keysecondary of entry.keysecondary) { + const secondarySubstituted = substituteParams(keysecondary); if ( - keysecondary && - textToScan.includes(keysecondary.trim().toLowerCase()) + secondarySubstituted && + textToScan.includes(secondarySubstituted.trim().toLowerCase()) ) { activatedNow.add(entry.uid); break secondary; @@ -685,4 +687,4 @@ $(document).ready(() => { world_info_recursive = !!$(this).prop('checked'); saveSettingsDebounced(); }) -}); \ No newline at end of file +});