vercel / vercel/ai-elements

Multiple bugs in attachments.tsx and prompt-input.tsx

Open
#446 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.4k
Forks
283
Avg merge
32m
Merged PRs (30d)
1

Description

Hi,

after a fresh install of shadcn (base) and a subsequent shadcn add ... of some ai-elements components, I've found some bugs:

attachments.tsx

  • the AttachmentHoverCard component is broken, openDelay and closeDelay are not defined, and closeDelay does not exist on AttachmentHoverCard

prompt-input.tsx

  • the PromptInputActionAddAttachments component is broken as DropdownMenuItem does not have a onSelect property
  • same is true for the PromptInputActionAddScreenshot, additionally onSelect has wrong typings
  • PromptInputHoverCard is broken in the same way as AttachmentHoverCard from attachments.tsx

conversation.tsx, model-selector.tsx and message.tsx seem to be fine, though.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading attachments.tsx and prompt-input.tsx, focusing on AttachmentHoverCard, PromptInputHoverCard, PromptInputActionAddAttachments, and PromptInputActionAddScreenshot. Check the DropdownMenuItem API and the reported delay and selection typings; done means all four components type-check and their attachment, screenshot, and hover-card interactions work after a fresh install.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.