Add preview card with modal for pasted long content in PromptInput
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 283
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
Currently, when pasting long text into PromptInput, the entire content is displayed inline, which can make the input area unwieldy.
Expected behavior:
Long pasted content should be displayed as a compact preview card (similar to Claude.ai and v0.app), showing:
- A truncated preview of the content
- File size and line count
- A "PASTED" badge/indicator
- Clicking the card opens a modal/dialog with the full content
- Modal should include actions to copy or download the pasted content
Current behavior:
All pasted text appears directly in the textarea, regardless of length.
Screenshots:
Suggested implementation:
Add a PromptInputPastedContent component that detects large pastes (e.g., >200 characters or >10 lines) and displays them as a clickable preview card above the textarea. The card should trigger a modal/dialog showing the full content with copy and download actions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the existing PromptInput implementation and inspect how pasted text is handled. Add the proposed PromptInputPastedContent entry point for large pastes, with a truncated card showing size, line count, and a PASTED indicator, then verify that opening it reveals the full content with copy and download actions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100