Skip to content

Commit d04f348

Browse files
authored
Don't round percent remaining in quota calculations (#248162)
Don't round percent remaining (#248158)
1 parent 8499094 commit d04f348

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/chat/common/chatEntitlementService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ export class ChatEntitlementRequests extends Disposable {
627627
if (response.monthly_quotas?.chat && typeof response.limited_user_quotas?.chat === 'number') {
628628
quotas.chat = {
629629
total: response.monthly_quotas.chat,
630-
percentRemaining: Math.round((response.limited_user_quotas.chat / response.monthly_quotas.chat) * 100),
630+
percentRemaining: (response.limited_user_quotas.chat / response.monthly_quotas.chat) * 100,
631631
overageEnabled: false,
632632
overageCount: 0,
633633
unlimited: false
@@ -637,7 +637,7 @@ export class ChatEntitlementRequests extends Disposable {
637637
if (response.monthly_quotas?.completions && typeof response.limited_user_quotas?.completions === 'number') {
638638
quotas.completions = {
639639
total: response.monthly_quotas.completions,
640-
percentRemaining: Math.round((response.limited_user_quotas.completions / response.monthly_quotas.completions) * 100),
640+
percentRemaining: (response.limited_user_quotas.completions / response.monthly_quotas.completions) * 100,
641641
overageEnabled: false,
642642
overageCount: 0,
643643
unlimited: false

0 commit comments

Comments
 (0)