feat: add updateGUI
This commit is contained in:
@@ -2,7 +2,7 @@ import { getChatVar, risuChatParser, setChatVar, type simpleCharacterArgument }
|
||||
import { LuaEngine, LuaFactory } from "wasmoon";
|
||||
import { DataBase, setDatabase, type Chat, type character, type groupChat } from "../storage/database";
|
||||
import { get } from "svelte/store";
|
||||
import { CurrentCharacter, CurrentChat, selectedCharID } from "../stores";
|
||||
import { CurrentCharacter, CurrentChat, CurrentVariablePointer, ReloadGUIPointer, selectedCharID } from "../stores";
|
||||
import { alertError, alertInput, alertNormal } from "../alert";
|
||||
import { HypaProcesser } from "./memory/hypamemory";
|
||||
import { generateAIImage } from "./stableDiff";
|
||||
@@ -191,6 +191,10 @@ export async function runLua(code:string, arg:{
|
||||
console.log(JSON.parse(value))
|
||||
})
|
||||
|
||||
luaEngine.global.set('updateGUI', () => {
|
||||
ReloadGUIPointer.set(get(ReloadGUIPointer) + 1)
|
||||
})
|
||||
|
||||
//Low Level Access
|
||||
luaEngine.global.set('similarity', async (id:string, source:string, value:string[]) => {
|
||||
if(!LuaLowLevelIds.has(id)){
|
||||
|
||||
@@ -38,6 +38,7 @@ export const CurrentShowMemoryLimit = writable(false) as Writable<boolean>
|
||||
export const ShowVN = writable(false)
|
||||
export const SettingsMenuIndex = writable(-1)
|
||||
export const CurrentVariablePointer = writable({} as {[key:string]: string|number|boolean})
|
||||
export const ReloadGUIPointer = writable(0)
|
||||
export const OpenRealmStore = writable(false)
|
||||
export const ShowRealmFrameStore = writable('')
|
||||
export const PlaygroundStore = writable(0)
|
||||
|
||||
Reference in New Issue
Block a user