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