Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(auto-edit): Add more test cases for image rendering #7138

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

umpox
Copy link
Contributor

@umpox umpox commented Feb 19, 2025

Description

More test cases for #7000

Test plan

Tests only PR - CI passes

@umpox umpox changed the title init feat(auto-edit): Add more test cases for image rendering Feb 19, 2025
umpox added a commit that referenced this pull request Feb 20, 2025
https://linear.app/sourcegraph/issue/CODY-4921/auto-edit-support-unified-diff-format-for-image-generations


https://github.com/user-attachments/assets/f9a0afdd-7e09-4cd7-85fe-53b99dc1d7fc


## Description

This PR:
- Adds support for a unified diff format with a different UI. This will
be useful for other editors where we do not have support for decorations
or will not have it for the MVP
- Refactors the image generator feature to use `DecorationInfo` instead
of `AddedLinesDecorationInfo`. This means we can easily port this to the
inline decorator in a follow up PR.
- Generally refactors much of the canvas/highlighting/diff logic. This
was necessary to simplify this code as much as possible, as porting to
`DecorationInfo` and supporting deletions here adds a lot of checks/edge
cases.

## Test plan

- Manual testing with both `unified` and `additions` modes enabled
- Unit tests that generate images
- Further tests in this PR branched from here:
#7138

<!-- Required. See
https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles.
-->
Base automatically changed from tr/image-unified-diff to main February 20, 2025 11:03
@umpox umpox force-pushed the tr/image-unified-diff-tests branch from fb90760 to 43f5d2c Compare February 20, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants