Skip to content

feat(agent-settings): support custom image avatars for custom agents#3325

Open
szafranski wants to merge 2 commits into
iOfficeAI:mainfrom
szafranski:feat/custom-agent-image-avatar
Open

feat(agent-settings): support custom image avatars for custom agents#3325
szafranski wants to merge 2 commits into
iOfficeAI:mainfrom
szafranski:feat/custom-agent-image-avatar

Conversation

@szafranski

Copy link
Copy Markdown
Contributor

Summary

  • Custom agents can now use an uploaded image (PNG/JPG/GIF/WebP/SVG, ≤1 MB, stored as a base64 data-URL in the icon field) as their avatar, in addition to emoji. Avatar resolution is centralized in resolveAvatarDisplay/isImageAvatar (utils/model/agentLogo.ts) and all render sites (agent cards, guid hero/pills, cron preset nodes, team selectors) now go through it.
  • The avatar control in InlineAgentEditor is unified into a single click Popover with a hover overlay (pencil icon). The menu offers three actions — Choose emoji, Upload image, and Reset to default (shown only when the avatar differs from the default 🤖). Emoji selection reuses EmojiPicker via a new inline prop so no nested popover is created.

Test plan

  • Settings → Agents → edit a custom agent → hover the avatar: pencil overlay appears; click opens the popover menu.
  • Upload image: pick an image → avatar updates to the image, popover closes; oversized/invalid files are rejected.
  • Choose emoji → inline emoji grid; selecting an emoji updates the avatar and closes the popover; the back button returns to the menu.
  • Reset to default is hidden for the default 🤖 and appears once a custom avatar is set; clicking it restores 🤖.
  • Image avatars render correctly on agent cards, the guid hero/pill bar, cron preset nodes, and team selectors.

@codecov

codecov Bot commented Jun 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.97872% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...pages/settings/AgentSettings/InlineAgentEditor.tsx 81.81% 7 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@szafranski szafranski force-pushed the feat/custom-agent-image-avatar branch from 176db5c to a89a79a Compare June 15, 2026 13:24
@szafranski szafranski force-pushed the feat/custom-agent-image-avatar branch from c142052 to f1b3fbd Compare June 26, 2026 09:02
@szafranski szafranski force-pushed the feat/custom-agent-image-avatar branch 3 times, most recently from 500515a to 8c3920e Compare July 8, 2026 08:13
Custom agents could previously only use an emoji avatar. Add an Arco
Upload control in the inline editor so a user can pick an image file,
inlined as a base64 data-URL into the existing icon field (no
backend/IPC change).

Centralize the emoji-vs-image decision in a single resolveAvatarDisplay
helper (agentLogo.ts) covering data-URLs, builtin avatar keys, asset
URLs/paths and image file extensions, and route every avatar render site
through it so a stored data-URL is never leaked as raw text: the settings
AgentCard/editor preview, guid agent pills, mention dropdown, preset tag,
assistant cards, the hero title, the cron task dialog, and the team
selector. Previously each site duplicated its own detection and several
rendered the avatar as a plain text glyph.
@szafranski szafranski force-pushed the feat/custom-agent-image-avatar branch from 8c3920e to 77b59dd Compare July 11, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant