Merge branch 'staging' into sd-args

53635290685c3dc37f67d724385a72ef613741c9

Cohee <18619528+Cohee1207@users.noreply.github.com>

4 files changed, +27 -7Ignore whitespace
UpdateAndStart.bat+12 -3
@@ -2,17 +2,26 @@
2pushd %~dp02pushd %~dp0
3git --version > nul 2>&13git --version > nul 2>&1
4if %errorlevel% neq 0 (4if %errorlevel% neq 0 (
5 echo Git is not installed on this system. Skipping update.5 echo Git is not installed on this system.
6 echo If you installed with a zip file, you will need to download the new zip and install it manually.6 echo Install it from https://git-scm.com/downloads
7 goto end
7) else (8) else (
9 if not exist .git (
10 echo Not running from a Git repository. Reinstall using an officially supported method to get updates.
11 echo See: https://docs.sillytavern.app/installation/windows/
12 goto end
13 )
8 call git pull --rebase --autostash14 call git pull --rebase --autostash
9 if %errorlevel% neq 0 (15 if %errorlevel% neq 0 (
10 REM incase there is still something wrong16 REM incase there is still something wrong
11 echo There were errors while updating. Please download the latest version manually.17 echo There were errors while updating.
18 echo See the update FAQ at https://docs.sillytavern.app/usage/update/#common-update-problems
19 goto end
12 )20 )
13)21)
14set NODE_ENV=production22set NODE_ENV=production
15call npm install --no-audit --no-fund --loglevel=error --no-progress --omit=dev23call npm install --no-audit --no-fund --loglevel=error --no-progress --omit=dev
16node server.js %*24node server.js %*
25:end
17pause26pause
18popd27popd
UpdateForkAndStart.bat+10 -3
@@ -5,8 +5,14 @@ pushd %~dp0
5echo Checking Git installation5echo Checking Git installation
6git --version > nul 2>&16git --version > nul 2>&1
7if %errorlevel% neq 0 (7if %errorlevel% neq 0 (
8 echo Git is not installed on this system. Skipping update.8 echo Git is not installed on this system.
9 echo If you installed with a zip file, you will need to download the new zip and install it manually.9 echo Install it from https://git-scm.com/downloads
10 goto end
11)
12
13if not exist .git (
14 echo Not running from a Git repository. Reinstall using an officially supported method to get updates.
15 echo See: https://docs.sillytavern.app/installation/windows/
10 goto end16 goto end
11)17)
1218
@@ -89,7 +95,8 @@ git pull --rebase --autostash origin %TARGET_BRANCH%
8995
90:install96:install
91if %errorlevel% neq 0 (97if %errorlevel% neq 0 (
92 echo There were errors while updating. Please check manually.98 echo There were errors while updating.
99 echo See the update FAQ at https://docs.sillytavern.app/usage/update/#common-update-problems
93 goto end100 goto end
94)101)
95102
public/scripts/instruct-mode.js+4 -0
@@ -384,6 +384,10 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata
384 * @returns {string} Formatted instruct mode system prompt.384 * @returns {string} Formatted instruct mode system prompt.
385 */385 */
386export function formatInstructModeSystemPrompt(systemPrompt) {386export function formatInstructModeSystemPrompt(systemPrompt) {
387 if (!systemPrompt) {
388 return '';
389 }
390
387 const separator = power_user.instruct.wrap ? '\n' : '';391 const separator = power_user.instruct.wrap ? '\n' : '';
388392
389 if (power_user.instruct.system_sequence_prefix) {393 if (power_user.instruct.system_sequence_prefix) {
public/scripts/slash-commands.js+1 -1
@@ -3027,7 +3027,7 @@ async function continueChatCallback(args, prompt) {
3027 resolve();3027 resolve();
3028 } catch (error) {3028 } catch (error) {
3029 console.error('Error running /continue command:', error);3029 console.error('Error running /continue command:', error);
3030 reject();3030 reject(error);
3031 }3031 }
3032 });3032 });
30333033