[fix] temp fix for ui freezing
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
<script>
|
||||
|
||||
import { ArrowBigLeftIcon } from "lucide-svelte";
|
||||
import { changeLanguage, language } from "src/lang";
|
||||
import { addDefaultCharacters } from "src/ts/characters";
|
||||
import { addDefaultCharacters } from "src/ts/characters";
|
||||
import { DataBase } from "src/ts/database";
|
||||
import { sleep } from "src/ts/util";
|
||||
|
||||
let step = 0
|
||||
let provider = 0
|
||||
@@ -167,6 +169,8 @@
|
||||
$DataBase.forceReplaceUrl2 = $DataBase.forceReplaceUrl
|
||||
await addDefaultCharacters()
|
||||
$DataBase.didFirstSetup = true
|
||||
await sleep(2000)
|
||||
location.reload()
|
||||
}}>• {language.confirm}</button>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -21,19 +21,17 @@
|
||||
function createScratch(){
|
||||
reseter();
|
||||
const cid = createNewCharacter()
|
||||
selectedCharID.set(cid)
|
||||
selectedCharID.set(-1)
|
||||
}
|
||||
function createGroup(){
|
||||
reseter();
|
||||
const cid = createNewGroup()
|
||||
selectedCharID.set(cid)
|
||||
selectedCharID.set(-1)
|
||||
}
|
||||
async function createImport(){
|
||||
reseter();
|
||||
const cid = await importCharacter()
|
||||
if(cid){
|
||||
selectedCharID.set(cid)
|
||||
}
|
||||
selectedCharID.set(-1)
|
||||
}
|
||||
|
||||
function changeChar(index:number){
|
||||
|
||||
@@ -11,28 +11,6 @@ import { characterFormatUpdate } from "./characters"
|
||||
import { downloadFile, readImage } from "./globalApi"
|
||||
import { cloneDeep } from "lodash"
|
||||
|
||||
type OfficialCardSpec = {
|
||||
spec: 'chara_card_v2'
|
||||
spec_version: '2.0' // May 8th addition
|
||||
data: {
|
||||
name: string
|
||||
description: string
|
||||
personality: string
|
||||
scenario: string
|
||||
first_mes: string
|
||||
mes_example: string
|
||||
creator_notes: string
|
||||
system_prompt: string
|
||||
post_history_instructions: string
|
||||
alternate_greetings: string[]
|
||||
character_book?: CharacterBook
|
||||
tags: string[]
|
||||
creator: string
|
||||
character_version: number
|
||||
extensions: Record<string, any>
|
||||
}
|
||||
}
|
||||
|
||||
type CharacterBook = null
|
||||
|
||||
export async function importCharacter() {
|
||||
|
||||
Reference in New Issue
Block a user