diff --git a/docs/links.md b/docs/links.md index 25e92ab9fe76c..fd209803a11b6 100644 --- a/docs/links.md +++ b/docs/links.md @@ -270,10 +270,18 @@ _{prefix}/command/{command}_ - _{command}_ is the name of the command to run. Currently supported values include: + - _cloud-patches_ - Runs the `GitLens: Show Cloud Patches View` command. + + - _graph_ - Runs the `GitLens: Show Graph` command. + + - _inspect_ - Runs the `GitLens: Inspect Commit Details` command. + - _launchpad_ - Runs the `GitLens: Show Launchpad` command. - _walkthrough_ - Runs the `GitLens: Get Started` command. + - _worktrees_ - Runs the `GitLens: Show Worktrees View` command. + #### Example Usage External sources, such as GitKraken web pages, can use these links to directly run a GitLens command - for example, to show the Launchpad. diff --git a/src/uris/deepLinks/deepLink.ts b/src/uris/deepLinks/deepLink.ts index 72df6dcc5ee28..c9457b69272eb 100644 --- a/src/uris/deepLinks/deepLink.ts +++ b/src/uris/deepLinks/deepLink.ts @@ -20,8 +20,12 @@ export enum DeepLinkType { } export enum DeepLinkCommandType { + CloudPatches = 'cloud-patches', + Graph = 'graph', + Inspect = 'inspect', Launchpad = 'launchpad', Walkthrough = 'walkthrough', + Worktrees = 'worktrees', } export function isDeepLinkCommandType(type: string): type is DeepLinkCommandType { @@ -29,8 +33,12 @@ export function isDeepLinkCommandType(type: string): type is DeepLinkCommandType } export const DeepLinkCommandTypeToCommand = new Map([ + [DeepLinkCommandType.CloudPatches, Commands.ShowDraftsView], + [DeepLinkCommandType.Graph, Commands.ShowGraph], + [DeepLinkCommandType.Inspect, Commands.ShowCommitDetailsView], [DeepLinkCommandType.Launchpad, Commands.ShowLaunchpad], [DeepLinkCommandType.Walkthrough, Commands.GetStarted], + [DeepLinkCommandType.Worktrees, Commands.ShowWorktreesView], ]); export enum DeepLinkActionType {