Migrate all DataBase to DBState
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import localforage from "localforage";
|
||||
import { selectSingleFile } from "../../util";
|
||||
import { v4 } from "uuid";
|
||||
import { DataBase } from "../../storage/database.svelte";
|
||||
import { get } from "svelte/store";
|
||||
import { getDatabase } from "../../storage/database.svelte";
|
||||
import { checkImageType } from "../../parser";
|
||||
|
||||
const inlayStorage = localforage.createInstance({
|
||||
@@ -85,7 +83,7 @@ export async function getInlayImage(id: string){
|
||||
}
|
||||
|
||||
export function supportsInlayImage(){
|
||||
const db = get(DataBase)
|
||||
const db = getDatabase()
|
||||
return db.aiModel.startsWith('gptv') || db.aiModel === 'gemini-pro-vision' || db.aiModel.startsWith('claude-3') || db.aiModel.startsWith('gpt4_turbo') || db.aiModel.startsWith('gpt5') || db.aiModel.startsWith('gpt4o') ||
|
||||
(db.aiModel === 'reverse_proxy' && (
|
||||
db.proxyRequestModel?.startsWith('gptv') || db.proxyRequestModel === 'gemini-pro-vision' || db.proxyRequestModel?.startsWith('claude-3') || db.proxyRequestModel.startsWith('gpt4_turbo') ||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DataBase, setDatabase } from 'src/ts/storage/database.svelte';
|
||||
import { getDatabase, setDatabase } from 'src/ts/storage/database.svelte';
|
||||
import { selectedCharID } from 'src/ts/stores';
|
||||
import { get } from 'svelte/store';
|
||||
import { doingChat, sendChat } from '..';
|
||||
@@ -19,7 +19,7 @@ async function sendPofile(arg:sendFileArg){
|
||||
let note = ''
|
||||
let speaker = ''
|
||||
let parseMode = 0
|
||||
const db = get(DataBase)
|
||||
const db = getDatabase()
|
||||
let currentChar = db.characters[get(selectedCharID)]
|
||||
let currentChat = currentChar.chats[currentChar.chatPage]
|
||||
const lines = arg.file.split('\n')
|
||||
|
||||
Reference in New Issue
Block a user