fix(ui): allow relative URLs in avatar validation

The isAvatarUrl check only accepted http://, https://, or data: URLs,
but the /avatar/{agentId} endpoint returns relative paths like /avatar/main.
This caused local file avatars to display as text instead of images.

Fixes avatar display for locally configured avatar files.
This commit is contained in:
Dave Lauer
2026-01-22 12:09:27 -05:00
parent 80c1edc3ff
commit 9d09a7879c

View File

@@ -158,7 +158,8 @@ function renderAvatar(
function isAvatarUrl(value: string): boolean {
return (
/^https?:\/\//i.test(value) ||
/^data:image\//i.test(value)
/^data:image\//i.test(value) ||
/^\//.test(value) // Relative paths from avatar endpoint
);
}