Skip to content

feat(ChatPrompt): add body slot#272

Merged
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-123184b
Jul 10, 2026
Merged

feat(ChatPrompt): add body slot#272
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-123184b

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Syncs upstream nuxt/ui commit 123184bfeat(ChatPrompt): add body slot and focus highlight (#6709).

What (ported)

The body slot replaces the internal textarea — e.g. to render an Editor with mentions — and exposes submit / close / placeholder / disabled / b24ui. submit and close become event-optional (e ?? new Event(...)) so a custom body can call them without a DOM event.

b24ui's ChatPrompt.vue matched the pre-fix textarea structure, so the slot ported cleanly, adapted to b24ui (B24Textarea, the b24ui prop instead of ui; the template wraps B24Textarea as the slot's default content). Ported the 3 upstream body-slot tests + the with body slot render case.

Deferred — color prop + focus highlight

b24ui's chat-prompt.ts theme is a static object using the fork's own air variant set (outline/tinted/filled/plain, --ui-color-design-* tokens) — it has no color variant and does not use upstream's options.theme.colors palette. Upstream's color prop, the theme's function conversion, and the focusHighlight compound variants (ring-${color} / outline-${color} / inverted) are all tied to that absent color system, so they're deferred to a dedicated b24ui ChatPrompt design pass. (Same split as the ChatTool actions port vs its v7-entangled flow.)

Verify (CI=true)

dev:prepare · lint · typecheck · test · build — all green. The with body slot render case wrote 2 new snapshots and updated 0 existing ones — a slot with default content renders the same DOM when unused, so there's no churn. Suite 5485 passed / 6 skipped (+8 body-slot tests across the two projects).

Ledger: cursor advanced to 123184b; previous entry 76d613c reconciled to PR #271.

🤖 Generated with Claude Code


Generated by Claude Code

Port the ChatPrompt body slot: it replaces the internal textarea (e.g.
to render an Editor with mentions) and exposes submit/close/placeholder/
disabled/b24ui. submit and close become event-optional so a custom body
can call them without a DOM event.

The upstream color prop + focus-highlight theme is deferred: b24ui's
chat-prompt theme is a static air-token variant set with no color
variant or options.theme.colors palette to hang the highlight on.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb
@IgorShevchik IgorShevchik merged commit 9a13bc9 into main Jul 10, 2026
1 check passed
@IgorShevchik IgorShevchik deleted the sync/nuxt-123184b branch July 10, 2026 19:34
IgorShevchik added a commit that referenced this pull request Jul 11, 2026
#273)

Record the merged PR (#272) and b24ui merge sha for the final commit of
the sync round, so no ledger entry is left as pending-merge.


Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb

Co-authored-by: Shevchik Igor <noreply@anthropic.com>
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