Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4540,6 +4540,14 @@
"advanced"
]
},
"github.copilot.chat.cli.aiGenerateBranchNames.enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "%github.copilot.config.cli.aiGenerateBranchNames.enabled%",
"tags": [
"advanced"
]
},
"github.copilot.chat.cli.forkSessions.enabled": {
"type": "boolean",
"default": false,
Expand Down
1 change: 1 addition & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@
"github.copilot.config.cli.branchSupport.enabled": "Enable branch support for Copilot CLI.",
"github.copilot.config.cli.forkSessions.enabled": "Enable forking sessions in Copilot CLI.",
"github.copilot.config.cli.planExitMode.enabled": "Enable Plan Mode exit handling in Copilot CLI.",
"github.copilot.config.cli.aiGenerateBranchNames.enabled": "Enable AI-generated branch names in Copilot CLI.",
"github.copilot.config.cli.isolationOption.enabled": "Enable the isolation mode option for Copilot CLI. When enabled, users can choose between Worktree and Workspace modes.",
"github.copilot.config.cli.autoCommit.enabled": "Enable automatic commit for Copilot CLI. When enabled, changes made by Copilot CLI will be automatically committed to the repository at the end of each turn.",
"github.copilot.config.cli.sessionController.enabled": "Enable the new session controller API for Copilot CLI. Requires VS Code reload.",
Expand Down
5 changes: 4 additions & 1 deletion src/extension/chatSessions/vscode-node/chatSessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ export class ChatSessionsContrib extends Disposable implements IExtensionContrib
const gitService = copilotcliAgentInstaService.invokeFunction(accessor => accessor.get(IGitService));
const sessionTracker = copilotcliAgentInstaService.invokeFunction(accessor => accessor.get(ICopilotCLISessionTracker));
const terminalIntegration = copilotcliAgentInstaService.invokeFunction(accessor => accessor.get(ICopilotCLITerminalIntegration));
const branchNameGenerator = copilotcliAgentInstaService.createInstance(GitBranchNameGenerator);
const aiGeneratedBranchNames = instantiationService.invokeFunction(accessor =>
accessor.get(IConfigurationService).getConfig(ConfigKey.Advanced.CLIAIGenerateBranchNames)
);
const branchNameGenerator = aiGeneratedBranchNames ? copilotcliAgentInstaService.createInstance(GitBranchNameGenerator) : undefined;
Comment thread
DonJayamanne marked this conversation as resolved.

const copilotcliChatSessionParticipant = this._register(copilotcliAgentInstaService.createInstance(
CopilotCLIChatSessionParticipant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ export class CopilotCLIChatSessionParticipant extends Disposable {
private readonly contentProvider: CopilotCLIChatSessionContentProvider,
private readonly promptResolver: CopilotCLIPromptResolver,
private readonly cloudSessionProvider: CopilotCloudSessionsProvider | undefined,
private readonly branchNameGenerator: GitBranchNameGenerator,
private readonly branchNameGenerator: GitBranchNameGenerator | undefined,
@IGitService private readonly gitService: IGitService,
@ICopilotCLIModels private readonly copilotCLIModels: ICopilotCLIModels,
@ICopilotCLIAgents private readonly copilotCLIAgents: ICopilotCLIAgents,
Expand Down Expand Up @@ -1043,7 +1043,7 @@ export class CopilotCLIChatSessionParticipant extends Disposable {
history: [requestTurn],
yieldRequested: false,
};
const branchNamePromise = isNewSession && request.prompt ? this.branchNameGenerator.generateBranchName(fakeContext, token) : Promise.resolve(undefined);
const branchNamePromise = (isNewSession && request.prompt && this.branchNameGenerator) ? this.branchNameGenerator.generateBranchName(fakeContext, token) : Promise.resolve(undefined);
Comment thread
DonJayamanne marked this conversation as resolved.
const [model, agent] = await Promise.all([
this.getModelId(request, token),
this.getAgent(id, request, token),
Expand Down
1 change: 1 addition & 0 deletions src/platform/configuration/common/configurationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ export namespace ConfigKey {
export const UseResponsesApiTruncation = defineAndMigrateSetting<boolean | undefined>('chat.advanced.useResponsesApiTruncation', 'chat.useResponsesApiTruncation', false);
export const OmitBaseAgentInstructions = defineAndMigrateSetting<boolean>('chat.advanced.omitBaseAgentInstructions', 'chat.omitBaseAgentInstructions', false);
export const CLIPlanExitModeEnabled = defineSetting<boolean>('chat.cli.planExitMode.enabled', ConfigType.Simple, false);
export const CLIAIGenerateBranchNames = defineSetting<boolean>('chat.cli.aiGenerateBranchNames.enabled', ConfigType.Simple, false);
export const CLIForkSessionsEnabled = defineSetting<boolean>('chat.cli.forkSessions.enabled', ConfigType.Simple, false);
export const CLIMCPServerEnabled = defineAndMigrateSetting<boolean | undefined>('chat.advanced.cli.mcp.enabled', 'chat.cli.mcp.enabled', true);
export const CLIBranchSupport = defineSetting<boolean>('chat.cli.branchSupport.enabled', ConfigType.Simple, false);
Expand Down