• Stream a chat completion from whichever provider the user has configured.

    let summary = '';
    for await (const d of chat({ messages: [{ role: 'user', content: [{ type: 'text', text }] }] })) {
    if (d.type === 'text-delta') summary += d.text;
    }

    Requires the llm:chat capability. If no provider is bound the host fails the stream into the SP-7 connect-me prompt (the user adds a key) — the generator throws with code: 'auth-required'; an un-granted call throws forbidden.

    Parameters

    Returns AsyncGenerator<ChatDelta, ChatResult, void>