Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/extension/linkify/common/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
6
import { UriComponents } from '../../../util/vs/base/common/uri';
7
8
// TODO: keep these commands around for backwards compatibility, but remove them in the future
9
export const openFileLinkCommand = '_github.copilot.openRelativePath';
10
export type OpenFileLinkCommandArgs = [path: string | UriComponents, requestId?: string];
11
12
export const openSymbolInFileCommand = '_github.copilot.openSymbolInFile';
13
export type OpenSymbolInFileCommandArgs = [inFileUri: UriComponents, symbolText: string, requestId?: string];
14
15
export function commandUri(command: string, args: readonly any[]): string {
16
return `command:${command}?${encodeURIComponent(JSON.stringify(args))}`;
17
}
18
19