Skip to content

Creating a File component that can be used to see the diff within a file, reject or accept changes #161

@tobiasbueschel

Description

@tobiasbueschel

When v0, Copilot, Cursor or other coding assistants suggest code changes, users need a clear way to review what's being changed in each file before accepting or rejecting those changes. Currently, there's no dedicated component in AI Elements to display file-level diffs with interactive approval.

This is how it looks in Cursor for example:

Image

Hence, it would be great to either (1) one of our existing components to cater to this or (2) create a new component that displays file changes in a git-like diff format with interactive controls such as:

  • File header showing filename, icon, and change statistics (+X -Y lines)
  • Diff viewer with syntax highlighting and line-by-line changes
  • Action buttons to accept, reject, or view more details
  • Status indicator showing if changes are pending, accepted, or rejected
  • Expandable/collapsible to manage multiple file changes

We could for example call it <File /> or <FileDiff />?

Related tickets:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions