Files
goclaw/ui/desktop
Mai Tan Loi 517cf1e469 fix(onboarding): keep the chosen agent identity when the prompt is edited
Editing the description in onboarding step 3 deselected the preset, and the
display name, agent key and emoji were derived from that selection. Losing it
dropped them to a hardcoded "Fox Spirit" / "fox-spirit" / fox emoji, so picking
the Writer preset and rewriting its prompt created an agent named Fox Spirit.
The step also offered no way to name the agent at all.

Identity is now editable state that a preset only prefills:

- Add display name, emoji and agent key inputs to both onboarding steps, with
  the key auto-derived from the name until it is edited by hand.
- Editing the prompt only clears the preset highlight; the identity stays.
- Block submit on an empty name or an invalid slug instead of falling back.
- Give the web presets stable English agent keys, so the slug no longer depends
  on the UI locale, and strip the emoji prefix off the preset label before it
  becomes a display name.
- While a preset is active and its field is untouched, the name and prompt still
  follow a locale switch.

Reuses the existing agents:create.* keys, present in en/vi/zh on both surfaces.
2026-08-30 16:54:25 +07:00
..