Repository navigation
Closed
Description
Add the optional parts around the message box: a toolbar, an add menu, model and mode pickers, a float, a context chip and a note.
Part of #94.
Depends on #102.
Why
Around the message box sit optional controls: add files, pick a model or mode, show what you're replying to. Each app turns on only what it needs, so every part is opt-in and leaving one out leaves no gap.
What
src/ui/prompt-input-toolbar.tsx:PromptInputToolbar: the row that holds the controls.PromptInputAddMenu: add files and other content.PromptInputButton: a toolbar button.PromptInputModelSelectandPromptInputModeSelect: controlled pickers.PromptInputFloat: content floating above the box.PromptInputContext: what the message replies to.PromptInputNote: a one-line note under the box.
stories/chat/prompt-input.stories.tsx: add everything on, model picker open, with a note, and a replying chip.e2e/fixtures.tsx: aprompt-input-toolbarscenario, withe2e/prompt-input-toolbar.spec.ts.src/ui/prompt-input-toolbar.test.tsx; exports insrc/index.ts.
Requirements
- R32: the eight toolbar parts.
- R5–R12: the shared component rules (picker values are controllable).
Constraints
- Extends the prompt-input family added in Add PromptInput #102 (allowed by R9).
- The pickers and the add menu don't import
ui/menu; build them onuseDismissablePopoverand native elements. - The shared rules in Replace the chat components with a stateless Conversation family #94 apply: no new dependency or peer, no optional-peer import, token-only styling, no change to existing modules, additions only to
src/index.tsande2e/fixtures.tsx.
Done when
- Unit tests: the model and mode selects call their change callbacks with the chosen id and reflect a controlled value.
- Browser spec: the pickers and the add menu open, move and choose by keyboard, close on Escape and return focus to their trigger.
- No serious or critical axe violation in the new stories, in light or dark.
bun run check,bun run build,bun run test:e2eandbun run dep-guardpass.
Metadata
Metadata
Assignees
Labels
No labels
Activity