From aaa576acca01852119f6a6b0260cf5aa74a30c58 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 6 Jan 2025 16:54:06 +0100 Subject: [PATCH] Add time information to chatinstallentitlement event (fix microsoft/vscode-copilot#11476) (#237350) --- src/vs/workbench/contrib/chat/browser/chatSetup.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/chat/browser/chatSetup.ts b/src/vs/workbench/contrib/chat/browser/chatSetup.ts index 12567365126..52bb5bea1b0 100644 --- a/src/vs/workbench/contrib/chat/browser/chatSetup.ts +++ b/src/vs/workbench/contrib/chat/browser/chatSetup.ts @@ -318,6 +318,7 @@ type EntitlementClassification = { entitlement: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Flag indicating the chat entitlement state' }; quotaChat: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of chat completions available to the user' }; quotaCompletions: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of chat completions available to the user' }; + quotaResetDate: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The date the quota will reset' }; owner: 'bpasero'; comment: 'Reporting chat setup entitlements'; }; @@ -326,6 +327,7 @@ type EntitlementEvent = { entitlement: ChatEntitlement; quotaChat: number | undefined; quotaCompletions: number | undefined; + quotaResetDate: string | undefined; }; interface IEntitlementsResponse { @@ -536,7 +538,8 @@ class ChatSetupRequests extends Disposable { this.telemetryService.publicLog2('chatInstallEntitlement', { entitlement: entitlements.entitlement, quotaChat: entitlementsResponse.limited_user_quotas?.chat, - quotaCompletions: entitlementsResponse.limited_user_quotas?.completions + quotaCompletions: entitlementsResponse.limited_user_quotas?.completions, + quotaResetDate: entitlementsResponse.limited_user_reset_date }); return entitlements;