VS Code 中的 GitHub Copilot 設定參考

本文列出了 Visual Studio Code 中 GitHub Copilot 的設定。有關在 VS Code 中使用設定的一般資訊,請參閱使用者與工作區設定

團隊持續致力於改進 VS Code 中的 Copilot 並新增功能。部分功能仍處於實驗階段。歡迎試用並在我們的 Issue 頁面分享您的回饋。獲取更多關於 VS Code 功能生命週期的資訊。

提示

如果您尚未訂閱 Copilot,可以透過註冊 Copilot 免費方案 來免費使用 Copilot,並獲得每月的內嵌建議和聊天互動額度。

一般設定

設定與說明 預設值
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 中開啟 (實驗性)
控制命令選擇區 (Command Palette) 應在何處提出聊天問題。
"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 中開啟
控制當 Copilot 指令可用時,是否將其顯示為程式碼動作 (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 是否要在可能的情況下並排顯示較大的建議,或者是否應始終在相關程式碼下方顯示較大的建議。
"auto"
github.copilot.nextEditSuggestions.fixes 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用基於診斷結果(波浪底線)的下一個編輯建議。例如:遺失的匯入 (imports)。
true
editor.inlineSuggest.edits.showCollapsed 在 VS Code 中開啟 在 VS Code Insiders 中開啟
僅在您按下 Tab 鍵導覽至建議或將滑鼠懸停在裝訂槽 (gutter) 箭頭上時,才在編輯器中顯示 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.checkpoints.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用或停用聊天中的檢查點 (checkpoints)
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.notifyWindowOnConfirmation 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定聊天工作階段需要使用者輸入時何時顯示 OS 通知:off 表示永不顯示,windowNotFocused (預設) 表示僅在 VS Code 視窗未聚焦時顯示,always 表示始終顯示。
"windowNotFocused"
chat.notifyWindowOnResponseReceived 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定收到聊天回應時何時顯示 OS 通知: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 中開啟 (預覽)
設定額外的勾點 (hook) 檔案位置。指定資料夾路徑(會載入所有 *.json 檔案)或直接指定 .json 檔案路徑。僅支援相對路徑和波浪號 (~) 路徑。
{}
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 時,Copilot 會自動偵測需要編輯的相關檔案。
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 相容模型。
[]
github.copilot.chat.edits.suggestRelatedFilesFromGitHistory 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
在聊天上下文中建議來自 git 歷史紀錄的相關檔案。
true

代理程式 (Agent) 設定

設定與說明 預設值
chat.agent.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 此設定由組織層級管理。請聯絡您的管理員進行變更。
啟用或停用使用代理程式 (需 VS Code 1.99 或更高版本)。
true
chat.agent.maxRequests 在 VS Code 中開啟 在 VS Code Insiders 中開啟
Copilot 使用代理程式可發出的最大請求數。
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 Apps(由 MCP 伺服器提供的豐富使用者介面)。
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.autopilot.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
控制自動駕駛 (Autopilot) 權限層級是否在權限選擇器中可用。啟用後,自動駕駛會自動核准所有工具呼叫,並持續執行直到任務完成。
true
chat.tools.urls.autoApprove 在 VS Code 中開啟 在 VS Code Insiders 中開啟
控制哪些 URL 請求和回應會被自動核准
[]
chat.agent.thinking.collapsedTools 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
設定在聊天對話中,工具呼叫細節預設是摺疊還是展開。
always (永遠)
chat.agent.thinkingStyle 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
設定聊天中如何呈現「思考 Token」。
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 中開啟 (實驗性)
要求使用者針對執行檔案寫入的終端機指令進行核准。
outsideWorkspace (工作區外)
chat.agent.sandbox 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
啟用代理程式執行之代理程式指令的沙盒化 (僅限 macOS 和 Linux)。啟用後,指令會自動核准,並受到檔案系統和網路存取的限制。
false
chat.agent.sandboxFileSystem.linux 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
設定 Linux 上沙盒化代理程式指令的檔案系統存取規則。支援 allowWritedenyWritedenyRead 屬性。
{}
chat.agent.sandboxFileSystem.mac 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
設定 macOS 上沙盒化代理程式指令的檔案系統存取規則。支援 allowWritedenyWritedenyRead 屬性。
{}
chat.agent.sandboxNetwork.allowedDomains 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
設定沙盒化代理程式指令中允許網路存取的網域。預設情況下,所有網路存取均被封鎖。
[]
chat.agent.sandboxNetwork.deniedDomains 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
設定沙盒化代理程式指令中拒絕網路存取的網域。拒絕網域的優先順序高於允許網域。
[]
github.copilot.chat.newWorkspaceCreation.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
啟用聊天中建立新工作區骨架 (scaffolding) 的工具。
true
chat.planAgent.defaultModel 在 VS Code 中開啟 在 VS Code Insiders 中開啟
為計畫代理程式 (plan agent) 選取預設語言模型。
"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

行內聊天設定

設定與說明 預設值
inlineChat.defaultModel 在 VS Code 中開啟 在 VS Code Insiders 中開啟
設定編輯器行內聊天的預設語言模型。您選取的模型會在工作階段期間持續有效,但在 VS Code 重新載入後會重設為此預設值。
不適用 (N/A)
inlineChat.askInChat 在 VS Code 中開啟 在 VS Code Insiders 中開啟
當檔案屬於作用中的聊天編輯工作階段時,如果您按下 ⌘I (Windows, Linux Ctrl+I),則在「聊天」檢視中使用「Ask in Chat」而非開啟一般的行內聊天。停用時,則始終開啟一般行內聊天。
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 審查當前編輯器選取內容的請求中。
[]

自訂指令設定

設定與說明 預設值
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

可重複使用提示詞 (Prompt) 檔案設定

設定與說明 預設值
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 }
chat.customAgentInSubagent.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
啟用使用具有子代理程式的自訂代理程式。
false
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.tools.memory.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
啟用或停用內建記憶工具,此工具使代理程式能夠跨對話儲存並回想筆記。
true
github.copilot.chat.copilotMemory.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
在 VS Code 中啟用 Copilot Memory 整合。Copilot Memory 是 GitHub 託管的記憶系統,可跨多個 Copilot 介面保留儲存庫特定的洞察內容。
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 範圍 (spans) 中擷取完整的提示詞和回應內容。可能會包含敏感資訊。
false

