Skip to content

feat(chat): optional attachIcon and sendIcon on ChatInput - #59

Closed
TheGreatAxios wants to merge 8 commits into
mainfrom
feat/chat-input-icon-slots
Closed

TheGreatAxios wants to merge 8 commits into
mainfrom
feat/chat-input-icon-slots

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

Add optional attachIcon and sendIcon (ReactNode) props on ChatInput. Omitted, they keep the current Paperclip and ArrowUp glyphs. The stop control is unchanged.

Verification

  • bun test src/ui/chat-input.test.tsx
  • bun run typecheck
  • bun run lint
  • bun run dep-guard
  • bun run build

A small set of mutually exclusive choices as joined segments — theme,
protocol, density. role=group with aria-pressed toggles rather than a
radiogroup because the choice takes effect immediately. Stateless: the
host owns the value since it usually outlives the component.
Artifact-style strips outgrow their pane; wrapping pushes content down.
The scrollable tablist fades whichever edge still hides tabs, driven by
scroll position and a ResizeObserver on the pane itself. icon carries
the thing's kind, marker a trailing state (live dot, dirty flag).
…ntalStepper

A queue that is either empty or not makes the count noise; marker=dot
keeps 'something is waiting' without it. The segments stepper is the
whisper track — hairline segments, current stretched in accent — for
dense chrome where the step name is carried by the surface beneath.
onSendHold fires on a >=450ms press instead of sending — the heavier
alternative (send back, send-and-…) that shares the button because it is
a send, not a separate action. The click ending a hold is swallowed so
it never sends on release, and a leaked hold cannot eat a later send.
Named Root/Header/Body/Textarea/Footer/Tools/Submit/Button/Attach
slots compose a Vercel-style prompt. The all-in-one ChatInput still
works; leadingTools and trailingTools land extra footer controls.
Keep ChatInput onSendHold with attachIcon/sendIcon and leading/trailing tools.
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