@@ -468,4 +468,55 @@ declare module 'vscode' {
468468 */
469469 readonly fullReferenceName ?: string ;
470470 }
471+
472+ // #region Quota Sync
473+
474+ /**
475+ * A snapshot of quota usage for a single category (chat, completions, premium chat).
476+ */
477+ export interface ChatQuotaSnapshot {
478+ readonly percentRemaining : number ;
479+ readonly unlimited : boolean ;
480+ readonly hasQuota ?: boolean ;
481+ readonly resetAt ?: number ;
482+ readonly usageBasedBilling ?: boolean ;
483+ readonly entitlement ?: number ;
484+ readonly quotaRemaining ?: number ;
485+ }
486+
487+ /**
488+ * A snapshot of rate limit usage for a category (session or weekly).
489+ */
490+ export interface ChatRateLimitSnapshot {
491+ readonly percentRemaining : number ;
492+ readonly unlimited : boolean ;
493+ readonly resetDate ?: string ;
494+ }
495+
496+ /**
497+ * Quota snapshot data covering all categories.
498+ * Accepted by {@link chat.updateQuotas} for extension-to-core sync.
499+ */
500+ export interface ChatQuotaSnapshots {
501+ readonly resetDate ?: string ;
502+ readonly resetDateHasTime ?: boolean ;
503+ readonly usageBasedBilling ?: boolean ;
504+ readonly canUpgradePlan ?: boolean ;
505+ readonly chat ?: ChatQuotaSnapshot ;
506+ readonly completions ?: ChatQuotaSnapshot ;
507+ readonly premiumChat ?: ChatQuotaSnapshot ;
508+ readonly additionalUsageEnabled ?: boolean ;
509+ readonly additionalUsageCount ?: number ;
510+ readonly sessionRateLimit ?: ChatRateLimitSnapshot ;
511+ readonly weeklyRateLimit ?: ChatRateLimitSnapshot ;
512+ }
513+
514+ export namespace chat {
515+ /**
516+ * Push quota snapshot data from the extension to the core workbench.
517+ */
518+ export function updateQuotas ( quotas : ChatQuotaSnapshots ) : void ;
519+ }
520+
521+ // #endregion
471522}
0 commit comments