Github Copilot: Prevent inadvertent edits to sensitive files

To prevent inadvertent edits to sensitive files, such as workspace configuration settings or environment settings, VS Code prompts you to approve edits before they are applied. In chat, you can see a diff view of the proposed changes and choose to approve or reject them.

Use the chat.tools.edits.autoApprove setting to configure which files require approval. The setting uses glob patterns to match file paths in your workspace.

The following example configuration automatically allows edits to all files except for JSON files in the .vscode folder and files named .env, which you are prompted to approve:

"chat.tools.edits.autoApprove": {
"/": true, "/.vscode/.json": false,
"**/.env": false,
"**/*.sql": false,
"**/*.bk": false,
"**/node_modules/**": false,
"**/vendors/**": false
}