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

@@ -7,7 +7,7 @@
import { CopyIcon, LanguagesIcon, RefreshCcwIcon } from "lucide-svelte";
import { alertConfirm } from "src/ts/alert";
import { language } from "src/lang";
import { replacePlaceholders } from "../../ts/util";
import { getUserName, replacePlaceholders } from "../../ts/util";
import { onDestroy } from 'svelte';
import { processScript } from "src/ts/process/scripts";
import { get } from "svelte/store";
@@ -71,7 +71,7 @@
}
,{
role: 'user',
content: lastMessages.map(b=>(b.role==='char'? currentChar.name : $DataBase.username)+":"+b.data).reduce((a,b)=>a+','+b)
content: lastMessages.map(b=>(b.role==='char'? currentChar.name : getUserName())+":"+b.data).reduce((a,b)=>a+','+b)
}
]