claudius-chat-widget
    Preparing search index...

    Interface ErrorContext

    Context for ClaudiusPlugin.onError. Adds the ability to recover from a failed send by rendering a reply in place of the error UI.

    interface ErrorContext {
        apiUrl: string;
        messages: readonly ChatMessage[];
        respondWith(reply: string | PluginReply): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Methods

    Properties

    apiUrl: string

    The Worker chat endpoint URL the widget posts to.

    messages: readonly ChatMessage[]

    Conversation snapshot, oldest message first. Treat as immutable.

    Methods

    • Recover from the failure by rendering this assistant reply instead of the error state. Stops the hook chain — later plugins' onError hooks do not run.

      Parameters

      Returns void