Skip to content

Commit e8573be

Browse files
Adds gates and deeplink command support
1 parent e4e42f8 commit e8573be

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
- _login_ - Runs the `GitLens: Sign In to GitKraken...` command.
278280

279281
- _signup_ - Runs the `GitLens: Sign Up for GitKraken...` 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
@@ -25,6 +25,7 @@ export enum DeepLinkCommandType {
2525
Graph = 'graph',
2626
Home = 'home',
2727
Inspect = 'inspect',
28+
InstallMCP = 'install-mcp',
2829
Launchpad = 'launchpad',
2930
Login = 'login',
3031
SignUp = 'signup',
@@ -46,6 +47,7 @@ export const DeepLinkCommandTypeToCommand = new Map<DeepLinkCommandType, GlComma
4647
[DeepLinkCommandType.SignUp, 'gitlens.plus.signUp'],
4748
[DeepLinkCommandType.Walkthrough, 'gitlens.getStarted'],
4849
[DeepLinkCommandType.Worktrees, 'gitlens.showWorktreesView'],
50+
[DeepLinkCommandType.InstallMCP, 'gitlens.ai.mcp.install'],
4951
]);
5052

5153
export enum DeepLinkActionType {

0 commit comments

Comments
 (0)