From a82190d4aa3139aa466c4e63eee4c69d333556bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Thu, 13 Nov 2025 00:27:35 +0800 Subject: [PATCH] chore(devcontainer): configure chat tool auto-approval --- .devcontainer/devcontainer.json | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1e663cc..3acd364 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -23,7 +23,7 @@ ], "forwardPorts": [4730, 4731], // vscode://settings/remote.localPortHost -> 默认只监听 localhost "portsAttributes": { - "4730": { "label": "开发服务器端口", "onAutoForward": "openPreview" }, + "4730": { "label": "开发服务器端口", "onAutoForward": "notify" }, "4731": { "label": "预览服务器端口", "onAutoForward": "notify" } }, "customizations": { @@ -53,6 +53,17 @@ "esbenp.prettier-vscode" ], "settings": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit" + }, + + "chat.tools.autoApprove": true, + "chat.tools.terminal.autoApprove": { "/.*/": true }, + // * 尽管使用了“/.*/”,但有些还是会失败,因为有几个错误的默认值: + // * https://github.com/microsoft/vscode/issues/266651#issuecomment-3292581459 + "tasks": { "version": "2.0.0", "tasks": [ @@ -69,11 +80,6 @@ } ] }, - "editor.formatOnSave": true, - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.codeActionsOnSave": { - "source.fixAll.eslint": "explicit" - }, "terminal.integrated.defaultProfile.linux": "💲zsh", "terminal.integrated.profiles.linux": { "💲zsh": {