fix store related issues
This commit is contained in:
@@ -140,7 +140,7 @@ async function preInit(){
|
|||||||
CurrentShowMemoryLimit.set(data.showMemoryLimit)
|
CurrentShowMemoryLimit.set(data.showMemoryLimit)
|
||||||
}
|
}
|
||||||
if(!isEqual(data.enabledModules, lastGlobalEnabledModules)){
|
if(!isEqual(data.enabledModules, lastGlobalEnabledModules)){
|
||||||
lastGlobalEnabledModules = data.enabledModules
|
lastGlobalEnabledModules = data.enabledModules || []
|
||||||
onModuleUpdate()
|
onModuleUpdate()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -155,8 +155,8 @@ async function preInit(){
|
|||||||
updateCurrentChat()
|
updateCurrentChat()
|
||||||
let db = get(DataBase)
|
let db = get(DataBase)
|
||||||
let charId = get(selectedCharID)
|
let charId = get(selectedCharID)
|
||||||
if(char.hideChatIcon !== characterHideIcon){
|
if(char?.hideChatIcon !== characterHideIcon){
|
||||||
characterHideIcon = char.hideChatIcon
|
characterHideIcon = char?.hideChatIcon
|
||||||
HideIconStore.set(characterHideIcon || moduleHideIcon)
|
HideIconStore.set(characterHideIcon || moduleHideIcon)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ async function preInit(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!isEqual(lastChatEnabledModules, chat?.modules)){
|
if(!isEqual(lastChatEnabledModules, chat?.modules)){
|
||||||
lastChatEnabledModules = chat?.modules
|
lastChatEnabledModules = chat?.modules || []
|
||||||
onModuleUpdate()
|
onModuleUpdate()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { DataBase, type character, type customscript, type groupChat } from "../
|
|||||||
import { globalFetch, isTauri } from "../storage/globalApi"
|
import { globalFetch, isTauri } from "../storage/globalApi"
|
||||||
import { alertError } from "../alert"
|
import { alertError } from "../alert"
|
||||||
import { requestChatData } from "../process/request"
|
import { requestChatData } from "../process/request"
|
||||||
import { doingChat, OpenAIChat } from "../process"
|
import { doingChat, type OpenAIChat } from "../process"
|
||||||
import { applyMarkdownToNode, parseChatML, type simpleCharacterArgument } from "../parser"
|
import { applyMarkdownToNode, parseChatML, type simpleCharacterArgument } from "../parser"
|
||||||
import { selectedCharID } from "../stores"
|
import { selectedCharID } from "../stores"
|
||||||
import { getModuleRegexScripts } from "../process/modules"
|
import { getModuleRegexScripts } from "../process/modules"
|
||||||
|
|||||||
Reference in New Issue
Block a user