chore: Add goCharacterOnImport setting to AccessibilitySettings

This commit is contained in:
kwaroran
2024-05-31 09:51:01 +09:00
parent f24989c901
commit dd12e6f0fd
5 changed files with 14 additions and 2 deletions

View File

@@ -1147,6 +1147,12 @@ export async function downloadRisuHub(id:string) {
data: res.body
})
checkCharOrder()
let db = get(DataBase)
if(db.characters[db.characters.length-1] && db.goCharacterOnImport){
const index = db.characters.length-1
characterFormatUpdate(index);
selectedCharID.set(index);
}
return
}
@@ -1157,7 +1163,7 @@ export async function downloadRisuHub(id:string) {
await importCharacterCardSpec(data, await getHubResources(img), 'hub')
checkCharOrder()
let db = get(DataBase)
if(db.characters[db.characters.length-1]){
if(db.characters[db.characters.length-1] && db.goCharacterOnImport){
const index = db.characters.length-1
characterFormatUpdate(index);
selectedCharID.set(index);

View File

@@ -668,6 +668,7 @@ export interface Database{
hypaAllocatedTokens:number
hypaChunkSize:number
cohereAPIKey:string
goCharacterOnImport:boolean
}
export interface customscript{