Move DBState to stores
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { get } from "svelte/store";
|
||||
import { getCurrentCharacter, getCurrentChat, getDatabase, setCurrentChat, setDatabase } from "../storage/database.svelte";
|
||||
import { selectedCharID } from "../stores";
|
||||
import { selectedCharID } from "../stores.svelte";
|
||||
import { alertInput, alertMd, alertNormal, alertSelect, alertToast } from "../alert";
|
||||
import { sayTTS } from "./tts";
|
||||
import { risuChatParser } from "../parser.svelte";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { getDatabase, setDatabase } from 'src/ts/storage/database.svelte';
|
||||
import { selectedCharID } from 'src/ts/stores';
|
||||
import { selectedCharID } from 'src/ts/stores.svelte';
|
||||
import { get } from 'svelte/store';
|
||||
import { doingChat, sendChat } from '../index.svelte';
|
||||
import { downloadFile, isTauri } from 'src/ts/globalApi';
|
||||
|
||||
@@ -4,7 +4,7 @@ import { alertConfirm, alertError, alertSelectChar } from "../alert";
|
||||
import { language } from "src/lang";
|
||||
import { get } from "svelte/store";
|
||||
import { getDatabase, setDatabase } from "../storage/database.svelte";
|
||||
import { selectedCharID } from "../stores";
|
||||
import { selectedCharID } from "../stores.svelte";
|
||||
|
||||
export async function addGroupChar(){
|
||||
let db = getDatabase()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { get, writable } from "svelte/store";
|
||||
import { type character, type MessageGenerationInfo, type Chat, DBState } from "../storage/database.svelte";
|
||||
import { CharEmotion, selectedCharID } from "../stores";
|
||||
import { type character, type MessageGenerationInfo, type Chat } from "../storage/database.svelte";
|
||||
import { DBState } from '../stores.svelte';
|
||||
import { CharEmotion, selectedCharID } from "../stores.svelte";
|
||||
import { ChatTokenizer, tokenize, tokenizeNum } from "../tokenizer";
|
||||
import { language } from "../../lang";
|
||||
import { alertError } from "../alert";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { get } from "svelte/store";
|
||||
import {selectedCharID} from '../stores'
|
||||
import { DBState, type Message, type loreBook } from "../storage/database.svelte";
|
||||
import {selectedCharID} from '../stores.svelte'
|
||||
import { type Message, type loreBook } from "../storage/database.svelte";
|
||||
import { DBState } from '../stores.svelte';
|
||||
import { tokenize } from "../tokenizer";
|
||||
import { checkNullish, selectSingleFile } from "../util";
|
||||
import { alertError, alertNormal } from "../alert";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { getChatVar, hasher, setChatVar, type simpleCharacterArgument } from "..
|
||||
import { LuaEngine, LuaFactory } from "wasmoon";
|
||||
import { getCurrentCharacter, getCurrentChat, getDatabase, setCurrentChat, setDatabase, type Chat, type character, type groupChat } from "../storage/database.svelte";
|
||||
import { get } from "svelte/store";
|
||||
import { ReloadGUIPointer, selectedCharID } from "../stores";
|
||||
import { ReloadGUIPointer, selectedCharID } from "../stores.svelte";
|
||||
import { alertError, alertInput, alertNormal } from "../alert";
|
||||
import { HypaProcesser } from "./memory/hypamemory";
|
||||
import { generateAIImage } from "./stableDiff";
|
||||
|
||||
@@ -8,7 +8,7 @@ import { convertExternalLorebook } from "./lorebook.svelte"
|
||||
import { decodeRPack, encodeRPack } from "../rpack/rpack_bg"
|
||||
import { convertImage } from "../parser.svelte"
|
||||
import { Capacitor } from "@capacitor/core"
|
||||
import { HideIconStore, moduleBackgroundEmbedding } from "../stores"
|
||||
import { HideIconStore, moduleBackgroundEmbedding } from "../stores.svelte"
|
||||
|
||||
export interface RisuModule{
|
||||
name: string
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { get } from "svelte/store";
|
||||
import { CharEmotion, selectedCharID } from "../stores";
|
||||
import { CharEmotion, selectedCharID } from "../stores.svelte";
|
||||
import { type character, type customscript, type groupChat, type Database, getDatabase } from "../storage/database.svelte";
|
||||
import { downloadFile } from "../globalApi";
|
||||
import { alertError, alertNormal } from "../alert";
|
||||
|
||||
@@ -3,7 +3,7 @@ import { getDatabase, type character } from "../storage/database.svelte"
|
||||
import { requestChatData } from "./request"
|
||||
import { alertError } from "../alert"
|
||||
import { globalFetch, readImage } from "../globalApi"
|
||||
import { CharEmotion } from "../stores"
|
||||
import { CharEmotion } from "../stores.svelte"
|
||||
import type { OpenAIChat } from "./index.svelte"
|
||||
import { processZip } from "./processzip"
|
||||
import { keiServerURL } from "../kei/kei"
|
||||
|
||||
@@ -3,7 +3,7 @@ import { getCurrentCharacter, getCurrentChat, getDatabase, type Chat, type chara
|
||||
import { tokenize } from "../tokenizer";
|
||||
import { getModuleTriggers } from "./modules";
|
||||
import { get } from "svelte/store";
|
||||
import { ReloadGUIPointer, selectedCharID } from "../stores";
|
||||
import { ReloadGUIPointer, selectedCharID } from "../stores.svelte";
|
||||
import { processMultiCommand } from "./command";
|
||||
import { parseKeyValue } from "../util";
|
||||
import { alertError, alertInput, alertNormal, alertSelect } from "../alert";
|
||||
|
||||
Reference in New Issue
Block a user