AI 設定參考

本文列出 Visual Studio Code 中 AI 功能與代理程式的設定組態。如需有關在 VS Code 中使用設定的一般資訊,請參閱 使用者與工作區設定

團隊持續致力於改善 VS Code 中的 AI 功能並新增功能。某些功能仍處於實驗階段。歡迎試用並在 我們的 Issues 頁面 分享您的意見反應。取得有關 VS Code 功能生命週期 的詳細資訊。

提示

如果您尚未擁有 Copilot 訂閱,可以透過註冊 Copilot 免費方案來免費使用 Copilot,並獲得每月一定額度的行內建議與 AI 點數。

一般設定

設定與說明 預設值
chat.commandCenter.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
控制是否要在 VS Code 標題列中顯示聊天功能表。
true
workbench.settings.showAISearchToggle 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用在設定編輯器中使用 AI 搜尋設定的功能。
true
workbench.commandPalette.experimental.askChatLocation 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
控制命令選擇區應該在哪裡詢問聊天問題。
"chatView"
search.searchView.semanticSearchBehavior 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
設定何時要在「搜尋」檢視中執行語意搜尋:手動 (預設)、找不到文字搜尋結果時,或總是執行。
"manual"
search.searchView.keywordSuggestions 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
控制是否要在「搜尋」檢視中顯示關鍵字建議。
false
chat.disableAIFeatures 在 VS Code 中開啟 在 VS Code Insiders 中開啟
停用並隱藏 VS Code 中的內建 AI 功能 (例如聊天與內嵌建議),並停用 Copilot 擴充功能。
false

程式碼編輯設定

設定與說明 預設值
github.copilot.editor.enableCodeActions 在 VS Code 中開啟 在 VS Code Insiders 中開啟
控制當可用時,是否要將 AI 命令顯示為程式碼動作 (Code Actions)。
true
github.copilot.renameSuggestions.triggerAutomatically 在 VS Code 中開啟 在 VS Code Insiders 中開啟
產生符號重新命名建議。
true
github.copilot.enable 在 VS Code 中開啟 在 VS Code Insiders 中開啟
為指定的語言啟用或停用內嵌建議。
{ "*": true, "plaintext": false, "markdown": false, "scminput": false }
github.copilot.nextEditSuggestions.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
啟用下次編輯建議 (NES)。
true
editor.inlineSuggest.edits.allowCodeShifting 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定 NES 是否能夠移動您的程式碼以顯示建議。
"always"
editor.inlineSuggest.edits.renderSideBySide 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定 NES 是否可以在可能時並排顯示較大的建議,或者 NES 是否應該一律在相關程式碼下方顯示較大的建議。
"auto"
github.copilot.nextEditSuggestions.fixes 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用基於診斷 (波浪底線) 的下次編輯建議。例如:遺漏的匯入。
true
editor.inlineSuggest.edits.showCollapsed 在 VS Code 中開啟 在 VS Code Insiders 中開啟
只有在您按下 Tab 鍵巡覽至建議或將滑鼠停留在裝訂邊箭號上方時,才在編輯器中顯示 NES 程式碼變更。
false
editor.inlineSuggest.fontFamily 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定內嵌完成項目的字型家族。
"default"
editor.inlineSuggest.showToolbar 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用或停用內嵌完成項目所顯示的工具列。
"onHover"
editor.inlineSuggest.minShowDelay 在 VS Code 中開啟 在 VS Code Insiders 中開啟
顯示內嵌建議之前要等候的時間 (毫秒)。
0

聊天設定

