Skip to content

Commit c82f9bf

Browse files
committed
Adds source.detail to deeplinked commands
1 parent dea1933 commit c82f9bf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

docs/links.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ Used to run a GitLens command.
261261

262262
#### Format
263263

264-
_{prefix}/command/{command}_
264+
_{prefix}/command/{command}(?source={source})_
265265

266266
#### References
267267

@@ -286,6 +286,8 @@ _{prefix}/command/{command}_
286286

287287
- _worktrees_ - Runs the `GitLens: Show Worktrees View` command.
288288

289+
- _{source}_ is an optional parameter representing the `source.detail` for the command's telemetry.
290+
289291
#### Example Usage
290292

291293
External sources, such as GitKraken web pages, can use these links to directly run a GitLens command - for example, to show the Launchpad.

src/uris/deepLinks/deepLinkService.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1541,7 +1541,10 @@ export class DeepLinkService implements Disposable {
15411541
break;
15421542
}
15431543

1544-
await executeCommand(command, { source: 'deeplink' });
1544+
const detail = this._context.params?.get('source');
1545+
const source = detail != null ? { source: 'deeplink', detail: detail } : { source: 'deeplink' };
1546+
1547+
await executeCommand(command, source);
15451548
action = DeepLinkServiceAction.DeepLinkResolved;
15461549
break;
15471550
}

0 commit comments

Comments
 (0)