@kkdev92/vscode-ext-kit - v4.1.1
    Preparing search index...

    Interface ManagedStatusBarItem

    A managed status bar item with helper methods.

    Every method is a no-op once the item is disposed — an async task finishing late may still call update() without throwing into a torn-down UI.

    interface ManagedStatusBarItem {
        dispose(): void;
        flash(text: string, durationMs?: number): { dispose(): void };
        hide(): void;
        hideSpinner(): void;
        set(options: Partial<StatusBarItemOptions>): void;
        setBusy(busy: boolean): void;
        show(): void;
        showSpinner(text?: string): void;
        update(text: string, tooltip?: string): void;
    }
    Index
    • Shows text for a while, then goes back to whatever the item said before.

      A state the item passes through rather than a second item created for one message, so a "Saved." cannot outlive the item that reported it — and two flashes in a row cannot leave two of them stacked in the corner. Early-dismiss handles are guarded by displayed text; when two consecutive flashes use identical text, treat the earlier handle as superseded rather than disposing it.

      Parameters

      • text: string

        What to show

      • OptionaldurationMs: number

        How long for

      Returns { dispose(): void }

      A handle that ends the message early. Idempotent.

      status.flash('$(check) Saved', 3000);
      
    • Reference-counted busy indicator: each setBusy(true) must be balanced by a setBusy(false) before the spinner stops. Two overlapping operations can mark the item busy without the first one's finish blanking the second's spinner. Independent of showSpinner, which is a plain on/off flag.

      Parameters

      • busy: boolean

      Returns void

    • Shows a spinner with optional text.

      Parameters

      • Optionaltext: string

        Optional text to display next to spinner

      Returns void

    • Updates the text and optionally the tooltip.

      Parameters

      • text: string

        New text to display

      • Optionaltooltip: string

        Optional new tooltip

      Returns void