代理程式外掛程式設定

設定與說明 預設值
chat.plugins.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (預覽)
啟用或停用對 代理程式外掛程式 (agent plugins) 的支援。
false
chat.plugins.marketplaces 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
設定用於探索代理程式外掛程式的額外外掛程式市集 Git 儲存庫。
["github/copilot-plugins", "github/awesome-copilot"]
chat.pluginLocations 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
透過將目錄路徑對應至啟用或停用狀態,來註冊本機複製或下載的代理程式外掛程式。
{}

偵錯設定

設定與說明 預設值
github.copilot.chat.agentDebugLog.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟
啟用 代理程式除錯記錄 (agent debug logs) 以及用於檢查聊天對話的 /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 中開啟 (實驗性)
針對目前測試覆蓋率資訊未涵蓋的符號,顯示 Generate tests (產生測試) 代碼透鏡 (Code Lens)。
false
github.copilot.chat.setupTests.enabled 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
啟用實驗性的 /setupTests 意圖以及 /tests 產生的提示。
true

Notebook 設定

設定與說明 預設值
notebook.experimental.generate 在 VS Code 中開啟 在 VS Code Insiders 中開啟 (實驗性)
啟用 Generate (產生) 動作,以使用筆記本內嵌聊天功能建立程式碼儲存格。
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 中開啟
內嵌聊天 (Inline Chat) 是否同時為其變更呈現一個無障礙差異檢視器 (accessible diff viewer)。
"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 中開啟
提供有關如何存取內嵌建議懸浮視窗與無障礙檢視 (Accessible View) 的資訊。
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
© . This site is unofficial and not affiliated with Microsoft.