@@ -23,7 +23,7 @@ import { getPlatform } from '@env/platform';
2323import type { OpenWalkthroughCommandArgs } from '../../commands/walkthroughs' ;
2424import { urls } from '../../constants' ;
2525import type { CoreColors } from '../../constants.colors' ;
26- import { GlCommand } from '../../constants.commands' ;
26+ import type { GlCommands } from '../../constants.commands' ;
2727import type { StoredFeaturePreviewUsagePeriod } from '../../constants.storage' ;
2828import {
2929 proFeaturePreviewUsageDurationInDays ,
@@ -51,6 +51,7 @@ import { executeCommand, registerCommand } from '../../system/-webview/command';
5151import { configuration } from '../../system/-webview/configuration' ;
5252import { setContext } from '../../system/-webview/context' ;
5353import { openUrl } from '../../system/-webview/vscode' ;
54+ import { createCommandLink } from '../../system/commands' ;
5455import { createFromDateDelta , fromNow } from '../../system/date' ;
5556import { gate } from '../../system/decorators/-webview/gate' ;
5657import { debug , log } from '../../system/decorators/log' ;
@@ -339,24 +340,24 @@ export class SubscriptionService implements Disposable {
339340
340341 private registerCommands ( ) : Disposable [ ] {
341342 return [
342- registerCommand ( GlCommand . PlusLogin , ( src ?: Source ) => this . loginOrSignUp ( false , src ) ) ,
343- registerCommand ( GlCommand . PlusSignUp , ( src ?: Source ) => this . loginOrSignUp ( true , src ) ) ,
344- registerCommand ( GlCommand . PlusLogout , ( src ?: Source ) => this . logout ( src ) ) ,
345- registerCommand ( GlCommand . GKSwitchOrganization , ( src ?: Source ) => this . switchOrganization ( src ) ) ,
343+ registerCommand ( 'gitlens.plus.login' , ( src ?: Source ) => this . loginOrSignUp ( false , src ) ) ,
344+ registerCommand ( 'gitlens.plus.signUp' , ( src ?: Source ) => this . loginOrSignUp ( true , src ) ) ,
345+ registerCommand ( 'gitlens.plus.logout' , ( src ?: Source ) => this . logout ( src ) ) ,
346+ registerCommand ( 'gitlens.gk.switchOrganization' , ( src ?: Source ) => this . switchOrganization ( src ) ) ,
346347
347- registerCommand ( GlCommand . PlusManage , ( src ?: Source ) => this . manage ( src ) ) ,
348- registerCommand ( GlCommand . PlusShowPlans , ( src ?: Source ) => this . showPlans ( src ) ) ,
349- registerCommand ( GlCommand . PlusStartPreviewTrial , ( src ?: Source ) => this . startPreviewTrial ( src ) ) ,
350- registerCommand ( GlCommand . PlusReactivateProTrial , ( src ?: Source ) => this . reactivateProTrial ( src ) ) ,
351- registerCommand ( GlCommand . PlusResendVerification , ( src ?: Source ) => this . resendVerification ( src ) ) ,
352- registerCommand ( GlCommand . PlusUpgrade , ( src ?: Source ) => this . upgrade ( src ) ) ,
348+ registerCommand ( 'gitlens.plus.manage' , ( src ?: Source ) => this . manage ( src ) ) ,
349+ registerCommand ( 'gitlens.plus.showPlans' , ( src ?: Source ) => this . showPlans ( src ) ) ,
350+ registerCommand ( 'gitlens.plus.startPreviewTrial' , ( src ?: Source ) => this . startPreviewTrial ( src ) ) ,
351+ registerCommand ( 'gitlens.plus.reactivateProTrial' , ( src ?: Source ) => this . reactivateProTrial ( src ) ) ,
352+ registerCommand ( 'gitlens.plus.resendVerification' , ( src ?: Source ) => this . resendVerification ( src ) ) ,
353+ registerCommand ( 'gitlens.plus.upgrade' , ( src ?: Source ) => this . upgrade ( src ) ) ,
353354
354- registerCommand ( GlCommand . PlusHide , ( src ?: Source ) => this . setProFeaturesVisibility ( false , src ) ) ,
355- registerCommand ( GlCommand . PlusRestore , ( src ?: Source ) => this . setProFeaturesVisibility ( true , src ) ) ,
355+ registerCommand ( 'gitlens.plus.hide' , ( src ?: Source ) => this . setProFeaturesVisibility ( false , src ) ) ,
356+ registerCommand ( 'gitlens.plus.restore' , ( src ?: Source ) => this . setProFeaturesVisibility ( true , src ) ) ,
356357
357- registerCommand ( GlCommand . PlusValidate , ( src ?: Source ) => this . validate ( { force : true } , src ) ) ,
358+ registerCommand ( 'gitlens.plus.validate' , ( src ?: Source ) => this . validate ( { force : true } , src ) ) ,
358359
359- registerCommand ( GlCommand . PlusContinueFeaturePreview , ( { feature } : { feature : FeaturePreviews } ) =>
360+ registerCommand ( 'gitlens.plus.continueFeaturePreview' , ( { feature } : { feature : FeaturePreviews } ) =>
360361 this . continueFeaturePreview ( feature ) ,
361362 ) ,
362363 ] ;
@@ -797,7 +798,7 @@ export class SubscriptionService implements Disposable {
797798 if ( silent && ! configuration . get ( 'plusFeatures.enabled' , undefined , true ) ) return ;
798799
799800 if ( ! this . container . views . home . visible ) {
800- await executeCommand ( GlCommand . ShowAccountView ) ;
801+ await executeCommand ( 'gitlens.showAccountView' ) ;
801802 }
802803 }
803804
@@ -855,7 +856,10 @@ export class SubscriptionService implements Disposable {
855856 const result = await window . showInformationMessage (
856857 `You can now preview local Pro features for ${
857858 days < 1 ? '1 day' : pluralize ( 'day' , days )
858- } , or for full access to all GitLens Pro features, [start your free ${ proTrialLengthInDays } -day Pro trial](command:gitlens.plus.signUp "Try GitLens Pro") — no credit card required.`,
859+ } , or for full access to all GitLens Pro features, [start your free ${ proTrialLengthInDays } -day Pro trial](${ createCommandLink < Source > (
860+ 'gitlens.plus.signUp' ,
861+ source ,
862+ ) } "Try GitLens Pro") — no credit card required.`,
859863 confirm ,
860864 learn ,
861865 ) ;
@@ -1587,7 +1591,7 @@ export class SubscriptionService implements Disposable {
15871591
15881592 this . _statusBarSubscription . name = 'GitLens Pro' ;
15891593 this . _statusBarSubscription . text = '$(gitlens-gitlens)' ;
1590- this . _statusBarSubscription . command = GlCommand . ShowAccountView ;
1594+ this . _statusBarSubscription . command = 'gitlens.showAccountView' satisfies GlCommands ;
15911595 this . _statusBarSubscription . backgroundColor = undefined ;
15921596
15931597 if ( account ?. verified === false ) {
0 commit comments