Fix trigger updating

This commit is contained in:
kwaroran
2024-09-18 22:51:22 +09:00
parent 32d6c02130
commit 6ad841e931
2 changed files with 36 additions and 20 deletions

View File

@@ -3,7 +3,7 @@ import { DataBase, type Chat, type character } from "../storage/database";
import { tokenize } from "../tokenizer";
import { getModuleTriggers } from "./modules";
import { get } from "svelte/store";
import { CurrentCharacter, CurrentChat, selectedCharID } from "../stores";
import { CurrentCharacter, CurrentChat, ReloadGUIPointer, selectedCharID } from "../stores";
import { processMultiCommand } from "./command";
import { parseKeyValue } from "../util";
import { alertError, alertInput, alertNormal, alertSelect } from "../alert";
@@ -531,6 +531,7 @@ export async function runTrigger(char:character,mode:triggerMode, arg:{
if(varChanged){
const currentChat = get(CurrentChat)
currentChat.scriptstate = chat.scriptstate
ReloadGUIPointer.set(get(ReloadGUIPointer) + 1)
}
return {additonalSysPrompt, chat, tokens:caculatedTokens, stopSending, sendAIprompt}