fix store related issues

This commit is contained in:
kwaroran
2024-07-10 16:32:09 +09:00
parent bbd86129de
commit c7333ba133
2 changed files with 5 additions and 5 deletions

View File

@@ -140,7 +140,7 @@ async function preInit(){
CurrentShowMemoryLimit.set(data.showMemoryLimit)
}
if(!isEqual(data.enabledModules, lastGlobalEnabledModules)){
lastGlobalEnabledModules = data.enabledModules
lastGlobalEnabledModules = data.enabledModules || []
onModuleUpdate()
return
}
@@ -155,8 +155,8 @@ async function preInit(){
updateCurrentChat()
let db = get(DataBase)
let charId = get(selectedCharID)
if(char.hideChatIcon !== characterHideIcon){
characterHideIcon = char.hideChatIcon
if(char?.hideChatIcon !== characterHideIcon){
characterHideIcon = char?.hideChatIcon
HideIconStore.set(characterHideIcon || moduleHideIcon)
}
@@ -182,7 +182,7 @@ async function preInit(){
}
if(!isEqual(lastChatEnabledModules, chat?.modules)){
lastChatEnabledModules = chat?.modules
lastChatEnabledModules = chat?.modules || []
onModuleUpdate()
return
}

View File

@@ -4,7 +4,7 @@ import { DataBase, type character, type customscript, type groupChat } from "../
import { globalFetch, isTauri } from "../storage/globalApi"
import { alertError } from "../alert"
import { requestChatData } from "../process/request"
import { doingChat, OpenAIChat } from "../process"
import { doingChat, type OpenAIChat } from "../process"
import { applyMarkdownToNode, parseChatML, type simpleCharacterArgument } from "../parser"
import { selectedCharID } from "../stores"
import { getModuleRegexScripts } from "../process/modules"