provider_capability.svelte.ts

view source

Declarations
#

2 declarations

ProviderCapability
#

provider_capability.svelte.ts view source

import {ProviderCapability} from '@fuzdev/zzz/provider_capability.svelte.js';

Per-provider availability capability, derived from the backend's provider_status. Plain reactive class — not a Cell: it has no persisted state, everything is $derived from app.lookup_provider_status(name). One instance per ProviderName lives in Capabilities.providers, collapsing what were three hand-rolled claude/chatgpt/gemini $derived blocks plus their init_*_check/check_* pairs into a single keyed shape.

inheritance

implements: Capability<null | undefined>

app

type Frontend

readonly

name

type ProviderName

readonly

message_id

type JsonrpcRequestId | null

readonly

status

type AsyncStatus

readonly $derived

data

null available, undefined unknown — matches the Capability data contract.

type null | undefined

readonly $derived

error_message

type string | null

readonly $derived

updated

type number | null

readonly $derived

constructor

type new (options: ProviderCapabilityOptions): ProviderCapability

options

init_check

Check availability only if it hasn't been checked before (when status is 'initial').

type (): Promise<void>

returns Promise<void>

check

Check availability by loading provider status from the backend.

type (): Promise<void>

returns Promise<void>

ProviderCapabilityOptions
#

Depends on
#

Imported by
#