Skip to content

Commit 2700c4a

Browse files
committed
Shows StartWork specific feature gate
(#3621)
1 parent ca841e1 commit 2700c4a

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

src/commands/quickCommand.steps.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2683,6 +2683,16 @@ export async function* ensureAccessStep<
26832683
createQuickPickSeparator(),
26842684
);
26852685
break;
2686+
case PlusFeatures.StartWork:
2687+
directives.splice(
2688+
0,
2689+
0,
2690+
createDirectiveQuickPickItem(Directive.Noop, undefined, {
2691+
label: 'Start work lets you quickly create a branch and initial code for a selected issue',
2692+
iconPath: getIconPathUris(Container.instance, 'icon-repo.svg'),
2693+
}),
2694+
);
2695+
break;
26862696
case PlusFeatures.Worktrees:
26872697
directives.splice(
26882698
0,

src/features.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ export const enum PlusFeatures {
3838
Worktrees = 'worktrees',
3939
Graph = 'graph',
4040
Launchpad = 'launchpad',
41+
StartWork = 'startWork',
4142
}

src/git/gitProviderService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ export class GitProviderService implements Disposable {
776776
return { allowed: subscription.account?.verified !== false, subscription: { current: subscription } };
777777
}
778778

779-
if (feature === 'launchpad') {
779+
if (feature === 'launchpad' || feature === 'startWork') {
780780
return { allowed: false, subscription: { current: subscription, required: SubscriptionPlanId.Pro } };
781781
}
782782

src/plus/startWork/startWork.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export class StartWorkCommand extends QuickCommand<State> {
134134
return result;
135135
}
136136
}
137-
const result = yield* ensureAccessStep(state, context, PlusFeatures.Launchpad);
137+
const result = yield* ensureAccessStep(state, context, PlusFeatures.StartWork);
138138
if (result === StepResultBreak) continue;
139139

140140
await updateContextItems(this.container, context);

0 commit comments

Comments
 (0)