Skip to content

Fresh avatar#3466

Closed
df007df wants to merge 7 commits into
multica-ai:mainfrom
df007df:fresh-avatar
Closed

Fresh avatar#3466
df007df wants to merge 7 commits into
multica-ai:mainfrom
df007df:fresh-avatar

Conversation

@df007df
Copy link
Copy Markdown

@df007df df007df commented May 28, 2026

Deployment type

  • Official App
  • self-host

What do you want and why?

头像上传功能目前只支持上传图片,现需要增加 react-nice-avatar 生成头像的功能,让用户可以自主生成一个头像,而不是只能上传本地图片。

Proposed solution

在现有的 AvatarPicker 和 AvatarEditor 组件中增加 [上传图片] / [生成头像] 切换标签:

  • 上传模式:复用现有的文件上传逻辑
  • 生成模式:使用 react-nice-avatar 生成随机头像,通过 canvas 渲染后上传到服务器,URL 存入 Agent.avatar_url

Changes

  • packages/views/agents/components/avatar-picker.tsx — 创建表单中增加生成模式
  • packages/views/agents/components/agent-detail-inspector.tsx — 详情页编辑增加相同切换
  • packages/views/package.json — 新增 react-nice-avatar、dom-to-image 依赖
  • packages/views/locales/en/agents.json — 新增翻译 key
  • packages/views/locales/zh-Hans/agents.json — 新增翻译 key
  • packages/views/assets.d.ts — 新增资源类型声明

Screenshots / mockups (optional)

image image

df007df and others added 2 commits May 28, 2026 18:51
- Install react-nice-avatar and dom-to-image dependencies
- AvatarPicker: add upload/generate tab switch
- AvatarEditor (detail page): add same switch
- Generate mode: react-nice-avatar → canvas → blob → upload via existing flow
- Display layer unchanged (still uses avatar_url)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

@df007df is attempting to deploy a commit to the IndexLabs Team on Vercel.

A member of the Team first needs to authorize it.

@df007df df007df closed this May 30, 2026
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