Merge branch 'staging' into sd-args

This commit is contained in:
Cohee 2024-10-01 14:16:01 +03:00
commit 5363529068
4 changed files with 27 additions and 7 deletions

View File

@ -2,17 +2,26 @@
pushd %~dp0 pushd %~dp0
git --version > nul 2>&1 git --version > nul 2>&1
if %errorlevel% neq 0 ( if %errorlevel% neq 0 (
echo Git is not installed on this system. Skipping update. echo Git is not installed on this system.
echo If you installed with a zip file, you will need to download the new zip and install it manually. echo Install it from https://git-scm.com/downloads
goto end
) else ( ) else (
if not exist .git (
echo Not running from a Git repository. Reinstall using an officially supported method to get updates.
echo See: https://docs.sillytavern.app/installation/windows/
goto end
)
call git pull --rebase --autostash call git pull --rebase --autostash
if %errorlevel% neq 0 ( if %errorlevel% neq 0 (
REM incase there is still something wrong REM incase there is still something wrong
echo There were errors while updating. Please download the latest version manually. echo There were errors while updating.
echo See the update FAQ at https://docs.sillytavern.app/usage/update/#common-update-problems
goto end
) )
) )
set NODE_ENV=production set NODE_ENV=production
call npm install --no-audit --no-fund --loglevel=error --no-progress --omit=dev call npm install --no-audit --no-fund --loglevel=error --no-progress --omit=dev
node server.js %* node server.js %*
:end
pause pause
popd popd

View File

@ -5,8 +5,14 @@ pushd %~dp0
echo Checking Git installation echo Checking Git installation
git --version > nul 2>&1 git --version > nul 2>&1
if %errorlevel% neq 0 ( if %errorlevel% neq 0 (
echo Git is not installed on this system. Skipping update. echo Git is not installed on this system.
echo If you installed with a zip file, you will need to download the new zip and install it manually. echo Install it from https://git-scm.com/downloads
goto end
)
if not exist .git (
echo Not running from a Git repository. Reinstall using an officially supported method to get updates.
echo See: https://docs.sillytavern.app/installation/windows/
goto end goto end
) )
@ -89,7 +95,8 @@ git pull --rebase --autostash origin %TARGET_BRANCH%
:install :install
if %errorlevel% neq 0 ( if %errorlevel% neq 0 (
echo There were errors while updating. Please check manually. echo There were errors while updating.
echo See the update FAQ at https://docs.sillytavern.app/usage/update/#common-update-problems
goto end goto end
) )

View File

@ -384,6 +384,10 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata
* @returns {string} Formatted instruct mode system prompt. * @returns {string} Formatted instruct mode system prompt.
*/ */
export function formatInstructModeSystemPrompt(systemPrompt) { export function formatInstructModeSystemPrompt(systemPrompt) {
if (!systemPrompt) {
return '';
}
const separator = power_user.instruct.wrap ? '\n' : ''; const separator = power_user.instruct.wrap ? '\n' : '';
if (power_user.instruct.system_sequence_prefix) { if (power_user.instruct.system_sequence_prefix) {

View File

@ -3027,7 +3027,7 @@ async function continueChatCallback(args, prompt) {
resolve(); resolve();
} catch (error) { } catch (error) {
console.error('Error running /continue command:', error); console.error('Error running /continue command:', error);
reject(); reject(error);
} }
}); });