-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Clarification of how to enable diff views in chat and what defaults are #9278
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
base: main
Are you sure you want to change the base?
Clarification of how to enable diff views in chat and what defaults are #9278
Conversation
…ity about what the default is
ntrogh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JerilynFranz I've rephrased your suggestion a bit because we are asking for approval for a number of sensitive files. Thanks for bringing this up and contributing to improve our docs!
Revised doc diff from ntrogh Co-authored-by: Nick Trogh <ntrogh@hotmail.com>
ntrogh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JerilynFranz There was some duplication.
| By default, VS Code asks for approval for workspace configuration settings, environment settings, and a limited set of known files. It is recommended to review the list of file types and add sensitive files for your project. | ||
|
|
||
|
|
||
| If you wish to see a diff view of proposed changes in chat _before_ the edits are made and choose to approve or reject them from chat first, use the `setting(chat.tools.edits.autoApprove)` setting to configure which files require approval from chat. The setting uses glob patterns to match file paths in your workspace. The default is to _not_ show most diffs in chat first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| If you wish to see a diff view of proposed changes in chat _before_ the edits are made and choose to approve or reject them from chat first, use the `setting(chat.tools.edits.autoApprove)` setting to configure which files require approval from chat. The setting uses glob patterns to match file paths in your workspace. The default is to _not_ show most diffs in chat first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think keeping 46 through 50, but discarding 43 through 45 is the right approach here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking we are talking a little bit past each other here.
You appear focused on the small number of files that do require approval by default while I am focused on the many more files that do not.
In my workflows, agent's habit of making unrequested edits in response to questions and having them autoaccepted after a timeout if I don't notice that it did so is extremely frustrating and actively breaks code.
The existing language is highly ambiguous about what files are and are not protected by default.
That agent does not use autoapproval for a small number of 'sensitive' files is not the point I wish to emphasize in the docs. While useful that some files are protected by default, the lack of default protection for most files has far more impact on my workflows.
The point that is specifically being addressed by my proposed edit is to make it very clear that most files are not protected from autoapproval by default and that if that is an issue for you, this is how you change it.
Does this make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default behavior of chat is to apply edits immediately and then ask to approve/reject. That how it's currently designed to work and meets the most common user scenarios.
The point of this section is to describe how to prevent edits to a very specific set of sensitive files. My edits describe both the default scenario, and explain how you can configure a setting to add more files.
If we want to describe in more detail what the default behavior is, another section ("Pending changes") would be more appropriate imo.
| By default, VS Code automatically applies edits to files in your workspace and then prompts you to approve these edits before they are finalized. | ||
|
|
||
| Use the `setting(chat.tools.edits.autoApprove)` setting to configure which files require approval. The setting uses glob patterns to match file paths in your workspace. | ||
| To prevent inadvertent changes to _sensitive files_, VS Code can show a diff view of the proposed edits before they are applied. You can then decide if you want to keep or reject these edits. Use the `setting(chat.tools.edits.autoApprove)` setting to configure which files require approval from chat. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| To prevent inadvertent changes to _sensitive files_, VS Code can show a diff view of the proposed edits before they are applied. You can then decide if you want to keep or reject these edits. Use the `setting(chat.tools.edits.autoApprove)` setting to configure which files require approval from chat. | |
| To prevent inadvertent changes to _sensitive files_, VS Code can show a diff view of the proposed edits before they are applied. You can then decide if you want to keep or reject these edits. Use the `setting(chat.tools.edits.autoApprove)` setting to configure which files require approval from chat. The setting uses glob patterns to match file paths in your workspace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part (lines 43-45) appears redundant to the next part below (lines 47 to 50) if I am not misunderstanding what is being proposed now.
JerilynFranz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think deleting the proposed 43-45 and keeping the proposed 46-50 lines is the right approach here.
| By default, VS Code asks for approval for workspace configuration settings, environment settings, and a limited set of known files. It is recommended to review the list of file types and add sensitive files for your project. | ||
|
|
||
|
|
||
| If you wish to see a diff view of proposed changes in chat _before_ the edits are made and choose to approve or reject them from chat first, use the `setting(chat.tools.edits.autoApprove)` setting to configure which files require approval from chat. The setting uses glob patterns to match file paths in your workspace. The default is to _not_ show most diffs in chat first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think keeping 46 through 50, but discarding 43 through 45 is the right approach here.
| By default, VS Code automatically applies edits to files in your workspace and then prompts you to approve these edits before they are finalized. | ||
|
|
||
| Use the `setting(chat.tools.edits.autoApprove)` setting to configure which files require approval. The setting uses glob patterns to match file paths in your workspace. | ||
| To prevent inadvertent changes to _sensitive files_, VS Code can show a diff view of the proposed edits before they are applied. You can then decide if you want to keep or reject these edits. Use the `setting(chat.tools.edits.autoApprove)` setting to configure which files require approval from chat. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part (lines 43-45) appears redundant to the next part below (lines 47 to 50) if I am not misunderstanding what is being proposed now.
This updates the documentation on 'edit sensitive files' to document that the default is to auto-accept agent edits and that you must change a setting if you do not want that behavior.