import { Event } from "../../../../base/common/event.js"; import { Disposable } from "../../../../base/common/lifecycle.js"; import { IObservable } from "../../../../base/common/observable.js"; import { IStorageService } from "../../../../platform/storage/common/storage.service.js"; /** Experiment-controlled setting that selects the Get Started checklist variant. */ export declare const GET_STARTED_CHECKLIST_SETTING = "sessions.getStarted.checklist"; /** Where the checklist appears in the sessions view, or `none` for the control arm. */ export declare enum GetStartedChecklistMode { None = "none", /** Above the sessions list. */ AboveSessions = "aboveSessions", /** Below the sessions list, above Customizations. */ BelowSessions = "belowSessions" } export declare function toGetStartedChecklistMode(value: unknown): GetStartedChecklistMode; export declare enum GetStartedItemId { StartSession = "startSession", RunInParallel = "runInParallel", SecondProject = "secondProject", KeepChanges = "keepChanges", Automation = "automation" } export declare const GET_STARTED_ITEM_IDS: readonly GetStartedItemId[]; /** Id for `onboarding.developerMode`, which previews the checklist regardless of eligibility. */ export declare const GET_STARTED_DEVELOPER_MODE_ID = "sessions.getStarted.checklist"; /** Machine-local storage key, like the Agents window usage counts. */ export declare const GET_STARTED_STATE_STORAGE_KEY = "agentSessions.getStarted.state"; /** A snapshot of the product state that completes checklist items. */ export interface IGetStartedSignals { /** Sessions ever created in the Agents window on this machine. */ readonly createdSessionCount: number; /** Sessions whose agent is working or waiting for input right now. */ readonly runningSessionCount: number; /** Distinct projects that have sessions, as the sessions list groups them. */ readonly projectCount: number; /** Whether an operation that keeps a session's changes (merge, commit, pull request, ...) is running. */ readonly keepingChanges: boolean; /** Defined automations. */ readonly automationCount: number; } /** Returns the items that the given product state completes. */ export declare function getCompletedGetStartedItems(signals: IGetStartedSignals): GetStartedItemId[]; export interface IGetStartedPersistedState { /** Decided once, the first time an AI-enabled user sees the place where the checklist appears. */ readonly eligible?: boolean; readonly completed: readonly GetStartedItemId[]; /** Collapsed to its heading by the user. */ readonly collapsed?: boolean; /** "Don't Show Again". */ readonly dismissed?: boolean; } export declare function readGetStartedState(storageService: IStorageService): IGetStartedPersistedState; export interface IGetStartedItemState { readonly id: GetStartedItemId; readonly done: boolean; } /** * Tracks checklist eligibility and progress in every experiment arm, so that the * experiment trigger and completion state never depend on the assigned variant. */ export declare class GetStartedChecklistModel extends Disposable { private readonly _signals; private readonly _storageService; private readonly _state; readonly state: IObservable; /** Items offered to the user, in order, with their completion state. */ readonly items: IObservable; readonly allDone: IObservable; private readonly _onDidCompleteItems; /** Fires with the items that this window's signals complete, after they are stored. */ readonly onDidCompleteItems: Event; constructor(_signals: IObservable, automationsAvailable: IObservable, _storageService: IStorageService, /** Developer-mode previews track progress even for users who are not eligible. */ forceEligible?: IObservable); /** * Decides eligibility the first time the user can see the checklist's place, and keeps it. * What an eligible user already did counts as done, without being reported as completed, * because they did it before seeing the checklist. * @returns whether the user is eligible. */ decideEligibility(createdSessionCount: number): boolean; setCollapsed(collapsed: boolean): void; dismiss(): void; /** Brings the checklist back after "Don't Show Again", expanded. */ restore(): void; private _update; }