import { confirm } from "./confirm.js"; import { type MenuItem, select } from "./select.js"; export type AccountStatus = "active" | "expired" | "unknown"; export interface AccountInfo { name: string; workspaceName?: string; index: number; addedAt?: number; lastUsed?: number; status?: AccountStatus; isCurrent?: boolean; source?: "auth" | "manual"; orgs?: string[]; plan?: string; sku?: string; reset?: string; models?: { enabled: number; disabled: number; }; modelsError?: string; modelList?: { available: string[]; disabled: string[]; }; quota?: { premium?: { remaining?: number; entitlement?: number; unlimited?: boolean; }; chat?: { remaining?: number; entitlement?: number; unlimited?: boolean; }; completions?: { remaining?: number; entitlement?: number; unlimited?: boolean; }; }; } export type MenuAction = { type: "add"; } | { type: "import"; } | { type: "quota"; } | { type: "refresh-identity"; } | { type: "check-models"; } | { type: "configure-default-group"; } | { type: "assign-models"; } | { type: "toggle-refresh"; } | { type: "set-interval"; } | { type: "toggle-language"; } | { type: "toggle-experimental-slash-commands"; } | { type: "toggle-network-retry"; } | { type: "toggle-synthetic-agent-initiator"; } | { type: "switch"; account: AccountInfo; } | { type: "remove"; account: AccountInfo; } | { type: "remove-all"; } | { type: "cancel"; }; export type MenuLanguage = "zh" | "en"; export type MenuProvider = "copilot"; export type ShowMenuInput = { provider?: MenuProvider; refresh?: { enabled: boolean; minutes: number; }; lastQuotaRefresh?: number; modelAccountAssignmentCount?: number; defaultAccountGroupCount?: number; networkRetryEnabled?: boolean; syntheticAgentInitiatorEnabled?: boolean; experimentalSlashCommandsEnabled?: boolean; capabilities?: Partial; language?: MenuLanguage; }; type MenuCapabilities = { importAuth: boolean; quota: boolean; refreshIdentity: boolean; checkModels: boolean; defaultAccountGroup: boolean; assignModels: boolean; experimentalSlashCommands: boolean; networkRetry: boolean; syntheticAgentInitiator: boolean; }; export declare function getMenuCopy(language?: MenuLanguage): { menuTitle: string; menuSubtitle: string; switchLanguageLabel: string; actionsHeading: string; commonSettingsHeading: string; providerSettingsHeading: string; addAccount: string; addAccountHint: string; importAuth: string; checkQuotas: string; refreshIdentity: string; checkModels: string; defaultAccountGroup: string; assignModels: string; autoRefreshOn: string; autoRefreshOff: string; setRefresh: string; experimentalSlashCommandsOn: string; experimentalSlashCommandsOff: string; experimentalSlashCommandsHint: string; retryOn: string; retryOff: string; retryHint: string; syntheticInitiatorOn: string; syntheticInitiatorOff: string; syntheticInitiatorHint: string; accountsHeading: string; dangerHeading: string; removeAll: string; }; export declare function buildMenuItems(input: { provider?: MenuProvider; accounts: AccountInfo[]; refresh?: { enabled: boolean; minutes: number; }; lastQuotaRefresh?: number; modelAccountAssignmentCount?: number; defaultAccountGroupCount?: number; networkRetryEnabled: boolean; syntheticAgentInitiatorEnabled?: boolean; experimentalSlashCommandsEnabled?: boolean; capabilities?: Partial; language?: MenuLanguage; }): MenuItem[]; export declare function showMenu(accounts: AccountInfo[], input?: ShowMenuInput): Promise; export declare function showMenuWithDeps(accounts: AccountInfo[], input?: ShowMenuInput, deps?: { select?: typeof select; confirm?: typeof confirm; showAccountActions?: typeof showAccountActions; }): Promise; export declare function buildAccountActionItems(account: AccountInfo, input?: { provider?: MenuProvider; }): MenuItem<"switch" | "remove" | "back" | "models">[]; export declare function showAccountActions(account: AccountInfo, input?: { provider?: MenuProvider; }): Promise<"switch" | "remove" | "back">; export {};