Skip to content

Commit 1c0ba9b

Browse files
Adds gates and deeplink command support
1 parent fba31e3 commit 1c0ba9b

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

docs/links.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ _{prefix}/command/{command}_
274274

275275
- _inspect_ - Runs the `GitLens: Inspect Commit Details` command.
276276

277+
- _install-mcp_ - Runs the `GitLens: Install MCP` command.
278+
277279
- _launchpad_ - Runs the `GitLens: Show Launchpad` command.
278280

279281
- _walkthrough_ - Runs the `GitLens: Get Started` command.

src/env/node/gk/cli/integration.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { registerCommand } from '../../../../system/-webview/command';
77
import { configuration } from '../../../../system/-webview/configuration';
88
import { getContext } from '../../../../system/-webview/context';
99
import { openUrl } from '../../../../system/-webview/vscode/uris';
10+
import { gate } from '../../../../system/decorators/gate';
1011
import { Logger } from '../../../../system/logger';
1112
import { getLogScope } from '../../../../system/logger.scope';
1213
import { compare } from '../../../../system/version';
@@ -76,6 +77,7 @@ export class GkCliIntegrationProvider implements Disposable {
7677
this._runningDisposable = undefined;
7778
}
7879

80+
@gate()
7981
private async installMCP(): Promise<void> {
8082
const scope = getLogScope();
8183
try {
@@ -168,6 +170,7 @@ export class GkCliIntegrationProvider implements Disposable {
168170
}
169171
}
170172

173+
@gate()
171174
private async setupMCPInstallation(autoInstall?: boolean): Promise<void> {
172175
try {
173176
if (

src/uris/deepLinks/deepLink.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export enum DeepLinkCommandType {
2424
Graph = 'graph',
2525
Home = 'home',
2626
Inspect = 'inspect',
27+
InstallMCP = 'install-mcp',
2728
Launchpad = 'launchpad',
2829
Walkthrough = 'walkthrough',
2930
Worktrees = 'worktrees',
@@ -41,6 +42,7 @@ export const DeepLinkCommandTypeToCommand = new Map<DeepLinkCommandType, GlComma
4142
[DeepLinkCommandType.Launchpad, 'gitlens.showLaunchpad'],
4243
[DeepLinkCommandType.Walkthrough, 'gitlens.getStarted'],
4344
[DeepLinkCommandType.Worktrees, 'gitlens.showWorktreesView'],
45+
[DeepLinkCommandType.InstallMCP, 'gitlens.ai.mcp.install'],
4446
]);
4547

4648
export enum DeepLinkActionType {

0 commit comments

Comments
 (0)