Path: blob/main/extensions/copilot/src/extension/chatSessions/copilotcli/vscode-node/commands/addSelection.ts
13406 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*--------------------------------------------------------------------------------------------*/45import * as vscode from 'vscode';6import { ILogger } from '../../../../../platform/log/common/logService';7import { ICopilotCLISessionTracker } from '../copilotCLISessionTracker';8import { InProcHttpServer } from '../inProcHttpServer';9import { sendEditorContextToSession } from './sendContext';1011export const ADD_SELECTION_COMMAND = 'github.copilot.chat.copilotCLI.addSelection';1213export function registerAddSelectionCommand(logger: ILogger, httpServer: InProcHttpServer, sessionTracker: ICopilotCLISessionTracker): vscode.Disposable {14return vscode.commands.registerCommand(ADD_SELECTION_COMMAND, async () => {15logger.debug('Add selection command executed');16await sendEditorContextToSession(logger, httpServer, sessionTracker);17});18}192021