Skip to content

Commit f470dcf

Browse files
joshspicerCopilot
andauthored
add when clause/setting to disable {background,cloud} agent (#2500)
* add when clause/setting to disable {background,cloud} agent * remove unused string * move to correct setting * Register backgroundAgent and cloudAgent settings in configurationService.ts Co-authored-by: joshspicer <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]>
1 parent 00b4192 commit f470dcf

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

package.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2381,6 +2381,16 @@
23812381
"title": "GitHub Copilot Chat",
23822382
"id": "stable",
23832383
"properties": {
2384+
"github.copilot.chat.backgroundAgent.enabled": {
2385+
"type": "boolean",
2386+
"default": true,
2387+
"markdownDescription": "%github.copilot.config.backgroundAgent.enabled%"
2388+
},
2389+
"github.copilot.chat.cloudAgent.enabled": {
2390+
"type": "boolean",
2391+
"default": true,
2392+
"markdownDescription": "%github.copilot.config.cloudAgent.enabled%"
2393+
},
23842394
"github.copilot.chat.codeGeneration.useInstructionFiles": {
23852395
"type": "boolean",
23862396
"default": true,
@@ -4978,6 +4988,7 @@
49784988
"order": 2,
49794989
"canDelegate": true,
49804990
"description": "Delegate tasks to a background agent.",
4991+
"when": "config.github.copilot.chat.backgroundAgent.enabled",
49814992
"capabilities": {
49824993
"supportsFileAttachments": true,
49834994
"supportsProblemAttachments": true,
@@ -4989,7 +5000,8 @@
49895000
"commands": [
49905001
{
49915002
"name": "delegate",
4992-
"description": "Delegate chat session to cloud agent and create associated PR"
5003+
"description": "Delegate chat session to cloud agent and create associated PR",
5004+
"when": "config.github.copilot.chat.cloudAgent.enabled"
49935005
}
49945006
]
49955007
},
@@ -5007,6 +5019,7 @@
50075019
"order": 1,
50085020
"canDelegate": true,
50095021
"description": "Delegate tasks to the GitHub Copilot Cloud Agent. The agent works asynchronously in the cloud to implement changes, iterates via chat, and can create or update pull requests as needed.",
5022+
"when": "config.github.copilot.chat.cloudAgent.enabled",
50105023
"capabilities": {
50115024
"supportsFileAttachments": true
50125025
}

package.nls.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,8 @@
400400
"github.copilot.config.claudeCode.debug": "Enable debug mode for Claude Code agent.",
401401
"github.copilot.config.cli.customAgents.enabled": "Enable Custom Agents for Background Agents.",
402402
"github.copilot.config.cli.mcp.enabled": "Enable Model Context Protocol (MCP) server for Background Agents.",
403-
"github.copilot.config.copilotCodingAgent.enabled": "Enable Copilot Coding Agent (cloud).",
403+
"github.copilot.config.backgroundAgent.enabled": "Enable the Background Agent. When disabled, the Background Agent will not be available in 'Continue In' context menus.",
404+
"github.copilot.config.cloudAgent.enabled": "Enable the Cloud Agent. When disabled, the Cloud Agent will not be available in 'Continue In' context menus.",
404405
"github.copilot.config.gpt5AlternativePatch": "Enable GPT-5 alternative patch format.",
405406
"github.copilot.config.inlineEdits.triggerOnEditorChangeAfterSeconds": "Trigger inline edits after editor has been idle for this many seconds.",
406407
"github.copilot.config.inlineEdits.nextCursorPrediction.displayLine": "Display predicted cursor line for next edit suggestions.",

src/platform/configuration/common/configurationService.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,9 @@ export namespace ConfigKey {
893893
export const GitHubMcpToolsets = defineSetting<string[]>('chat.githubMcpServer.toolsets', ConfigType.Simple, ['default']);
894894
export const GitHubMcpReadonly = defineSetting<boolean>('chat.githubMcpServer.readonly', ConfigType.Simple, false);
895895
export const GitHubMcpLockdown = defineSetting<boolean>('chat.githubMcpServer.lockdown', ConfigType.Simple, false);
896+
897+
export const BackgroundAgentEnabled = defineSetting<boolean>('chat.backgroundAgent.enabled', ConfigType.Simple, true);
898+
export const CloudAgentEnabled = defineSetting<boolean>('chat.cloudAgent.enabled', ConfigType.Simple, true);
896899
}
897900

898901
export function getAllConfigKeys(): string[] {

0 commit comments

Comments
 (0)