Skip to content

Commit f8e7bad

Browse files
authored
chat - quota indicator tweaks (#247504)
1 parent b498995 commit f8e7bad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vs/workbench/contrib/chat/browser/chatStatus.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,9 @@ class ChatStatusDashboard extends Disposable {
320320
}
321321

322322
const limited = this.chatEntitlementService.entitlement === ChatEntitlement.Limited;
323-
if ((limited && (chatQuota?.percentRemaining === 0 || completionsQuota?.percentRemaining === 0)) || (!limited && premiumChatQuota?.percentRemaining === 0 && !premiumChatQuota.overageEnabled)) {
323+
if ((limited && (chatQuota?.percentRemaining === 0 || completionsQuota?.percentRemaining === 0)) || (!limited && typeof premiumChatQuota?.percentRemaining === 'number' && premiumChatQuota.percentRemaining <= 25 && !premiumChatQuota.overageEnabled)) {
324324
const button = disposables.add(new Button(this.element, { ...defaultButtonStyles, secondary: canUseCopilot(this.chatEntitlementService) /* use secondary color when copilot can still be used */ }));
325-
button.label = limited ? localize('upgradeToCopilotPro', "Upgrade to Copilot Pro") : localize('enableAdditionalUsage', "Enable Pay for Additional Requests");
325+
button.label = limited ? localize('upgradeToCopilotPro', "Upgrade to Copilot Pro") : localize('enableAdditionalUsage', "Enable Additional Premium Requests");
326326
disposables.add(button.onDidClick(() => this.runCommandAndClose(limited ? 'workbench.action.chat.upgradePlan' : () => this.openerService.open(URI.parse(defaultChat.manageOverageUrl)))));
327327
}
328328

@@ -503,9 +503,9 @@ class ChatStatusDashboard extends Disposable {
503503

504504
if (supportsOverage) {
505505
if (quota.overageEnabled) {
506-
overageLabel.textContent = localize('additionalUsageEnabled', "Pay per additional requests is enabled.");
506+
overageLabel.textContent = localize('additionalUsageEnabled', "Additional paid premium requests are enabled.");
507507
} else {
508-
overageLabel.textContent = localize('additionalUsageDisabled', "Pay per additional requests is disabled.");
508+
overageLabel.textContent = localize('additionalUsageDisabled', "Additional paid premium requests are disabled.");
509509
}
510510
} else {
511511
overageLabel.textContent = '';

0 commit comments

Comments
 (0)