Revert "Introduce share links in more places via a contrib" (#177328)

Revert "Introduce share links in more places via a contrib (#177311)"

This reverts commit e9ff97aa0f.
This commit is contained in:
Johannes Rieken
2023-03-16 11:27:25 +01:00
committed by GitHub
parent 4c53c189a1
commit 1db217a0e2
11 changed files with 78 additions and 152 deletions

View File

@@ -45,10 +45,7 @@ export function registerCommands(gitAPI: GitAPI): vscode.Disposable {
}
}));
disposables.add(vscode.commands.registerCommand('github.copyVscodeDevLink', async (context: LinkContext, ranges?: vscode.Range[]) => {
if (Array.isArray(ranges) && ranges.every((range) => 'start' in range && 'end' in range) && context instanceof vscode.Uri) {
context = { uri: context, ranges };
}
disposables.add(vscode.commands.registerCommand('github.copyVscodeDevLink', async (context: LinkContext) => {
return copyVscodeDevLink(gitAPI, true, context);
}));
@@ -56,6 +53,10 @@ export function registerCommands(gitAPI: GitAPI): vscode.Disposable {
return copyVscodeDevLink(gitAPI, false, context);
}));
disposables.add(vscode.commands.registerCommand('github.copyVscodeDevLinkWithoutRange', async (context: LinkContext) => {
return copyVscodeDevLink(gitAPI, true, context, false);
}));
disposables.add(vscode.commands.registerCommand('github.openOnVscodeDev', async () => {
return openVscodeDevLink(gitAPI);
}));