import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions"; import { IStatusbarService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/statusbar/browser/statusbar.service"; import { ChatEntitlement, ChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService"; import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service"; import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service"; import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { IInlineCompletionsService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/inlineCompletionsService.service"; import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service"; /** * Tracks whether Copilot is currently blocked by a reached quota limit, has * resumed after a limit reset, or neither. Persisted across sessions so a reset * that happens while VS Code is closed can still be surfaced on next launch. */ export type ChatQuotaResumeState = "none" | "blocked" | "resumed"; type ChatQuotas = IChatEntitlementService["quotas"]; /** * Pure state transition for the Copilot quota "resumed" indicator: * - Enters `blocked` while a limit is reached and the user is not on additional spend. * - Moves `blocked` -> `resumed` only on a genuine limit reset (fresh quota, no additional spend). * - Moves `blocked` -> `none` when unblocked via additional spend (not a reset). * - Keeps `blocked` while fresh quota has not been resolved yet (e.g. offline) to avoid false positives. * - Otherwise preserves the previous state, so `resumed` persists until dismissed. * - Resets to `none` for entitlements this entry doesn't track, so the state can't get stuck (e.g. upgrading from Free while `blocked`). */ export declare function computeQuotaResumeState(previous: ChatQuotaResumeState, entitlement: ChatEntitlement, quotas: ChatQuotas): ChatQuotaResumeState; export declare class ChatStatusBarEntry extends Disposable implements IWorkbenchContribution { private readonly chatEntitlementService; private readonly instantiationService; private readonly statusbarService; private readonly editorService; private readonly configurationService; private readonly completionsService; private readonly contextKeyService; private readonly storageService; static readonly ID = "workbench.contrib.chatStatusBarEntry"; private static readonly TITLE_BAR_CONTEXT_KEYS; private static readonly QUOTA_RESUME_STATE_KEY; private static readonly QUOTA_RESET_RETRY_DELAY; private entry; private readonly activeCodeEditorListener; private readonly entryAnchor; private readonly dashboardTooltip; private quotaResumeState; private readonly quotaResetTimer; private readonly quotaRefresh; private readonly clearResumedScheduler; constructor(chatEntitlementService: ChatEntitlementService, instantiationService: IInstantiationService, statusbarService: IStatusbarService, editorService: IEditorService, configurationService: IConfigurationService, completionsService: IInlineCompletionsService, contextKeyService: IContextKeyService, storageService: IStorageService); private update; private registerListeners; private onDidActiveEditorChange; private onQuotaChanged; private evaluateQuotaResumeState; private getQuotaResetTime; private scheduleQuotaResetRefresh; private refreshQuotaAndEvaluate; private initializeQuotaResumeState; private readPersistedQuotaResumeState; private setQuotaResumeState; private onDashboardOpened; private getEntryProps; private getSetupEntryProps; private isSignInTitleBarAffordanceVisible; dispose(): void; } export {};