Migrate to svelte 5

This commit is contained in:
kwaroran
2024-10-23 02:31:37 +09:00
parent e434c7ab96
commit c7330719ad
120 changed files with 2398 additions and 2033 deletions

View File

@@ -1,13 +1,12 @@
import type { Tiktoken } from "@dqbd/tiktoken";
import type { Tokenizer } from "@mlc-ai/web-tokenizers";
import { DataBase, type groupChat, type character, type Chat } from "./storage/database";
import { DataBase, type groupChat, type character, type Chat, getCurrentCharacter } from "./storage/database";
import { get } from "svelte/store";
import type { MultiModal, OpenAIChat } from "./process";
import { supportsInlayImage } from "./process/files/image";
import { risuChatParser } from "./parser";
import { tokenizeGGUFModel } from "./process/models/local";
import { globalFetch } from "./storage/globalApi";
import { CurrentCharacter } from "./stores";
export const tokenizerList = [
@@ -353,7 +352,7 @@ export async function getCharToken(char?:character|groupChat|null){
let dynamic = 0
if(!char){
const c = get(CurrentCharacter)
const c = getCurrentCharacter()
char = c
}
if(char.type === 'group'){