Skip to content

Commit 2f06b5e

Browse files
authored
Improves account simulator (#3629)
1 parent 050774f commit 2f06b5e

File tree

8 files changed

+362
-222
lines changed

8 files changed

+362
-222
lines changed

package.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5662,13 +5662,8 @@
56625662
"category": "GitLens"
56635663
},
56645664
{
5665-
"command": "gitlens.plus.simulateSubscriptionState",
5666-
"title": "Simulate Subscription State (Debugging)",
5667-
"category": "GitLens"
5668-
},
5669-
{
5670-
"command": "gitlens.plus.restoreSubscriptionState",
5671-
"title": "Restore Subscription State (Debugging)",
5665+
"command": "gitlens.plus.simulateSubscription",
5666+
"title": "Simulate Subscription (Debugging)",
56725667
"category": "GitLens"
56735668
},
56745669
{
@@ -9803,11 +9798,7 @@
98039798
"when": "gitlens:enabled"
98049799
},
98059800
{
9806-
"command": "gitlens.plus.simulateSubscriptionState",
9807-
"when": "gitlens:enabled && gitlens:debugging"
9808-
},
9809-
{
9810-
"command": "gitlens.plus.restoreSubscriptionState",
9801+
"command": "gitlens.plus.simulateSubscription",
98119802
"when": "gitlens:enabled && gitlens:debugging"
98129803
},
98139804
{

src/commands/resets.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const resetTypes = [
1313
'ai',
1414
'avatars',
1515
'integrations',
16-
'plus',
1716
'repositoryAccess',
1817
'suppressedWarnings',
1918
'usageTracking',
@@ -74,27 +73,13 @@ export class ResetCommand extends Command {
7473
},
7574
];
7675

77-
if (this.container.debugging) {
78-
items.splice(
79-
0,
80-
0,
81-
{
82-
label: 'Subscription Reset',
83-
detail: 'Resets the stored subscription',
84-
item: 'plus',
85-
},
86-
createQuickPickSeparator(),
87-
);
88-
}
89-
9076
// create a quick pick with options to clear all the different resets that GitLens supports
9177
const pick = await window.showQuickPick<ResetQuickPickItem>(items, {
9278
title: 'Reset Stored Data',
9379
placeHolder: 'Choose which data to reset, will be prompted to confirm',
9480
});
9581

9682
if (pick?.item == null) return;
97-
if (pick.item === 'plus' && !this.container.debugging) return;
9883

9984
const confirm: MessageItem = { title: 'Reset' };
10085
const cancel: MessageItem = { title: 'Cancel', isCloseAffordance: true };
@@ -170,10 +155,6 @@ export class ResetCommand extends Command {
170155
await this.container.integrations.reset();
171156
break;
172157

173-
case 'plus':
174-
await this.container.subscription.logout(true, undefined);
175-
break;
176-
177158
case 'repositoryAccess':
178159
await this.container.git.clearAllRepoVisibilityCaches();
179160
break;

src/constants.commands.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ export const enum Commands {
151151
PlusStartPreviewTrial = 'gitlens.plus.startPreviewTrial',
152152
PlusUpgrade = 'gitlens.plus.upgrade',
153153
PlusValidate = 'gitlens.plus.validate',
154-
PlusSimulateSubscriptionState = 'gitlens.plus.simulateSubscriptionState',
155-
PlusRestoreSubscriptionState = 'gitlens.plus.restoreSubscriptionState',
154+
PlusSimulateSubscription = 'gitlens.plus.simulateSubscription',
156155
QuickOpenFileHistory = 'gitlens.quickOpenFileHistory',
157156
RefreshLaunchpad = 'gitlens.launchpad.refresh',
158157
RefreshGraph = 'gitlens.graph.refresh',

0 commit comments

Comments
 (0)