Skip to content

Commit 1f8ffaa

Browse files
committed
Removes command enums
1 parent ce1a631 commit 1f8ffaa

File tree

4 files changed

+96
-99
lines changed

4 files changed

+96
-99
lines changed

src/codelens/codeLensProvider.ts

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ import type { ShowQuickCommitCommandArgs } from '../commands/showQuickCommit';
1717
import type { ShowQuickCommitFileCommandArgs } from '../commands/showQuickCommitFile';
1818
import type { ShowQuickFileHistoryCommandArgs } from '../commands/showQuickFileHistory';
1919
import type { ToggleFileChangesAnnotationCommandArgs } from '../commands/toggleFileAnnotations';
20-
import type { CodeLensConfig, CodeLensLanguageScope } from '../config';
21-
import { CodeLensCommand } from '../config';
20+
import type { CodeLensCommands, CodeLensConfig, CodeLensLanguageScope } from '../config';
2221
import { trackableSchemes } from '../constants';
2322
import type { GlCommands } from '../constants.commands';
2423
import type { Container } from '../container';
@@ -45,7 +44,7 @@ class GitRecentChangeCodeLens extends CodeLens {
4544
public readonly blameRange: Range,
4645
public readonly isFullRange: boolean,
4746
range: Range,
48-
public readonly desiredCommand: CodeLensCommand | false,
47+
public readonly desiredCommand: CodeLensCommands | false,
4948
command?: Command | undefined,
5049
) {
5150
super(range, command);
@@ -65,7 +64,7 @@ class GitAuthorsCodeLens extends CodeLens {
6564
public readonly blameRange: Range,
6665
public readonly isFullRange: boolean,
6766
range: Range,
68-
public readonly desiredCommand: CodeLensCommand | false,
67+
public readonly desiredCommand: CodeLensCommands | false,
6968
) {
7069
super(range);
7170
}
@@ -500,35 +499,35 @@ export class GitCodeLensProvider implements CodeLensProvider, Disposable {
500499
}
501500

502501
switch (lens.desiredCommand) {
503-
case CodeLensCommand.CopyRemoteCommitUrl:
502+
case 'gitlens.copyRemoteCommitUrl' satisfies CodeLensCommands:
504503
return applyCopyOrOpenCommitOnRemoteCommand<GitRecentChangeCodeLens>(title, lens, recentCommit, true);
505-
case CodeLensCommand.CopyRemoteFileUrl:
504+
case 'gitlens.copyRemoteFileUrl' satisfies CodeLensCommands:
506505
return applyCopyOrOpenFileOnRemoteCommand<GitRecentChangeCodeLens>(title, lens, recentCommit, true);
507-
case CodeLensCommand.DiffWithPrevious:
506+
case 'gitlens.diffWithPrevious' satisfies CodeLensCommands:
508507
return applyDiffWithPreviousCommand<GitRecentChangeCodeLens>(title, lens, recentCommit);
509-
case CodeLensCommand.OpenCommitOnRemote:
508+
case 'gitlens.openCommitOnRemote' satisfies CodeLensCommands:
510509
return applyCopyOrOpenCommitOnRemoteCommand<GitRecentChangeCodeLens>(title, lens, recentCommit);
511-
case CodeLensCommand.OpenFileOnRemote:
510+
case 'gitlens.openFileOnRemote' satisfies CodeLensCommands:
512511
return applyCopyOrOpenFileOnRemoteCommand<GitRecentChangeCodeLens>(title, lens, recentCommit);
513-
case CodeLensCommand.RevealCommitInView:
512+
case 'gitlens.revealCommitInView' satisfies CodeLensCommands:
514513
return applyRevealCommitInViewCommand<GitRecentChangeCodeLens>(title, lens, recentCommit);
515-
case CodeLensCommand.ShowCommitsInView:
514+
case 'gitlens.showCommitsInView' satisfies CodeLensCommands:
516515
return applyShowCommitsInViewCommand<GitRecentChangeCodeLens>(title, lens, blame, recentCommit);
517-
case CodeLensCommand.ShowQuickCommitDetails:
516+
case 'gitlens.showQuickCommitDetails' satisfies CodeLensCommands:
518517
return applyShowQuickCommitDetailsCommand<GitRecentChangeCodeLens>(title, lens, recentCommit);
519-
case CodeLensCommand.ShowQuickCommitFileDetails:
518+
case 'gitlens.showQuickCommitFileDetails' satisfies CodeLensCommands:
520519
return applyShowQuickCommitFileDetailsCommand<GitRecentChangeCodeLens>(title, lens, recentCommit);
521-
case CodeLensCommand.ShowQuickCurrentBranchHistory:
520+
case 'gitlens.showQuickRepoHistory' satisfies CodeLensCommands:
522521
return applyShowQuickCurrentBranchHistoryCommand<GitRecentChangeCodeLens>(title, lens);
523-
case CodeLensCommand.ShowQuickFileHistory:
522+
case 'gitlens.showQuickFileHistory' satisfies CodeLensCommands:
524523
return applyShowQuickFileHistoryCommand<GitRecentChangeCodeLens>(title, lens);
525-
case CodeLensCommand.ToggleFileBlame:
524+
case 'gitlens.toggleFileBlame' satisfies CodeLensCommands:
526525
return applyToggleFileBlameCommand<GitRecentChangeCodeLens>(title, lens);
527-
case CodeLensCommand.ToggleFileChanges:
526+
case 'gitlens.toggleFileChanges' satisfies CodeLensCommands:
528527
return applyToggleFileChangesCommand<GitRecentChangeCodeLens>(title, lens, recentCommit);
529-
case CodeLensCommand.ToggleFileChangesOnly:
528+
case 'gitlens.toggleFileChangesOnly' satisfies CodeLensCommands:
530529
return applyToggleFileChangesCommand<GitRecentChangeCodeLens>(title, lens, recentCommit, true);
531-
case CodeLensCommand.ToggleFileHeatmap:
530+
case 'gitlens.toggleFileHeatmap' satisfies CodeLensCommands:
532531
return applyToggleFileHeatmapCommand<GitRecentChangeCodeLens>(title, lens);
533532
default:
534533
return lens;
@@ -566,35 +565,35 @@ export class GitCodeLensProvider implements CodeLensProvider, Disposable {
566565
if (commit == null) return applyCommandWithNoClickAction(title, lens);
567566

568567
switch (lens.desiredCommand) {
569-
case CodeLensCommand.CopyRemoteCommitUrl:
568+
case 'gitlens.copyRemoteCommitUrl' satisfies CodeLensCommands:
570569
return applyCopyOrOpenCommitOnRemoteCommand<GitAuthorsCodeLens>(title, lens, commit, true);
571-
case CodeLensCommand.CopyRemoteFileUrl:
570+
case 'gitlens.copyRemoteFileUrl' satisfies CodeLensCommands:
572571
return applyCopyOrOpenFileOnRemoteCommand<GitAuthorsCodeLens>(title, lens, commit, true);
573-
case CodeLensCommand.DiffWithPrevious:
572+
case 'gitlens.diffWithPrevious' satisfies CodeLensCommands:
574573
return applyDiffWithPreviousCommand<GitAuthorsCodeLens>(title, lens, commit);
575-
case CodeLensCommand.OpenCommitOnRemote:
574+
case 'gitlens.openCommitOnRemote' satisfies CodeLensCommands:
576575
return applyCopyOrOpenCommitOnRemoteCommand<GitAuthorsCodeLens>(title, lens, commit);
577-
case CodeLensCommand.OpenFileOnRemote:
576+
case 'gitlens.openFileOnRemote' satisfies CodeLensCommands:
578577
return applyCopyOrOpenFileOnRemoteCommand<GitAuthorsCodeLens>(title, lens, commit);
579-
case CodeLensCommand.RevealCommitInView:
578+
case 'gitlens.revealCommitInView' satisfies CodeLensCommands:
580579
return applyRevealCommitInViewCommand<GitAuthorsCodeLens>(title, lens, commit);
581-
case CodeLensCommand.ShowCommitsInView:
580+
case 'gitlens.showCommitsInView' satisfies CodeLensCommands:
582581
return applyShowCommitsInViewCommand<GitAuthorsCodeLens>(title, lens, blame);
583-
case CodeLensCommand.ShowQuickCommitDetails:
582+
case 'gitlens.showQuickCommitDetails' satisfies CodeLensCommands:
584583
return applyShowQuickCommitDetailsCommand<GitAuthorsCodeLens>(title, lens, commit);
585-
case CodeLensCommand.ShowQuickCommitFileDetails:
584+
case 'gitlens.showQuickCommitFileDetails' satisfies CodeLensCommands:
586585
return applyShowQuickCommitFileDetailsCommand<GitAuthorsCodeLens>(title, lens, commit);
587-
case CodeLensCommand.ShowQuickCurrentBranchHistory:
586+
case 'gitlens.showQuickRepoHistory' satisfies CodeLensCommands:
588587
return applyShowQuickCurrentBranchHistoryCommand<GitAuthorsCodeLens>(title, lens);
589-
case CodeLensCommand.ShowQuickFileHistory:
588+
case 'gitlens.showQuickFileHistory' satisfies CodeLensCommands:
590589
return applyShowQuickFileHistoryCommand<GitAuthorsCodeLens>(title, lens);
591-
case CodeLensCommand.ToggleFileBlame:
590+
case 'gitlens.toggleFileBlame' satisfies CodeLensCommands:
592591
return applyToggleFileBlameCommand<GitAuthorsCodeLens>(title, lens);
593-
case CodeLensCommand.ToggleFileChanges:
592+
case 'gitlens.toggleFileChanges' satisfies CodeLensCommands:
594593
return applyToggleFileChangesCommand<GitAuthorsCodeLens>(title, lens, commit);
595-
case CodeLensCommand.ToggleFileChangesOnly:
594+
case 'gitlens.toggleFileChangesOnly' satisfies CodeLensCommands:
596595
return applyToggleFileChangesCommand<GitAuthorsCodeLens>(title, lens, commit, true);
597-
case CodeLensCommand.ToggleFileHeatmap:
596+
case 'gitlens.toggleFileHeatmap' satisfies CodeLensCommands:
598597
return applyToggleFileHeatmapCommand<GitAuthorsCodeLens>(title, lens);
599598
default:
600599
return lens;
@@ -668,7 +667,7 @@ function applyRevealCommitInViewCommand<T extends GitRecentChangeCodeLens | GitA
668667
commit: GitCommit | undefined,
669668
): T {
670669
lens.command = createCommand<[Uri, ShowQuickCommitCommandArgs]>(
671-
commit?.isUncommitted ? ('' as CodeLensCommand) : CodeLensCommand.RevealCommitInView,
670+
commit?.isUncommitted ? ('' as CodeLensCommands) : 'gitlens.revealCommitInView',
672671
title,
673672
lens.uri!.toFileUri(),
674673
{
@@ -709,7 +708,7 @@ function applyShowQuickCommitDetailsCommand<T extends GitRecentChangeCodeLens |
709708
commit: GitCommit | undefined,
710709
): T {
711710
lens.command = createCommand<[Uri, ShowQuickCommitCommandArgs]>(
712-
commit?.isUncommitted ? ('' as CodeLensCommand) : CodeLensCommand.ShowQuickCommitDetails,
711+
commit?.isUncommitted ? ('' as CodeLensCommands) : 'gitlens.showQuickCommitDetails',
713712
title,
714713
lens.uri!.toFileUri(),
715714
{
@@ -726,7 +725,7 @@ function applyShowQuickCommitFileDetailsCommand<T extends GitRecentChangeCodeLen
726725
commit: GitCommit | undefined,
727726
): T {
728727
lens.command = createCommand<[Uri, ShowQuickCommitFileCommandArgs]>(
729-
commit?.isUncommitted ? ('' as CodeLensCommand) : CodeLensCommand.ShowQuickCommitFileDetails,
728+
commit?.isUncommitted ? ('' as CodeLensCommands) : 'gitlens.showQuickCommitFileDetails',
730729
title,
731730
lens.uri!.toFileUri(),
732731
{
@@ -741,7 +740,7 @@ function applyShowQuickCurrentBranchHistoryCommand<T extends GitRecentChangeCode
741740
title: string,
742741
lens: T,
743742
): T {
744-
lens.command = createCommand<[Uri]>(CodeLensCommand.ShowQuickCurrentBranchHistory, title, lens.uri!.toFileUri());
743+
lens.command = createCommand<[Uri]>('gitlens.showQuickRepoHistory', title, lens.uri!.toFileUri());
745744
return lens;
746745
}
747746

@@ -750,7 +749,7 @@ function applyShowQuickFileHistoryCommand<T extends GitRecentChangeCodeLens | Gi
750749
lens: T,
751750
): T {
752751
lens.command = createCommand<[Uri, ShowQuickFileHistoryCommandArgs]>(
753-
CodeLensCommand.ShowQuickFileHistory,
752+
'gitlens.showQuickFileHistory',
754753
title,
755754
lens.uri!.toFileUri(),
756755
{

src/config.ts

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,22 @@ export type BlameHighlightLocations = 'gutter' | 'line' | 'overview';
6464
export type BranchSorting = 'date:desc' | 'date:asc' | 'name:asc' | 'name:desc';
6565
export type ChangesLocations = 'gutter' | 'line' | 'overview';
6666

67-
export const enum CodeLensCommand {
68-
CopyRemoteCommitUrl = 'gitlens.copyRemoteCommitUrl',
69-
CopyRemoteFileUrl = 'gitlens.copyRemoteFileUrl',
70-
DiffWithPrevious = 'gitlens.diffWithPrevious',
71-
OpenCommitOnRemote = 'gitlens.openCommitOnRemote',
72-
OpenFileOnRemote = 'gitlens.openFileOnRemote',
73-
RevealCommitInView = 'gitlens.revealCommitInView',
74-
ShowCommitsInView = 'gitlens.showCommitsInView',
75-
ShowQuickCommitDetails = 'gitlens.showQuickCommitDetails',
76-
ShowQuickCommitFileDetails = 'gitlens.showQuickCommitFileDetails',
77-
ShowQuickCurrentBranchHistory = 'gitlens.showQuickRepoHistory',
78-
ShowQuickFileHistory = 'gitlens.showQuickFileHistory',
79-
ToggleFileBlame = 'gitlens.toggleFileBlame',
80-
ToggleFileChanges = 'gitlens.toggleFileChanges',
81-
ToggleFileChangesOnly = 'gitlens.toggleFileChangesOnly',
82-
ToggleFileHeatmap = 'gitlens.toggleFileHeatmap',
83-
}
67+
export type CodeLensCommands =
68+
| 'gitlens.copyRemoteCommitUrl'
69+
| 'gitlens.copyRemoteFileUrl'
70+
| 'gitlens.diffWithPrevious'
71+
| 'gitlens.openCommitOnRemote'
72+
| 'gitlens.openFileOnRemote'
73+
| 'gitlens.revealCommitInView'
74+
| 'gitlens.showCommitsInView'
75+
| 'gitlens.showQuickCommitDetails'
76+
| 'gitlens.showQuickCommitFileDetails'
77+
| 'gitlens.showQuickRepoHistory'
78+
| 'gitlens.showQuickFileHistory'
79+
| 'gitlens.toggleFileBlame'
80+
| 'gitlens.toggleFileChanges'
81+
| 'gitlens.toggleFileChangesOnly'
82+
| 'gitlens.toggleFileHeatmap';
8483

8584
export type CodeLensScopes = 'document' | 'containers' | 'blocks';
8685
export type ContributorSorting =
@@ -131,25 +130,24 @@ type DeprecatedOutputLevel =
131130
| /** @deprecated use `info` */ 'verbose';
132131
export type OutputLevel = LogLevel | DeprecatedOutputLevel;
133132

134-
export const enum StatusBarCommand {
135-
CopyRemoteCommitUrl = 'gitlens.copyRemoteCommitUrl',
136-
CopyRemoteFileUrl = 'gitlens.copyRemoteFileUrl',
137-
DiffWithPrevious = 'gitlens.diffWithPrevious',
138-
DiffWithWorking = 'gitlens.diffWithWorking',
139-
OpenCommitOnRemote = 'gitlens.openCommitOnRemote',
140-
OpenFileOnRemote = 'gitlens.openFileOnRemote',
141-
RevealCommitInView = 'gitlens.revealCommitInView',
142-
ShowCommitsInView = 'gitlens.showCommitsInView',
143-
ShowQuickCommitDetails = 'gitlens.showQuickCommitDetails',
144-
ShowQuickCommitFileDetails = 'gitlens.showQuickCommitFileDetails',
145-
ShowQuickCurrentBranchHistory = 'gitlens.showQuickRepoHistory',
146-
ShowQuickFileHistory = 'gitlens.showQuickFileHistory',
147-
ToggleCodeLens = 'gitlens.toggleCodeLens',
148-
ToggleFileBlame = 'gitlens.toggleFileBlame',
149-
ToggleFileChanges = 'gitlens.toggleFileChanges',
150-
ToggleFileChangesOnly = 'gitlens.toggleFileChangesOnly',
151-
ToggleFileHeatmap = 'gitlens.toggleFileHeatmap',
152-
}
133+
export type StatusBarCommands =
134+
| 'gitlens.copyRemoteCommitUrl'
135+
| 'gitlens.copyRemoteFileUrl'
136+
| 'gitlens.diffWithPrevious'
137+
| 'gitlens.diffWithWorking'
138+
| 'gitlens.openCommitOnRemote'
139+
| 'gitlens.openFileOnRemote'
140+
| 'gitlens.revealCommitInView'
141+
| 'gitlens.showCommitsInView'
142+
| 'gitlens.showQuickCommitDetails'
143+
| 'gitlens.showQuickCommitFileDetails'
144+
| 'gitlens.showQuickRepoHistory'
145+
| 'gitlens.showQuickFileHistory'
146+
| 'gitlens.toggleCodeLens'
147+
| 'gitlens.toggleFileBlame'
148+
| 'gitlens.toggleFileChanges'
149+
| 'gitlens.toggleFileChangesOnly'
150+
| 'gitlens.toggleFileHeatmap';
153151

154152
// NOTE: Must be kept in sync with `gitlens.advanced.messages` setting in the package.json
155153
export type SuppressedMessages =
@@ -295,14 +293,14 @@ interface CloudPatchesConfig {
295293
export interface CodeLensConfig {
296294
readonly authors: {
297295
readonly enabled: boolean;
298-
readonly command: CodeLensCommand | false;
296+
readonly command: CodeLensCommands | false;
299297
};
300298
readonly dateFormat: DateTimeFormat | string | null;
301299
/*readonly*/ enabled: boolean;
302300
readonly includeSingleLineSymbols: boolean;
303301
readonly recentChange: {
304302
readonly enabled: boolean;
305-
readonly command: CodeLensCommand | false;
303+
readonly command: CodeLensCommands | false;
306304
};
307305
readonly scopes: CodeLensScopes[];
308306
readonly scopesByLanguage: CodeLensLanguageScope[] | null;
@@ -652,7 +650,7 @@ export interface RemotesUrlsConfig {
652650

653651
interface StatusBarConfig {
654652
readonly alignment: 'left' | 'right';
655-
readonly command: StatusBarCommand;
653+
readonly command: StatusBarCommands;
656654
readonly dateFormat: DateTimeFormat | (string & object) | null;
657655
/*readonly*/ enabled: boolean;
658656
readonly format: string;

src/statusbar/statusBarController.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ConfigurationChangeEvent, StatusBarItem, TextEditor, Uri } from 'vscode';
22
import { CancellationTokenSource, Disposable, MarkdownString, StatusBarAlignment, window } from 'vscode';
33
import type { ToggleFileChangesAnnotationCommandArgs } from '../commands/toggleFileAnnotations';
4-
import { StatusBarCommand } from '../config';
4+
import type { StatusBarCommands } from '../config';
55
import { GlyphChars } from '../constants';
66
import type { GlCommands } from '../constants.commands';
77
import type { Container } from '../container';
@@ -254,52 +254,52 @@ export class StatusBarController implements Disposable {
254254

255255
let actionTooltip: string;
256256
switch (cfg.command) {
257-
case StatusBarCommand.CopyRemoteCommitUrl:
257+
case 'gitlens.copyRemoteCommitUrl' satisfies StatusBarCommands:
258258
actionTooltip = 'Click to Copy Remote Commit URL';
259259
break;
260-
case StatusBarCommand.CopyRemoteFileUrl:
261-
this._statusBarBlame.command = 'gitlens.copyRemoteFileUrlToClipboard';
260+
case 'gitlens.copyRemoteFileUrl' satisfies StatusBarCommands:
261+
this._statusBarBlame.command = 'gitlens.copyRemoteFileUrlToClipboard' satisfies GlCommands;
262262
actionTooltip = 'Click to Copy Remote File Revision URL';
263263
break;
264-
case StatusBarCommand.DiffWithPrevious:
264+
case 'gitlens.diffWithPrevious' satisfies StatusBarCommands:
265265
this._statusBarBlame.command = 'gitlens.diffLineWithPrevious' satisfies GlCommands;
266266
actionTooltip = 'Click to Open Line Changes with Previous Revision';
267267
break;
268-
case StatusBarCommand.DiffWithWorking:
268+
case 'gitlens.diffWithWorking' satisfies StatusBarCommands:
269269
this._statusBarBlame.command = 'gitlens.diffLineWithWorking' satisfies GlCommands;
270270
actionTooltip = 'Click to Open Line Changes with Working File';
271271
break;
272-
case StatusBarCommand.OpenCommitOnRemote:
272+
case 'gitlens.openCommitOnRemote' satisfies StatusBarCommands:
273273
actionTooltip = 'Click to Open Commit on Remote';
274274
break;
275-
case StatusBarCommand.OpenFileOnRemote:
275+
case 'gitlens.openFileOnRemote' satisfies StatusBarCommands:
276276
actionTooltip = 'Click to Open Revision on Remote';
277277
break;
278-
case StatusBarCommand.RevealCommitInView:
278+
case 'gitlens.revealCommitInView' satisfies StatusBarCommands:
279279
actionTooltip = 'Click to Reveal Commit in the Side Bar';
280280
break;
281-
case StatusBarCommand.ShowCommitsInView:
281+
case 'gitlens.showCommitsInView' satisfies StatusBarCommands:
282282
actionTooltip = 'Click to Search for Commit';
283283
break;
284-
case StatusBarCommand.ShowQuickCommitDetails:
284+
case 'gitlens.showQuickCommitDetails' satisfies StatusBarCommands:
285285
actionTooltip = 'Click to Show Commit';
286286
break;
287-
case StatusBarCommand.ShowQuickCommitFileDetails:
287+
case 'gitlens.showQuickCommitFileDetails' satisfies StatusBarCommands:
288288
actionTooltip = 'Click to Show Commit (file)';
289289
break;
290-
case StatusBarCommand.ShowQuickCurrentBranchHistory:
290+
case 'gitlens.showQuickRepoHistory' satisfies StatusBarCommands:
291291
actionTooltip = 'Click to Show Branch History';
292292
break;
293-
case StatusBarCommand.ShowQuickFileHistory:
293+
case 'gitlens.showQuickFileHistory' satisfies StatusBarCommands:
294294
actionTooltip = 'Click to Show File History';
295295
break;
296-
case StatusBarCommand.ToggleCodeLens:
296+
case 'gitlens.toggleCodeLens' satisfies StatusBarCommands:
297297
actionTooltip = 'Click to Toggle Git CodeLens';
298298
break;
299-
case StatusBarCommand.ToggleFileBlame:
299+
case 'gitlens.toggleFileBlame' satisfies StatusBarCommands:
300300
actionTooltip = 'Click to Toggle File Blame';
301301
break;
302-
case StatusBarCommand.ToggleFileChanges: {
302+
case 'gitlens.toggleFileChanges' satisfies StatusBarCommands: {
303303
if (commit.file != null) {
304304
this._statusBarBlame.command = createCommand<[Uri, ToggleFileChangesAnnotationCommandArgs]>(
305305
'gitlens.toggleFileChanges',
@@ -314,7 +314,7 @@ export class StatusBarController implements Disposable {
314314
actionTooltip = 'Click to Toggle File Changes';
315315
break;
316316
}
317-
case StatusBarCommand.ToggleFileChangesOnly: {
317+
case 'gitlens.toggleFileChangesOnly' satisfies StatusBarCommands: {
318318
if (commit.file != null) {
319319
this._statusBarBlame.command = createCommand<[Uri, ToggleFileChangesAnnotationCommandArgs]>(
320320
'gitlens.toggleFileChanges',
@@ -329,7 +329,7 @@ export class StatusBarController implements Disposable {
329329
actionTooltip = 'Click to Toggle File Changes';
330330
break;
331331
}
332-
case StatusBarCommand.ToggleFileHeatmap:
332+
case 'gitlens.toggleFileHeatmap' satisfies StatusBarCommands:
333333
actionTooltip = 'Click to Toggle File Heatmap';
334334
break;
335335
}

src/system/-webview/command.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Command, Disposable, Uri } from 'vscode';
22
import { commands } from 'vscode';
33
import type { Action, ActionContext } from '../../api/gitlens';
44
import type { GlCommandBase } from '../../commands/commandBase';
5-
import type { CodeLensCommand } from '../../config';
5+
import type { CodeLensCommands } from '../../config';
66
import type {
77
CoreCommands,
88
CoreGitCommands,
@@ -122,7 +122,7 @@ export function executeActionCommand<T extends ActionContext>(
122122
}
123123

124124
export function createCommand<T extends unknown[]>(
125-
command: GlCommands | CodeLensCommand,
125+
command: GlCommands | CodeLensCommands,
126126
title: string,
127127
...args: T
128128
): Command {

0 commit comments

Comments
 (0)