Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/extension/getting-started/vscode-node/commands.ts
13399 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
import * as vscode from 'vscode';
6
import { Disposable } from '../../../util/vs/base/common/lifecycle';
7
8
export class WalkthroughCommandContribution extends Disposable {
9
constructor() {
10
super();
11
this._register(vscode.commands.registerCommand('github.copilot.open.walkthrough', () => {
12
vscode.commands.executeCommand('workbench.action.openWalkthrough', { category: 'GitHub.copilot-chat#copilotWelcome' }, /* toSide */ false);
13
}));
14
15
this._register(vscode.commands.registerCommand('github.copilot.mcp.viewContext7', () => {
16
const isInsiders = vscode.env.appName.includes('Insiders');
17
const scheme = isInsiders ? 'vscode-insiders' : 'vscode';
18
19
const mcpInstallParams = {
20
name: 'context7',
21
gallery: true,
22
command: 'npx',
23
args: ['-y', '@upstash/context7-mcp@latest']
24
};
25
26
const encodedParams = encodeURIComponent(JSON.stringify(mcpInstallParams));
27
const context7InstallUrl = `${scheme}:mcp/install?${encodedParams}`;
28
vscode.env.openExternal(vscode.Uri.parse(context7InstallUrl));
29
}));
30
}
31
}
32
33