@pouchy_ai/companion-sdk - v0.1.0
    Preparing search index...

    Interface CompanionViewSnapshot

    Immutable view snapshot. A new object per change — safe to hand to useSyncExternalStore / $state / shallowRef without defensive copies.

    interface CompanionViewSnapshot {
        draft: string;
        outbox: number;
        pendingConfirms: readonly ConfirmRequestPayload[];
        streamState: CompanionStreamState;
        transcript: readonly CompanionTranscriptEntry[];
        typing: boolean;
    }
    Index
    draft: string

    The in-flight streamed reply (token deltas), '' when none.

    outbox: number

    Sends queued while offline (0.34.0 — the client's queueOffline option): client.pendingOutbox().length, live-updated. Always 0 on a client from an older SDK bundle without the offline queue.

    pendingConfirms: readonly ConfirmRequestPayload[]

    Confirm requests that arrived on the stream and haven't been resolved through this view yet. Rebuild after a reload via client.pendingConfirms() — confirm_request events are not replayed.

    transcript: readonly CompanionTranscriptEntry[]

    Rolling transcript, oldest first, capped at transcriptCap.

    typing: boolean