Skip to content

Commit 519b43d

Browse files
authored
update modal (again) (#7103)
1 parent dec82ba commit 519b43d

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

src/github/copilotRemoteAgent.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ export interface IAPISessionLogs {
2424
logs: string;
2525
}
2626

27+
const PUSH_CHANGES = vscode.l10n.t('Include changes');
28+
const CONTINUE_WITHOUT_PUSHING = vscode.l10n.t('Ignore changes');
29+
const LEARN_MORE = vscode.l10n.t('Learn about Coding Agent');
30+
2731
export class CopilotRemoteAgentManager extends Disposable {
2832
public static ID = 'CopilotRemoteAgentManager';
2933
private readonly workflowRunUrlBase = 'https://github.com/microsoft/vscode/actions/runs/';
@@ -119,28 +123,33 @@ export class CopilotRemoteAgentManager extends Disposable {
119123
if (!repoInfo) {
120124
return;
121125
}
122-
const { repository } = repoInfo;
126+
const { repository, owner, repo } = repoInfo;
127+
const repoName = `${owner}/${repo}`; // TODO: Make sure this is where we'll push to
123128

124129
const hasChanges = repository.state.workingTreeChanges.length > 0 || repository.state.indexChanges.length > 0;
125-
const PUSH_CHANGES = vscode.l10n.t('Include uncommitted changes');
126-
const CONTINUE_WITHOUT_PUSHING = vscode.l10n.t('Start from \'{0}\'', `${repoInfo.remote}/${repoInfo.baseRef}`);
127130

128131
let autoPushAndCommit = false;
129132
if (hasChanges && this.autoCommitAndPushEnabled()) {
130133
const modalResult = await vscode.window.showInformationMessage(
131-
vscode.l10n.t('Coding Agent'),
134+
vscode.l10n.t('GitHub Coding Agent will continue your work in \'{0}\'', repoName),
132135
{
133136
modal: true,
134-
detail: vscode.l10n.t('Coding agent will continue your work in \'{0}\' targetting \'{1}\'.', `${repoInfo.owner}/${repoInfo.repo}`, `${repoInfo.remote}/${repoInfo.baseRef}`),
137+
detail: vscode.l10n.t('Uncommitted local changes detected'),
135138
},
136139
PUSH_CHANGES,
137140
CONTINUE_WITHOUT_PUSHING,
141+
LEARN_MORE,
138142
);
139143

140144
if (!modalResult) {
141145
return;
142146
}
143147

148+
if (modalResult === LEARN_MORE) {
149+
vscode.env.openExternal(vscode.Uri.parse('https://docs.github.com/copilot/using-github-copilot/coding-agent'));
150+
return;
151+
}
152+
144153
if (modalResult === PUSH_CHANGES) {
145154
autoPushAndCommit = true;
146155
}

0 commit comments

Comments
 (0)