mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-27 11:24:43 +00:00
feat(agent): use inlined base64 data URIs for preset avatars
This commit is contained in:
@@ -8,7 +8,11 @@ export async function getAvatarUrl(
|
||||
imageKeyOrUrl: string | null | undefined,
|
||||
): Promise<string | undefined> {
|
||||
if (!imageKeyOrUrl) return undefined
|
||||
if (imageKeyOrUrl.startsWith('http://') || imageKeyOrUrl.startsWith('https://')) {
|
||||
if (
|
||||
imageKeyOrUrl.startsWith('data:') ||
|
||||
imageKeyOrUrl.startsWith('http://') ||
|
||||
imageKeyOrUrl.startsWith('https://')
|
||||
) {
|
||||
return imageKeyOrUrl
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user