設定與說明 預設值
github.copilot.chat.localeOverride 在 VS Code 中開啟 在 VS Code Insiders 中開啟
為聊天回應指定地區設定,例如 enfr
"auto"
github.copilot.chat.useProjectTemplates 在 VS Code 中開啟 在 VS Code Insiders 中開啟
使用 /new 時,使用相關的 GitHub 專案做為入門專案。
true
github.copilot.chat.scopeSelection 在 VS Code 中開啟 在 VS Code Insiders 中開啟
如果您使用 /explain 且使用中的編輯器沒有選取範圍,是否要提示輸入特定的符號範圍。
false
github.copilot.chat.terminalChatLocation 在 VS Code 中開啟 在 VS Code Insiders 中開啟
控制應在何處開啟來自終端機的聊天查詢。
"chatView"
chat.detectParticipant.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
在「聊天」檢視中啟用聊天參與者偵測。
true
chat.artifacts.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
啟用或停用聊天中的產出物面板 (預覽)。
false
chat.artifacts.rules.byMimeType 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
透過 MIME 類型模式從工具結果中擷取產出物的規則。將 MIME 類型模式 (例如 "image/*") 對應至群組設定。
{ "image/*": { "groupName": "Screenshots", "onlyShowGroup": true } }
chat.artifacts.rules.byFilePath 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
透過檔案路徑 glob 模式從寫入的檔案中擷取產出物的規則。將 glob 模式 (例如 "**/*plan*.md") 對應至群組設定。
{ "**/*plan*.md": { "groupName": "Plans" } }
chat.artifacts.rules.byMemoryFilePath 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
透過記憶體檔案路徑 glob 模式從記憶體工具寫入中擷取產出物的規則。將 glob 模式對應至群組設定。
{ "**/*plan*.md": { "groupName": "Plans" } }
chat.checkpoints.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用或停用聊天中的檢查點
true
chat.checkpoints.showFileChanges 在 VS Code 中開啟 在 VS Code Insiders 中開啟
在每個聊天要求的結尾顯示檔案變更摘要。
false
chat.editRequests 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用或停用編輯先前的聊天要求
"inline"
chat.editor.fontFamily 在 VS Code 中開啟 在 VS Code Insiders 中開啟
聊天程式碼區塊中的字型家族。
"default"
chat.editor.fontSize 在 VS Code 中開啟 在 VS Code Insiders 中開啟
聊天程式碼區塊中的字型大小 (以像素為單位)。
14
chat.editor.fontWeight 在 VS Code 中開啟 在 VS Code Insiders 中開啟
聊天程式碼區塊中的字型粗細。
"default"
chat.editor.lineHeight 在 VS Code 中開啟 在 VS Code Insiders 中開啟
聊天程式碼區塊中的行高 (以像素為單位)。
0
chat.editor.wordWrap 在 VS Code 中開啟 在 VS Code Insiders 中開啟
切換聊天程式碼區塊中的自動換行。
"off"
chat.editing.confirmEditRequestRemoval 在 VS Code 中開啟 在 VS Code Insiders 中開啟
復原編輯之前要求確認。
true
chat.editing.confirmEditRequestRetry 在 VS Code 中開啟 在 VS Code Insiders 中開啟
重做上一個編輯之前要求確認。
true
chat.editing.autoAcceptDelay 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定在建議的編輯自動接受之後的延遲時間,使用零可停用自動接受。
0
chat.editing.revealNextChangeOnResolve 在 VS Code 中開啟 在 VS Code Insiders 中開啟
控制在保留或復原聊天編輯之後,編輯器是否自動顯示下一個變更。
true
chat.fontFamily 在 VS Code 中開啟 在 VS Code Insiders 中開啟
聊天中 Markdown 內容的字型家族。
"default"
chat.fontSize 在 VS Code 中開啟 在 VS Code Insiders 中開啟
聊天中 Markdown 內容的字型大小 (以像素為單位)。
13
chat.verbose 在 VS Code 中開啟 在 VS Code Insiders 中開啟
在聊天中顯示要求和完成的時間戳記。將滑鼠停留在完成時間戳記上方以顯示經過的回應時間。
true
chat.notifyWindowOnConfirmation 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定何時要在聊天工作階段中需要使用者輸入時顯示作業系統通知:off 表示永不顯示通知,windowNotFocused (預設) 表示僅在 VS Code 視窗未取得焦點時顯示通知,always 表示一律顯示通知。
"windowNotFocused"
chat.notifyWindowOnResponseReceived 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定何時要在收到聊天回應時顯示作業系統通知:off 表示永不顯示通知,windowNotFocused (預設) 表示僅在 VS Code 視窗未取得焦點時顯示通知,always 表示一律顯示通知。
"windowNotFocused"
chat.requestQueuing.defaultAction 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定要求進行中時 [傳送] 按鈕的預設動作:queue 會將訊息新增至佇列,steer 會發出訊號要求目前的要求讓出。
"queue"
chat.tools.terminal.autoReplyToPrompts 在 VS Code 中開啟 在 VS Code Insiders 中開啟
使用預設答案自動回覆終端機提示。
false
setting(chat.tools.terminal.terminalProfile.<platform>)
設定要在各平臺上用於聊天終端機命令的終端機設定檔。
""
chat.hookFilesLocations 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
設定額外的攔截器檔案位置。指定資料夾的路徑 (載入所有 *.json 檔案) 或 .json 檔案的直接路徑。僅支援相對路徑與 tilde (~) 路徑。
{}
chat.useCustomAgentHooks 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
啟用在自訂代理程式 frontmatter 中定義的代理程式範圍攔截器。啟用後,.agent.md 檔案中的攔截器僅在該代理程式處於主動狀態時執行。
false
chat.useAgentsMdFile 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用或停用使用 AGENTS.md 檔案做為聊天要求的內容。
true
chat.math.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用或停用在聊天中使用 KaTeX 進行數學運算式轉譯。
false
chat.viewTitle.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
在聊天標頭中顯示目前聊天工作階段的標題。
true
github.copilot.chat.codesearch.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
在提示詞中使用 #codebase 時,代理程式會自動探索要編輯的相關檔案。
false
chat.emptyState.history.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
在「聊天」檢視的空白狀態中顯示最近的聊天歷程記錄。
false
imageCarousel.chat.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
啟用用於瀏覽聊天回應中圖片的圖片輪播。選取工具結果或助理訊息中的圖片丸狀按鈕以開啟輪播檢視。
false
chat.sendElementsToChat.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用將來自整合式瀏覽器的元素傳送至聊天檢視做為內容。
true
chat.sendElementsToChat.attachCSS 在 VS Code 中開啟 在 VS Code Insiders 中開啟
從整合式瀏覽器新增元素至聊天內容時包含 CSS 樣式。
true
chat.sendElementsToChat.attachImages 在 VS Code 中開啟 在 VS Code Insiders 中開啟
從整合式瀏覽器新增元素至聊天內容時包含圖片。
true
workbench.browser.enableChatTools 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
啟用可讓代理程式與整合式瀏覽器中的頁面互動的瀏覽器工具
true
chat.useClaudeMdFile 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用或停用使用 CLAUDE.md 檔案做為常駐自訂指示。
true
chat.useNestedAgentsMdFiles 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
啟用或停用使用工作區子資料夾中的 AGENTS.md 檔案做為聊天要求的內容。
false
github.copilot.chat.customOAIModels 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (已取代)
設定用於聊天的自訂 OpenAI 相容模型。已取代,建議改用支援 Chat Completions、Responses 與 Messages API 的自訂端點提供者。
[]
chat.utilityModel 在 VS Code 中開啟 在 VS Code Insiders 中開啟
覆寫用於內建公用程式流程的語言模型,例如產生標題、摘要和備用回應。
"Default"
chat.utilitySmallModel 在 VS Code 中開啟 在 VS Code Insiders 中開啟
覆寫用於快速、輕量型公用程式流程的語言模型,例如認可訊息、重新命名建議和意圖偵測。建議使用快速且便宜的模型。
"Default"
chat.byokUtilityModelDefault 在 VS Code 中開啟 在 VS Code Insiders 中開啟
當主要代理程式模型為 BYOK (自備金鑰) 模型時,控制內建公用程式流程要使用哪一個模型。您可以選擇主要代理程式模型、GitHub Copilot 公用程式模型或不使用預設公用程式模型。當主要代理程式模型由 GitHub Copilot 提供時,此設定無效。
"GitHub Copilot"
github.copilot.chat.edits.suggestRelatedFilesFromGitHistory 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
在聊天內容中建議來自 git 歷程記錄的相關檔案。
true
github.copilot.chat.localIndex.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用用於工作階段深入解析/chronicle 命令的本機工作階段追蹤。
true
chat.sessionSync.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
啟用至 GitHub.com 的工作階段同步。啟用後,Copilot 工作階段資料會同步至您的 GitHub 帳戶,以便跨裝置存取。這也需要啟用 github.copilot.chat.localIndex.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
true
chat.sessionSync.excludeRepositories 在 VS Code 中開啟 在 VS Code Insiders 中開啟
要從工作階段同步中排除的存放庫模式。請使用確切的 owner/repo 名稱或像 my-org/* 這樣的 glob 模式。來自符合的存放庫之工作階段將僅儲存於本機。
[]

代理程式設定

設定與說明 預設值
chat.agent.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
啟用或停用使用代理程式 (需要 VS Code 1.99 或更新版本)。
true
chat.agent.maxRequests 在 VS Code 中開啟 在 VS Code Insiders 中開啟
代理程式可以發出的最大要求數。
25
github.copilot.chat.agent.autoFix 在 VS Code 中開啟 在 VS Code Insiders 中開啟
自動診斷並修正所產生的程式碼變更中的問題。
true
chat.mcp.access 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
管理可以在 VS Code 中使用的模型內容通訊協定 (Model Context Protocol, MCP) 伺服器。
true
chat.mcp.discovery.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定從其他應用程式自動探索 MCP 伺服器組態。
false
chat.mcp.serverSampling 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定要向 MCP 伺服器公開哪些模型以進行採樣。
{}
chat.mcp.apps.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
啟用或停用 MCP 應用程式 (MCP Apps),這些是由 MCP 伺服器提供的豐富使用者介面。
true
chat.tools.compressOutput.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
在將大型終端機輸出傳送給模型之前進行壓縮,以減少內容視窗使用量。折疊未變更的差異區塊 (diff hunks)、捨棄鎖定檔案 (lockfile) 差異,並移除安裝進度。
false
chat.tools.riskAssessment.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
在終端機命令確認上顯示 AI 產生的風險徽章,指出命令是安全的、需要謹慎,還是應該仔細審查。
true
chat.tools.terminal.autoApprove 在 VS Code 中開啟 在 VS Code Insiders 中開啟
控制使用代理程式時自動核准哪些終端機命令。命令可以設定為 true (自動核准) 或 false (需要核准)。可以用 / 字元括住模式來使用常規運算式。
{ "rm": false, "rmdir": false, "del": false, "kill": false, "curl": false, "wget": false, "eval": false, "chmod": false, "chown": false, "/^Remove-Item\\b/i": false }
chat.tools.terminal.enableAutoApprove 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
啟用或停用終端機命令的自動核准。
true
chat.tools.edits.autoApprove 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定套用編輯之前需要核准哪些檔案。使用 glob 模式來比對工作區中的檔案路徑。
{}
chat.tools.terminal.outputLocation 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
設定終端機命令輸出的顯示位置:內嵌於聊天中或在整合式終端機中。
"chat"
chat.tools.terminal.enforceTimeoutFromModel 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
控制是否強制執行代理程式為終端機命令指定的逾時值。啟用後,代理程式會在指定的持續時間後停止追蹤命令,並傳回迄今收集到的輸出。
true
chat.tools.terminal.ignoreDefaultAutoApproveRules 在 VS Code 中開啟 在 VS Code Insiders 中開啟
忽略終端機命令的預設自動核准規則。
false
chat.tools.global.autoApprove 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
自動核准所有工具 - 此設定會停用關鍵的安全性保護
false
chat.assistedPermissions.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
在代理程式主機 (Agent Host) 上執行的代理程式之權限選擇器中顯示協助式權限。LLM 評審會評估每個工具呼叫的風險,並在不同意呼叫時要求您的核准。
true (Insiders)
false (Stable)
chat.permissions.default 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
設定新聊天工作階段的預設權限層級。選項:default (預設核准)、autoApprove (略過核准)、autopilot (自動駕駛)。您仍然可以針對每個工作階段變更權限層級。如果企業原則停用自動核准,新工作階段將使用預設核准。
"default"
chat.autopilot.advanced.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
啟用進階自動駕駛,其中會由獨立模型在每個自動駕駛回合後評估您的要求是否已完成並引導下一個回合,而不是依賴代理程式發出完成訊號。
false
chat.tools.urls.autoApprove 在 VS Code 中開啟 在 VS Code Insiders 中開啟
控制哪些 URL 要求與回應會自動核准
[]
chat.agent.thinking.collapsedTools 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
設定工具呼叫如何與思考內容分組:off 會將工具呼叫分開,withThinking 僅在存在思考內容時將其分組,always 則一律將工具呼叫分組在可折疊的區段中。
always
chat.agent.thinkingStyle 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
設定如何在聊天中轉譯思考:collapsed 預設會折疊思考,並可將推理與分組的工具呼叫分開;collapsedPreview 會從展開開始,並在非思考內容出現後折疊;fixedScrolling 則會在可展開的固定高度自動捲動面板中顯示思考。
fixedScrolling
chat.mcp.autoStart 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
當偵測到 MCP 組態變更時,自動啟動 MCP 伺服器。
newAndOutdated
chat.tools.eligibleForAutoApproval 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。 (實驗性)
設定有哪些工具在使用代理程式之前需要手動核准。
[]
chat.tools.terminal.blockDetectedFileWrites 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
要求使用者核准在工作區外執行檔案寫入的終端機命令。當工作階段層級命令核准處於主動狀態時,寫入作業系統暫存資料夾 (macOS 與 Linux 上的 /tmp,Windows 上的 %TEMP%) 可獲豁免。
outsideWorkspace
chat.agent.sandbox.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。 (預覽)
為代理程式執行的代理程式命令啟用沙箱化 (僅限 macOS 與 Linux)。可能的值:off (停用)、on (完整的檔案系統與網路隔離)、allowNetwork (僅限檔案系統隔離,允許所有對外網路流量)。啟用後,命令會自動核准並具有受限制的存取權。
關閉
chat.agent.sandbox.fileSystem.linux 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
設定 Linux 上沙箱化代理程式命令的檔案系統存取規則。支援 allowReadallowWritedenyReaddenyWrite 屬性。
{}
chat.agent.sandbox.fileSystem.mac 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
設定 macOS 上沙箱化代理程式命令的檔案系統存取規則。支援 allowReadallowWritedenyReaddenyWrite 屬性。
{}
chat.agent.networkFilter 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
為代理程式工具 (fetch 工具、整合式瀏覽器) 啟用網路網域篩選。啟用後,網路存取將根據 chat.agent.allowedNetworkDomains 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。 chat.agent.deniedNetworkDomains 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。 進行限制。停用時,不會套用任何篩選。
false
chat.agent.allowedNetworkDomains 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
設定代理程式工具進行網路存取時允許的網域。僅在啟用 chat.agent.networkFilter 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。 時生效。當同時啟用沙箱化時,這些規則也會套用至終端機命令。當允許清單與拒絕清單皆為空時,所有網域都會遭到封鎖。支援萬用字元,例如 *.example.com
[]
chat.agent.deniedNetworkDomains 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
設定代理程式工具進行網路存取時拒絕的網域。僅在啟用 chat.agent.networkFilter 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。 時生效。拒絕的網域優先於允許的網域。支援萬用字元,例如 *.example.com
[]
github.copilot.chat.newWorkspaceCreation.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
啟用用於在聊天中建立新工作區鷹架的工具。
true
chat.planWidget.inlineEditor.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
在計劃控制項內使用內嵌編輯器來編輯計劃,而不是開啟獨立的編輯器索引標籤。
true
chat.planAgent.defaultModel 在 VS Code 中開啟 在 VS Code Insiders 中開啟
選取計劃代理程式的預設語言模型。
"Auto (Vendor Default)"
github.copilot.chat.implementAgent.model 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
選取計劃之後用於實作步驟的語言模型。
``
github.copilot.chat.planAgent.additionalTools 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
授權計畫代理程式在研究與規劃階段存取額外工具。
[]
github.copilot.chat.additionalReadAccessFolders 在 VS Code 中開啟 在 VS Code Insiders 中開啟
授予內建代理程式工具對目前工作區外其他資料夾的唯讀存取權。
[]
github.copilot.chat.claudeAgent.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
啟用或停用由 Anthropic 的 Claude Agent SDK 支援的 Claude 代理程式工作階段。
true
github.copilot.chat.claudeAgent.allowDangerouslySkipPermissions 在 VS Code 中開啟 在 VS Code Insiders 中開啟
略過 Claude 代理程式的所有權限檢查。僅在隔離的沙箱環境中啟用此功能。
false
github.copilot.chat.agent.thinkingTool 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
使用代理程式時啟用思考工具。
false
github.copilot.chat.summarizeAgentConversationHistory.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
當內容視窗滿載時,自動摘要代理程式對話歷史紀錄。
true
github.copilot.chat.virtualTools.threshold 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
超過此工具數量時應使用虛擬工具。虛擬工具會將一組相似的工具分組,並允許模型按需啟用它們。這能讓您突破聊天要求 128 個工具的限制。
128

代理程式工作階段

代理程式檢視區提供了一個集中位置,用於管理本機聊天對話和遠端編碼代理程式工作階段。此檢視區可讓您同時處理多個 AI 工作階段、追蹤其進度,並有效率地管理長時間執行的工作。

設定與說明 預設值
workbench.startupEditor 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定 VS Code 歡迎頁面作為您的代理程式工作階段進入點。設為 agentSessionsWelcomePage 以顯示包含近期工作階段、內嵌聊天和快速動作的 VS Code 歡迎頁面
不適用 (N/A)
chat.viewSessions.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
在聊天檢視區中顯示代理程式工作階段清單。
true
chat.viewSessions.orientation 在 VS Code 中開啟 在 VS Code Insiders 中開啟
控制聊天檢視區中工作階段清單的版面配置方向。
"sideBySide"
chat.editMode.hidden 在 VS Code 中開啟 在 VS Code Insiders 中開啟
還原已過時的編輯模式(用於多檔案程式碼編輯)。
true
chat.agentsControl.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
在命令中心啟用 工作階段狀態指示器。顯示未讀和進行中的工作階段徽章。
true
chat.agentsControl.clickBehavior 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
設定選取代理程式狀態指示器中的聊天圖示時的行為。
"cycle" (Insiders)
"default" (Stable)
chat.unifiedAgentsBar.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
以統一的聊天與搜尋控制項取代命令中心搜尋方塊。
false
github.copilot.chat.cli.remote.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用來自 github.com 或 GitHub 行動應用程式之 Copilot CLI 工作階段的遠端控制支援。
true
chat.agentHost.byokModels.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
連接 BYOK 語言模型橋接器,以便擴充功能提供的 BYOK 模型可以在代理程式主機工作階段中執行。需要啟用 chat.agentHost.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。,且必須重新啟動代理程式主機程序才能生效。
false

內嵌聊天設定

設定與說明 預設值
inlineChat.defaultModel 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定編輯器內嵌聊天的預設語言模型。您選取的模型在工作階段期間會持續有效,但在 VS Code 重新載入後會重設為此設定的預設值。
不適用 (N/A)
inlineChat.askInChat 在 VS Code 中開啟 在 VS Code Insiders 中開啟
當檔案屬於現用聊天編輯工作階段時,按下 ⌘I (Windows、Linux 為 Ctrl+I) 時,使用聊天檢視區中的「在聊天中詢問」,而非開啟一般的內嵌聊天。停用時,一律會開啟一般內嵌聊天。
true
inlineChat.renderMode 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
設定內嵌聊天的顯示方式。hover:在浮動覆疊中顯示內嵌聊天,zone:在編輯器的專用區域中顯示內嵌聊天。
"hover"
inlineChat.finishOnType 在 VS Code 中開啟 在 VS Code Insiders 中開啟
在變更區域外部輸入時,結束編輯器內嵌聊天工作階段。
false
inlineChat.holdToSpeech 在 VS Code 中開啟 在 VS Code Insiders 中開啟
按住編輯器內嵌聊天鍵盤快速鍵 (⌘I (Windows、Linux 為 Ctrl+I)) 會自動啟用語音辨識。
true
editor.inlineSuggest.syntaxHighlightingEnabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
顯示內嵌建議的語法反白顯示。
true
inlineChat.affordance 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
當您選取文字時顯示視覺提示,以協助啟動內嵌聊天。off:無提示,gutter:顯示在行號區域中,editor:顯示在游標位置並帶有燈泡。
"off"
inlineChat.lineEmptyHint 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
在空白行上顯示編輯器內嵌聊天的提示。
false
inlineChat.lineNaturalLanguageHint 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
一旦某行主要由單字組成,即觸發編輯器內嵌聊天。
true
github.copilot.chat.editor.temporalContext.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
在編輯器內嵌聊天的內容中包含最近檢視與編輯過的檔案。
false

程式碼審查設定

設定與說明 預設值
github.copilot.chat.reviewSelection.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。 (預覽)
針對編輯器選取的文字啟用 AI 程式碼審查。
true
github.copilot.chat.reviewSelection.instructions 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
新增至使用 AI 審查目前編輯器選取範圍要求的自訂指示。
[]

原始碼控制設定

設定與說明 預設值
git.addAICoAuthor 在 VS Code 中開啟 在 VS Code Insiders 中開啟
Co-authored-by: Git 尾端附加至 AI 產生之變更的認可訊息。選項:off (無尾端)、chatAndAgent (適用於 Copilot Chat 或代理程式模式變更的尾端)、all (適用於所有 AI 產生的程式碼,包含內嵌建議的尾端)。請參閱 AI 共同作者歸屬
"chatAndAgent"

自訂指示設定

設定與說明 預設值
chat.instructionsFilesLocations 在 VS Code 中開啟 在 VS Code Insiders 中開啟
搜尋自訂指示檔案的位置。每個資料夾都會以遞迴方式搜尋,包含子目錄。相對路徑是從您工作區的根資料夾解析。支援檔案路徑的全域 (glob) 模式。
{ ".github/instructions": true, "~/.claude/rules": false" }
chat.includeApplyingInstructions 在 VS Code 中開啟 在 VS Code Insiders 中開啟
自動將具有相符 applyTo 模式的指示檔案加入聊天要求中。
true
chat.includeReferencedInstructions 在 VS Code 中開啟 在 VS Code Insiders 中開啟
自動將透過 Markdown 連結參照的指示檔案加入聊天要求中。
false
github.copilot.chat.codeGeneration.useInstructionFiles 在 VS Code 中開啟 在 VS Code Insiders 中開啟
自動將來自 .github/copilot-instructions.md 的自訂指示加入聊天要求中。
true
github.copilot.chat.commitMessageGeneration.instructions 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
用於透過 AI 產生認可訊息的自訂指示。
[]
github.copilot.chat.pullRequestDescriptionGeneration.instructions 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
用於透過 AI 產生提取要求 (Pull Request) 標題與描述的自訂指示。
[]
github.copilot.chat.organizationInstructions.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用探索在 GitHub 組織層級定義的自訂指示。
true
chat.useCustomizationsInParentRepositories 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用在 父儲存庫資料夾 中探索代理程式自訂項目 (指示、提示、代理程式、技能、攔截常式)。對於您開啟子資料夾而非儲存庫根目錄的單一儲存庫 (monorepo) 設定非常有用。
false

可重複使用的提示詞檔案設定

設定與說明 預設值
chat.promptFilesLocations 在 VS Code 中開啟 在 VS Code Insiders 中開啟
搜尋提示檔案的位置。相對路徑是從您工作區的根資料夾解析。支援檔案路徑的全域 (glob) 模式。
{ ".github/prompts": true }
chat.promptFilesRecommendations 在 VS Code 中開啟 在 VS Code Insiders 中開啟
開啟新聊天工作階段時啟用或停用提示檔案建議。提示檔案名稱與布林值或 when 子句的鍵值對清單。
[]

自訂代理程式設定

設定與說明 預設值
chat.agentFilesLocations 在 VS Code 中開啟 在 VS Code Insiders 中開啟
搜尋自訂代理程式檔案的位置。相對路徑是從您工作區的根資料夾解析。支援使用者特定路徑的常用目錄展開 (~)。
{ ".github/agents": true }
github.copilot.chat.cli.customAgents.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用使用來自 GitHub 背景代理程式工作階段的自訂代理程式。
false
github.copilot.chat.organizationCustomAgents.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用探索在 GitHub 組織層級定義的自訂代理程式。
true

代理程式技能設定

設定與說明 預設值
chat.useAgentSkills 在 VS Code 中開啟 在 VS Code Insiders 中開啟
在 VS Code 中啟用對 代理程式技能 的支援。
true
chat.agentSkillsLocations 在 VS Code 中開啟 在 VS Code Insiders 中開啟
搜尋代理程式技能的位置。相對路徑是從您工作區的根資料夾解析。支援使用者特定路徑的常用目錄展開 (~)。
"chat.agentSkillsLocations": { ".github/skills": true,".claude/skills": true,"~/.copilot/skills": true,"~/.claude/skills": true}
github.copilot.chat.skillTool.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
啟用用於叫用 代理程式技能 的專用技能工具。若要透過 context: fork 在獨立的子代理程式內容中執行技能,則為必要項目。
false

可觀測性設定

設定與說明 預設值
github.copilot.chat.otel.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
為 Copilot Chat 代理程式互動啟用 OpenTelemetry 發射。
false
github.copilot.chat.otel.exporterType 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
OTel 匯出工具類型:otlp-httpotlp-grpcconsolefile
"otlp-http"
github.copilot.chat.otel.otlpEndpoint 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
OTLP 收集器端點 URL。
"https://:4318"
github.copilot.chat.otel.outfile 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
使用 file 匯出工具類型時,JSON-lines 輸出的檔案路徑。
""
github.copilot.chat.otel.captureContent 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
在 OTel 跨距中擷取完整的提示與回應內容。可能包含機敏資訊。
false

代理程式外掛程式設定

設定與說明 預設值
chat.plugins.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
啟用或停用對 代理程式外掛程式 的支援。
false
chat.plugins.marketplaces 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
設定用於探索代理程式外掛程式的額外外掛程式市集 Git 儲存庫。
["github/copilot-plugins", "github/awesome-copilot"]
chat.plugins.enabledPlugins 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。
要啟用或停用的外掛程式 ID 允許清單。可透過 企業原則集中管理
{}
chat.plugins.strictMarketplaces 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定可由您的組織管理。請聯絡您的管理員以進行變更。 (實驗性)
僅信任由 企業原則 提供的市集。
false
chat.pluginLocations 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
透過將目錄路徑對應至啟用或停用狀態,來註冊本機複製或下載的代理程式外掛程式。
{}

偵錯設定

設定與說明 預設值
github.copilot.chat.agentDebugLog.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用用於檢查聊天工作階段的 代理程式偵錯記錄/troubleshoot 斜線命令。
false
github.copilot.chat.agentDebugLog.fileLogging.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用代理程式偵錯記錄的檔案記錄功能,這會將偵錯事件寫入磁碟上的檔案。
false
github.copilot.chat.startDebugging.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
在聊天檢視區中啟用實驗性的 /startDebugging 意圖以產生偵錯設定。
true
github.copilot.chat.copilotDebugCommand.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
啟用 copilot-debug 終端機命令。
true

測試設定

設定與說明 預設值
github.copilot.chat.generateTests.codeLens 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
針對目前的測試涵蓋範圍資訊未涵蓋的符號,顯示 產生測試 CodeLens。
false
github.copilot.chat.setupTests.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
/tests 產生中啟用實驗性的 /setupTests 意圖與提示。
true

筆記本設定

設定與說明 預設值
notebook.experimental.generate 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
啟用 產生 動作以透過筆記本內嵌聊天建立程式碼儲存格。
true
github.copilot.chat.edits.newNotebook.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
在編輯模式中啟用筆記本工具 (已過時) 以建立新的筆記本檔案。
true
github.copilot.chat.notebook.followCellExecution.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
在編輯器中顯示目前正在執行的儲存格。
false

協助工具設定

設定與說明 預設值
inlineChat.accessibleDiffView 在 VS Code 中開啟 在 VS Code Insiders 中開啟
內嵌聊天是否也為其變更轉譯無障礙差異檢視器。
"auto"
accessibility.signals.chatRequestSent 在 VS Code 中開啟 在 VS Code Insiders 中開啟
提出聊天要求時播放信號 — 聲音 (音訊提示) 及/或公告 (警示)。
{ "sound": "auto", "announcement": "auto" }
accessibility.signals.chatResponseReceived 在 VS Code 中開啟 在 VS Code Insiders 中開啟
收到回應時播放聲音/音訊提示。
{ "sound": "auto" }
accessibility.signals.chatEditModifiedFile 在 VS Code 中開啟 在 VS Code Insiders 中開啟
當檔案被聊天編輯修改時播放聲音/音訊提示。
{ "sound": "auto" }
accessibility.signals.chatUserActionRequired 在 VS Code 中開啟 在 VS Code Insiders 中開啟
當使用者需要在聊天中採取動作時播放聲音/音訊提示。
{ "sound": "auto", "announcement": "auto" }
accessibility.signals.lineHasInlineSuggestion 在 VS Code 中開啟 在 VS Code Insiders 中開啟
當游標位於具有內嵌建議的行上時播放聲音/音訊提示。
{ "sound": "auto" }
accessibility.signals.nextEditSuggestion 在 VS Code 中開啟 在 VS Code Insiders 中開啟
當有下一個編輯建議可用時播放聲音/音訊提示。
{ "sound": "auto", "announcement": "auto" }
accessibility.verboseChatProgressUpdates 在 VS Code 中開啟 在 VS Code Insiders 中開啟
提供關於聊天活動的詳細更新。
true
accessibility.verbosity.inlineChat 在 VS Code 中開啟 在 VS Code Insiders 中開啟
提供如何存取內嵌編輯器聊天無障礙說明功能表的相關資訊,並在輸入焦點落在其上時,透過提示說明如何使用此功能的警示。
true
accessibility.verbosity.inlineCompletions 在 VS Code 中開啟 在 VS Code Insiders 中開啟
提供如何存取內嵌建議懸停與無障礙檢視區的相關資訊。
true
accessibility.verbosity.panelChat 在 VS Code 中開啟 在 VS Code Insiders 中開啟
當聊天輸入取得焦點時,提供如何存取聊天說明功能表的相關資訊。
true
accessibility.voice.keywordActivation 在 VS Code 中開啟 在 VS Code Insiders 中開啟
控制是否識別關鍵字詞 'Hey Code' 以啟動語音聊天工作階段。
"off"
accessibility.voice.autoSynthesize 在 VS Code 中開啟 在 VS Code Insiders 中開啟
控制當使用語音作為輸入時,是否應自動大聲讀出文字回應。
"off"
accessibility.voice.speechTimeout 在 VS Code 中開啟 在 VS Code Insiders 中開啟
在您停止發言後,語音辨識保持作用中的持續時間 (毫秒)。
1200
English 한국어 中文(简体) 中文(繁體)
© . This website operates independently and is not affiliated with or endorsed by Microsoft. All brand names, logos, and trademarks are the property of their respective owners.