Merge branch 'staging' into sd-args
| @@ -2,17 +2,26 @@ | ||
| 2 | 2 | pushd %~dp0 |
| 3 | 3 | git --version > nul 2>&1 |
| 4 | 4 | if %errorlevel% neq 0 ( |
| 5 | 5 | echo Git[91mGit is not installed on this system. Skipping update.[0m |
| 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 | 8 | ) else ( |
| 9 | + if not exist .git ( | |
| 10 | + echo [91mNot running from a Git repository. Reinstall using an officially supported method to get updates.[0m | |
| 11 | + echo See: https://docs.sillytavern.app/installation/windows/ | |
| 12 | + goto end | |
| 13 | + ) | |
| 8 | 14 | call git pull --rebase --autostash |
| 9 | 15 | if %errorlevel% neq 0 ( |
| 10 | 16 | REM incase there is still something wrong |
| 11 | 17 | echo There[91mThere were errors while updating. Please download the latest version manually.[0m |
| 18 | + echo See the update FAQ at https://docs.sillytavern.app/usage/update/#common-update-problems | |
| 19 | + goto end | |
| 12 | 20 | ) |
| 13 | 21 | ) |
| 14 | 22 | set NODE_ENV=production |
| 15 | 23 | call npm install --no-audit --no-fund --loglevel=error --no-progress --omit=dev |
| 16 | 24 | node server.js %* |
| 25 | +:end | |
| 17 | 26 | pause |
| 18 | 27 | popd |
| @@ -5,8 +5,14 @@ pushd %~dp0 | ||
| 5 | 5 | echo Checking Git installation |
| 6 | 6 | git --version > nul 2>&1 |
| 7 | 7 | if %errorlevel% neq 0 ( |
| 8 | 8 | echo Git[91mGit is not installed on this system. Skipping update.[0m |
| 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 | + | |
| 13 | +if not exist .git ( | |
| 14 | + echo [91mNot running from a Git repository. Reinstall using an officially supported method to get updates.[0m | |
| 15 | + echo See: https://docs.sillytavern.app/installation/windows/ | |
| 10 | 16 | goto end |
| 11 | 17 | ) |
| 12 | 18 | |
| @@ -89,7 +95,8 @@ git pull --rebase --autostash origin %TARGET_BRANCH% | ||
| 89 | 95 | |
| 90 | 96 | :install |
| 91 | 97 | if %errorlevel% neq 0 ( |
| 92 | 98 | echo There[91mThere were errors while updating. Please check manually.[0m |
| 99 | + echo See the update FAQ at https://docs.sillytavern.app/usage/update/#common-update-problems | |
| 93 | 100 | goto end |
| 94 | 101 | ) |
| 95 | 102 | |
| @@ -384,6 +384,10 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata | ||
| 384 | 384 | * @returns {string} Formatted instruct mode system prompt. |
| 385 | 385 | */ |
| 386 | 386 | export function formatInstructModeSystemPrompt(systemPrompt) { |
| 387 | + if (!systemPrompt) { | |
| 388 | + return ''; | |
| 389 | + } | |
| 390 | + | |
| 387 | 391 | const separator = power_user.instruct.wrap ? '\n' : ''; |
| 388 | 392 | |
| 389 | 393 | if (power_user.instruct.system_sequence_prefix) { |
| @@ -3027,7 +3027,7 @@ async function continueChatCallback(args, prompt) { | ||
| 3027 | 3027 | resolve(); |
| 3028 | 3028 | } catch (error) { |
| 3029 | 3029 | console.error('Error running /continue command:', error); |
| 3030 | 3030 | reject(error); |
| 3031 | 3031 | } |
| 3032 | 3032 | }); |
| 3033 | 3033 | |