You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return{error: vscode.l10n.t('Uncommitted changes detected. Please commit or stash your changes before starting the remote agent. Enable \'{0}\' to push your changes automatically.',CODING_AGENT_AUTO_COMMIT_AND_PUSH),state: 'error'};
314
317
}
@@ -346,6 +349,21 @@ export class CopilotRemoteAgentManager extends Disposable {
346
349
}
347
350
}
348
351
352
+
constbase_ref=hasChanges ? baseRef : ref;
353
+
try{
354
+
if(!(awaitghRepository.hasBranch(base_ref))){
355
+
if(!this.autoCommitAndPushEnabled()){
356
+
// We won't auto-push a branch if the user has disabled the setting
357
+
return{error: vscode.l10n.t('The branch \'{0}\' does not exist on the remote repository \'{1}/{2}\'. Please create the remote branch first.',base_ref,owner,repo),state: 'error'};
358
+
}
359
+
// Push the branch
360
+
Logger.appendLine(`Base ref needs to exist on remote. Auto pushing base_ref '${base_ref}' to remote repository '${owner}/${repo}'`,CopilotRemoteAgentManager.ID);
return{error: vscode.l10n.t('Failed to configure base branch \'{0}\' does not exist on the remote repository \'{1}/{2}\'. Please create the remote branch first.',base_ref,owner,repo),state: 'error'};
0 commit comments