sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.79k stars 302 forks source link

Better rendering for auto edits #6132

Closed beyang closed 3 days ago

beyang commented 1 week ago

This makes the following changes to how inline edit proposals are rendered:

  1. Leading block whitespace in an added-line block is stripped, so that the edit doesn't render far to the right.
  2. A dotted green insert indicator has been added to indicate where an added-line block will be inserted
  3. Added-line blocks are now placed in a green box, rather than simply highlighting the lines in green

Before: image

After: image

Another example: image

Test plan

Test against the examples in sourcegraph/cody-chat-eval. This feature is still behind a feature flag.