Skip to content

refactor(react-ui): rename the prefill-chips welcome API to prompt templates - #836

Merged
ankit-thesys merged 1 commit into
mainfrom
ankit/prompt-templates-rename
Jul 24, 2026
Merged

refactor(react-ui): rename the prefill-chips welcome API to prompt templates#836
ankit-thesys merged 1 commit into
mainfrom
ankit/prompt-templates-rename

Conversation

@ankit-thesys

Copy link
Copy Markdown
Contributor

Follow-up to #831, from the review comment on WelcomeScreen.tsx asking for a better prop name — landing it now because the API merged after react-ui 0.13.0 was published, so the old names have never shipped and the rename is free. After the next release it would be a breaking change.

Rename

Before After Why
prefillChips prop promptTemplates The thing is a fill-in-the-blank prompt stem ("Create a presentation about ___"); template states the incomplete-by-design contract (click ≠ send). "Prefill chips" named the mechanism and the widget shape — and widget shape doesn't belong in an API name.
PrefillChip type PromptTemplate Same.
PrefillChip.starters PromptTemplate.completions Removes the double meaning of "starters": welcome starters send on click; a template's completions append to the draft. They're different behaviors and now have different names.

Kept: internal component (WelcomePrefillChips) and DOM class names (openui-agent-prefill-chip*) — they describe the chip UI itself, which is accurate.

Test Plan

  • tsc clean, build green, 27/27 tests (one SSR fixture updated to the new field), rolled-up types export PromptTemplate
  • Prettier clean on all touched files
  • No occurrences of the old public names remain outside internal component/class naming

🤖 Generated with Claude Code

https://claude.ai/code/session_01XECS4NLhz6BNd1TUYbWjfu

…mplates

prefillChips → promptTemplates, PrefillChip → PromptTemplate, and the
template's nested starters → completions. The thing is a fill-in-the-blank
prompt stem; "template" states the incomplete-by-design contract (click ≠
send) where "prefill chips" named the mechanism and the widget shape. The
completions rename also removes the second meaning of "starters" (welcome
starters send on click; template completions append to the draft).

The API merged after 0.13.0 was published, so nothing has shipped with the
old names — no consumer breaks. Internal component and DOM class names
(WelcomePrefillChips, openui-agent-prefill-chip*) keep describing the chip
UI itself.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XECS4NLhz6BNd1TUYbWjfu
@ankit-thesys
ankit-thesys merged commit 5e6417b into main Jul 24, 2026
2 checks passed
@ankit-thesys
ankit-thesys deleted the ankit/prompt-templates-rename branch July 24, 2026 06:48
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.

2 participants