diff --git a/CHANGELOG.md b/CHANGELOG.md index 67348ce3d1..1c4c7df7ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,12 @@ Notable changes to DeepSeekBot are recorded here. See the ## [Unreleased] -No changes since 1.2.0 yet. +Pixel Avatars can be an elf, dwarf, orc or talking flower with beards, medieval outfits and headwear, and new PersonaBots start from a face seeded across every species. + +### Added + +- Pixel Avatars can be an elf, dwarf, orc or talking flower. Beards always leave the speaking mouth visible. Armor, robe, tunic and cloak outfits are available, and a helmet or hood hides the hair underneath. Flowers have bead eyes, five petal styles and a stem or pot. Choices a species or headwear doesn't show stay saved, with a note, and return when switched back ([#1212](https://github.com/BotHarness/DeepSeekBot/issues/1212), [#1213](https://github.com/BotHarness/DeepSeekBot/issues/1213)). +- A new PersonaBot starts with a random face from every species, part and outfit, based on its name. Existing PersonaBots keep their current face ([#1214](https://github.com/BotHarness/DeepSeekBot/issues/1214)). ## [1.2.0] - 2026-10-08 diff --git a/CHANGELOG.zh.md b/CHANGELOG.zh.md index 97081c1c38..b0df14d313 100644 --- a/CHANGELOG.zh.md +++ b/CHANGELOG.zh.md @@ -5,7 +5,12 @@ ## [Unreleased] -1.2.0 之后暂无变化。 +像素头像新增精灵、矮人、兽人和会说话的花,以及胡子、中世纪服装和头饰;新建的 PersonaBot 会从全部物种中随机生成初始形象。 + +### Added + +- 像素头像新增精灵、矮人、兽人和会说话的花。胡子始终露出说话的嘴,新增盔甲、法袍、束腰外衣和斗篷,戴上头盔或兜帽会遮住下面的头发。花有豆豆眼、五种花瓣样式,以及茎叶或花盆。当前物种或头饰不显示的选择会保留并给出提示,换回后恢复([#1212](https://github.com/BotHarness/DeepSeekBot/issues/1212)、[#1213](https://github.com/BotHarness/DeepSeekBot/issues/1213))。 +- 新建的 PersonaBot 会按名字从全部物种、部件和服装中随机生成初始形象,已有的 PersonaBot 保持原来的样子([#1214](https://github.com/BotHarness/DeepSeekBot/issues/1214))。 ## [1.2.0] - 2026-10-08 diff --git a/docs/assets/pr/1212-medieval-flower-species/README.md b/docs/assets/pr/1212-medieval-flower-species/README.md new file mode 100644 index 0000000000..21dcf63dc6 --- /dev/null +++ b/docs/assets/pr/1212-medieval-flower-species/README.md @@ -0,0 +1,29 @@ +# #1212 #1213 #1214 Medieval species, talking flower and full-domain seed + +Captured on an isolated DSH instance built from this branch with `@botharness/pixel-avatar` 0.4.0. + +## New PersonaBots are seeded across every species (#1214) + +| Typing a name previews its seeded face: "Bramble" is a bearded dwarf | "Basil" and "Nova" were created as flowers; "Tulip" was created by a build without the seed version and keeps its original face | +| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| ![seeded preview](seed-bramble-en-light.webp) | ![created flower](created-basil-en-light.webp) | + +## Dwarf, beard, helmet and armor (#1212) + +| A helmet hides the hair; the bangs choice is kept with a note | Speaking: the braided beard leaves the mouth visible | +| ------------------------------------------------------------- | ---------------------------------------------------- | +| ![helmet hides hair](helmet-hidden-note-en-light.webp) | ![dwarf speaking](dwarf-speaking-en-light.webp) | + +## Talking flower (#1213) + +| Bead eyes, a trumpet bell and a pot; the saved eyes are kept with a note | Speaking as a Window Companion | +| ------------------------------------------------------------------------ | ------------------------------------------------- | +| ![flower editor](flower-hidden-note-en-light.webp) | ![flower speaking](flower-speaking-en-light.webp) | + +## Full flow + +The speech is simulated. A test script drives the companion's own closed, half-open and open mouth layers at text pace; no model reply was involved. + +![full flow](species-flow.gif) + +The same recording as video: [species-flow.mp4](species-flow.mp4) diff --git a/docs/assets/pr/1212-medieval-flower-species/created-basil-en-light.webp b/docs/assets/pr/1212-medieval-flower-species/created-basil-en-light.webp new file mode 100644 index 0000000000..15320a1d25 Binary files /dev/null and b/docs/assets/pr/1212-medieval-flower-species/created-basil-en-light.webp differ diff --git a/docs/assets/pr/1212-medieval-flower-species/dwarf-speaking-en-light.webp b/docs/assets/pr/1212-medieval-flower-species/dwarf-speaking-en-light.webp new file mode 100644 index 0000000000..e935da54d4 Binary files /dev/null and b/docs/assets/pr/1212-medieval-flower-species/dwarf-speaking-en-light.webp differ diff --git a/docs/assets/pr/1212-medieval-flower-species/flower-hidden-note-en-light.webp b/docs/assets/pr/1212-medieval-flower-species/flower-hidden-note-en-light.webp new file mode 100644 index 0000000000..ef5da6e36a Binary files /dev/null and b/docs/assets/pr/1212-medieval-flower-species/flower-hidden-note-en-light.webp differ diff --git a/docs/assets/pr/1212-medieval-flower-species/flower-speaking-en-light.webp b/docs/assets/pr/1212-medieval-flower-species/flower-speaking-en-light.webp new file mode 100644 index 0000000000..78a2229a2c Binary files /dev/null and b/docs/assets/pr/1212-medieval-flower-species/flower-speaking-en-light.webp differ diff --git a/docs/assets/pr/1212-medieval-flower-species/helmet-hidden-note-en-light.webp b/docs/assets/pr/1212-medieval-flower-species/helmet-hidden-note-en-light.webp new file mode 100644 index 0000000000..8391254836 Binary files /dev/null and b/docs/assets/pr/1212-medieval-flower-species/helmet-hidden-note-en-light.webp differ diff --git a/docs/assets/pr/1212-medieval-flower-species/seed-bramble-en-light.webp b/docs/assets/pr/1212-medieval-flower-species/seed-bramble-en-light.webp new file mode 100644 index 0000000000..2eeb368d6d Binary files /dev/null and b/docs/assets/pr/1212-medieval-flower-species/seed-bramble-en-light.webp differ diff --git a/docs/assets/pr/1212-medieval-flower-species/species-flow.gif b/docs/assets/pr/1212-medieval-flower-species/species-flow.gif new file mode 100644 index 0000000000..3fc05ad15e Binary files /dev/null and b/docs/assets/pr/1212-medieval-flower-species/species-flow.gif differ diff --git a/docs/assets/pr/1212-medieval-flower-species/species-flow.mp4 b/docs/assets/pr/1212-medieval-flower-species/species-flow.mp4 new file mode 100644 index 0000000000..e2f34e54a0 Binary files /dev/null and b/docs/assets/pr/1212-medieval-flower-species/species-flow.mp4 differ diff --git a/packages/client/src/client/activity-center-view.tsx b/packages/client/src/client/activity-center-view.tsx index c7e1b4b434..16ee124395 100644 --- a/packages/client/src/client/activity-center-view.tsx +++ b/packages/client/src/client/activity-center-view.tsx @@ -199,6 +199,7 @@ export function ActivityCenterView({ name={bot.displayName} src={bot.avatar} appearance={bot.appearance} + avatarSeed={bot.avatarSeed} size={28} state={bot.state} activity={bot.activity} diff --git a/packages/client/src/client/avatar-appearance-editor.tsx b/packages/client/src/client/avatar-appearance-editor.tsx index e7022e05d1..795d7f9587 100644 --- a/packages/client/src/client/avatar-appearance-editor.tsx +++ b/packages/client/src/client/avatar-appearance-editor.tsx @@ -2,19 +2,22 @@ import { useMemo, useState, type ReactElement } from 'react'; import { AVATAR_COLORS, AVATAR_FAMILIES, + AVATAR_EXTRA_PARTS, AVATAR_HAIR_PARTS, AVATAR_PARTS, + AVATAR_PARTS_V2, AVATAR_PIECE_COLORS, AVATAR_PRESETS, AVATAR_RANGES, AVATAR_SPECIES, AVATAR_SPECIES_SWATCHES, detailedAvatarRecipe, + hiddenAvatarChoices, type IllustratedAvatarRecipe, AVATAR_SWATCHES, withAvatarSpecies, avatarSvg, - seededAvatarRecipe, + seededAvatarFor, type AvatarFamily, type AvatarRecipe, } from '../../../core/src/bots/avatar-appearance.js'; @@ -43,16 +46,19 @@ interface FamilySpec { categories: readonly string[]; presets: readonly AvatarRecipe[]; option(part: string, value: string): Key; - seeded(name: string): AvatarRecipe; + seeded(name: string, seed: 2 | undefined): AvatarRecipe; } const FAMILIES: Record = { illustrated: { parts: { species: AVATAR_SPECIES, - ...AVATAR_PARTS, + ...AVATAR_PARTS_V2, ...AVATAR_HAIR_PARTS, rightSideHair: AVATAR_HAIR_PARTS.sideHair, + beard: ['none', ...AVATAR_EXTRA_PARTS.beard], + petals: AVATAR_EXTRA_PARTS.petals, + flowerBase: AVATAR_EXTRA_PARTS.flowerBase, }, colors: [...AVATAR_COLORS, ...AVATAR_PIECE_COLORS], swatches: { @@ -70,13 +76,16 @@ const FAMILIES: Record = { 'sideHair', 'rightSideHair', 'backHair', + 'petals', + 'flowerBase', ...Object.keys(AVATAR_PARTS).filter((part) => part !== 'backdrop' && part !== 'hair'), + 'beard', 'shape', 'colors', ], option: (part, value) => `profile.avatar.option.${part === 'rightSideHair' ? 'sideHair' : part}.${value}` as Key, - seeded: seededAvatarRecipe, + seeded: seededAvatarFor, }, line: { parts: LINE_PARTS, @@ -98,14 +107,28 @@ const FAMILIES: Record = { type Fields = Record; const DETAIL = new Set([...Object.keys(AVATAR_HAIR_PARTS), ...Object.keys(AVATAR_RANGES)]); -const SPLIT = new Set(['species', 'sideHair', 'rightSideHair', ...AVATAR_PIECE_COLORS]); +const EXTRAS = new Set(Object.keys(AVATAR_EXTRA_PARTS)); +const SPLIT = new Set([ + 'species', + 'sideHair', + 'rightSideHair', + ...AVATAR_PIECE_COLORS, + ...EXTRAS, +]); +const V2_ONLY = (part: string, value: string | number) => + (part === 'outfit' || part === 'accessory') && + !(AVATAR_PARTS[part] as readonly (string | number)[]).includes(value); function withPart(recipe: AvatarRecipe, key: string, value: string | number): AvatarRecipe { if (recipe.family !== 'illustrated') return { ...(recipe as unknown as Fields), [key]: value } as unknown as AvatarRecipe; if (key === 'species') return withAvatarSpecies(recipe, value as IllustratedAvatarRecipe['species'] & string); - if (SPLIT.has(key)) + if (EXTRAS.has(key) && value === 'none') { + const { [key]: _removed, ...rest } = recipe as unknown as Fields; + return rest as unknown as AvatarRecipe; + } + if (SPLIT.has(key) || V2_ONLY(key, value)) return { ...withAvatarSpecies(recipe, recipe.species ?? 'human'), [key]: value, @@ -143,12 +166,36 @@ function shuffled(recipe: AvatarRecipe): AvatarRecipe { const species = pick(AVATAR_SPECIES); const random = withAvatarSpecies(next as unknown as IllustratedAvatarRecipe, species); for (const color of AVATAR_PIECE_COLORS) delete random[color]; + for (const extra of EXTRAS) delete random[extra as keyof typeof random]; + const beard = pick(['none', ...AVATAR_EXTRA_PARTS.beard] as const); return { ...random, sideHair: pick(AVATAR_HAIR_PARTS.sideHair), rightSideHair: pick(AVATAR_HAIR_PARTS.sideHair), skinColor: pick(AVATAR_SPECIES_SWATCHES[species]), - }; + ...(species === 'flower' + ? { + petals: pick(AVATAR_EXTRA_PARTS.petals), + flowerBase: pick(AVATAR_EXTRA_PARTS.flowerBase), + } + : beard === 'none' + ? {} + : { beard }), + } as IllustratedAvatarRecipe; +} + +function categoriesFor(spec: FamilySpec, recipe: AvatarRecipe | undefined): readonly string[] { + if (recipe?.family !== 'illustrated') return spec.categories; + const flower = recipe.species === 'flower'; + return spec.categories.filter((key) => + key === 'petals' || key === 'flowerBase' ? flower : key === 'beard' ? !flower : true, + ); +} + +function hiddenFor(recipe: AvatarRecipe | undefined, category: string): boolean { + if (recipe?.family !== 'illustrated') return false; + const hidden = hiddenAvatarChoices(recipe); + return hidden.includes(category) || (category === 'hair' && hidden.includes('bangs')); } function swatchesFor(spec: FamilySpec, fields: Fields, key: string): readonly string[] { @@ -213,7 +260,7 @@ export function AvatarAppearanceEditor({ const spec = FAMILIES[family]; const seed = bot.displayName || bot.slug; const start = () => { - const saved = bot.appearance?.recipe ?? seededAvatarRecipe(seed); + const saved = bot.appearance?.recipe ?? seededAvatarFor(seed, bot.avatarSeed); setDrafts({ [saved.family]: { ...saved } }); setFamily(saved.family); setCategory(saved.family === 'line' ? 'eyes' : 'hair'); @@ -230,7 +277,7 @@ export function AvatarAppearanceEditor({ current?.[next] ?? (bot.appearance?.recipe.family === next ? bot.appearance.recipe - : FAMILIES[next].seeded(seed)), + : FAMILIES[next].seeded(seed, bot.avatarSeed)), })); }; const save = async () => { @@ -266,6 +313,7 @@ export function AvatarAppearanceEditor({ appearance={ recipe ? { recipe, revision: bot.appearance?.revision ?? '0'.repeat(64) } : undefined } + avatarSeed={bot.avatarSeed} size={160} state={state} activity={bot.activity} @@ -369,7 +417,7 @@ export function AvatarAppearanceEditor({
- {spec.categories.map((key) => ( + {categoriesFor(spec, draft).map((key) => (