Skip to content

feat(agent): support image avatars alongside emoji avatars#1760

Open
leedalei wants to merge 1 commit into
netease-youdao:mainfrom
leedalei:codex/agent-image-avatar
Open

feat(agent): support image avatars alongside emoji avatars#1760
leedalei wants to merge 1 commit into
netease-youdao:mainfrom
leedalei:codex/agent-image-avatar

Conversation

@leedalei

@leedalei leedalei commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds managed image avatar support for custom agents while preserving the existing emoji-based workflow.

这次改动把 Agent 头像从只能使用 Emoji,升级为同时支持 Emoji 和图片,但尽量不改变用户原有的使用习惯。对轻量场景,用户依然可以快速选一个 Emoji 完成设置;对更强调辨识度和角色感的场景,也可以直接上传图片。这样既提升了 Agent 的个性化表达能力,也增强了侧边栏、列表和设置页中的识别效率,让多 Agent 场景下的区分更直观,整体体验更完整、更自然,也更接近真实产品可长期使用的状态。

What changed

  • add managed avatar file import, validation, and cleanup in the main process
  • support avatar image persistence on agent create, update, and delete flows
  • expose file selection and local preview support through preload and renderer typings
  • introduce reusable avatar rendering and editing components for image + emoji avatars
  • update create/settings/sidebar/agent list UI to display uploaded avatars
  • keep emoji avatars available as a lightweight option alongside image avatars
  • add localized error handling for unsupported types, file size limits, and import failures
  • add tests for avatar storage behavior and related persistence updates

Testing

Verified:

  • npx eslint src/renderer/components/agent/AgentCreateModal.tsx
  • npx tsc --noEmit --project tsconfig.json

Additional coverage added:

  • src/main/agentAvatarStore.test.ts
6f30377bd9c5ff918d01c60cc838210b

@github-actions

Copy link
Copy Markdown

This pull request has been inactive for 30 days. It will be automatically closed in 14 days unless there is new activity.

If you're still working on this, please leave a comment or push new commits to keep it open. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant