refactor name and icon get

This commit is contained in:
kwaroran
2024-07-29 23:36:52 +09:00
parent 47c3fab589
commit 9d5b5da351
13 changed files with 73 additions and 45 deletions

View File

@@ -3,7 +3,7 @@ import type { OpenAIChat } from ".."
import { get } from "svelte/store"
import { globalFetch } from "src/ts/storage/globalApi"
import { alertError, alertInput, alertNormal, alertWait } from "src/ts/alert"
import { sleep } from "src/ts/util"
import { getUserName, sleep } from "src/ts/util"
export function stringlizeNAIChat(formated:OpenAIChat[], char:string, continued: boolean){
const db = get(DataBase)
@@ -34,7 +34,7 @@ export function stringlizeNAIChat(formated:OpenAIChat[], char:string, continued:
res += '> '
}
if(db.NAIappendName){
res += db.username + ": "
res += getUserName() + ": "
}
res += form.content
resultString.push(res)