nextspace
    Preparing search index...

    Interface UseConversationMessagesParams

    Parameters required for the useConversationMessages hook.

    interface UseConversationMessagesParams {
        agentId: string | null;
        agentIds: string[];
        assistantIntroRef: MutableRefObject<PseudonymousMessage[]>;
        chatIntroRef: MutableRefObject<PseudonymousMessage[]>;
        chatPasscode: string;
        conversationId: string | undefined;
        groupChatChannelName?: "chat" | "pregame";
        initialJoinComplete: boolean;
        pendingHiddenRef?: MutableRefObject<Map<string, boolean>>;
        pseudonym: string | null;
        userId: string | null;
    }
    Index

    Properties

    agentId: string | null

    The ID of the agent associated with the conversation, used to fetch assistant messages.

    agentIds: string[]

    An array of agent IDs associated with the conversation, used to fetch all assistant messages.

    assistantIntroRef: MutableRefObject<PseudonymousMessage[]>

    A mutable reference to an array of introductory assistant messages, used to prepend to fetched assistant messages.

    chatIntroRef: MutableRefObject<PseudonymousMessage[]>

    A mutable reference to an array of introductory chat messages, used to prepend to fetched chat messages.

    chatPasscode: string

    The passcode for accessing chat messages in the conversation.

    conversationId: string | undefined

    The unique identifier for the current conversation, used to fetch messages.

    groupChatChannelName?: "chat" | "pregame"

    Which channel group chat actually uses on the wire: 'pregame' or 'chat'. Defaults to 'chat'.

    initialJoinComplete: boolean

    Whether the user has completed the initial join process for the conversation.

    pendingHiddenRef?: MutableRefObject<Map<string, boolean>>

    Hide/unhide verdicts an admin has applied optimistically and the server has not yet answered, by message id. A fetch started before the answer would otherwise bring back the old flag.

    pseudonym: string | null

    The pseudonym of the current user, used to filter messages and replies.

    userId: string | null

    The ID of the current user participating in the conversation.