Endo
    Preparing search index...
    interface GoblinChatActions {
        addInfo: (text: string) => void;
        joinRoom: (args: JoinRoomOptions) => Promise<void>;
        leaveRoom: () => void;
        sendMessage: (text: string) => Promise<void>;
        setPhase: (phase: Phase) => void;
        shutdown: () => void;
    }
    Index

    Properties

    addInfo: (text: string) => void

    Push an info system event onto the chat events stream. Used by the host-a-new-chat flow to render the freshly minted sturdyref URI inline with the chat (so the user sees what landed on their clipboard, even with the diagnostic log panel hidden).

    joinRoom: (args: JoinRoomOptions) => Promise<void>

    Parse a sturdyref URI, stand up a websocket netlayer, enliven the chatroom, join, and subscribe. Errors are caught: the failure is recorded in the log panel and the phase falls back to menu with a connect failed status — the returned promise itself never rejects.

    leaveRoom: () => void

    Politely tear down the active session (unsubscribe → leave → client.shutdown()), reset the room slice of state, and return to the menu phase. Safe to call when no session is active.

    sendMessage: (text: string) => Promise<void>

    Send a message into the joined room. Errors are caught and surfaced in the log panel.

    setPhase: (phase: Phase) => void

    Drive the high-level phase transition. The TUI uses this to move between menu, name-input, uri-input, host-name-input, and recent-list.

    shutdown: () => void

    Synchronous polite teardown for process exit: unsubscribe (eventual), leave (eventual), client.shutdown() (sync). Safe to call multiple times. The same function is wired into shutdownHandle.run for signal-handler use.