agent: Add setting to control edit card expanded state (#34040)

This PR adds the `expand_edit_card` setting, which controls whether edit
cards in the agent panel are expanded, thus showing or not the full diff
of a given file's AI-driven change. I personally prefer to have these
cards collapsed by default as I am mostly reviewing diffs using either
the review multibuffer or the diffs within the file's buffer itself.
Didn't want to change the default behavior as that was intentionally
chosen, so here we are! :)

Open to feedback about the setting name; I've iterated between a few
options and don't necessarily feel like the current one is the best.

Release Notes:

- agent: Added a setting to control whether edit cards are expanded in
the agent panel, thus showing or hiding the full diff of a file's
changes.
This commit is contained in:
Danilo Leal 2025-07-08 01:19:09 -03:00 committed by GitHub
parent 02d0e725a8
commit f1db3b4e1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 51 additions and 3 deletions

View file

@ -646,3 +646,19 @@ You can choose between `thread` (the default) and `text_thread`:
}
}
```
### Edit Card
Use the `expand_edit_card` setting to control whether edit cards show the full diff in the Agent Panel.
It is set to `true` by default, but if set to false, the card's height is capped to a certain number of lines, requiring a click to be expanded.
```json
{
"agent": {
"expand_edit_card": "false"
}
}
```
This setting is currently only available in Preview.
It should be up in Stable by the next release.