Skip to content

Add preview card with modal for pasted long content in PromptInput #333

@shloimy-wiesel

Description

@shloimy-wiesel

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:

Image Image Image Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions