Hiyve Components - v1.0.0
    Preparing search index...

    Function useChat

    • Access chat state and controls.

      Returns {
          clearUnread: () => void;
          loadChatHistory: (cursor?: string | null) => Promise<{ hasMore: boolean }>;
          messages: ChatMessage[];
          sendDataMessage: (data: unknown) => void;
          sendMessage: (content: string) => void;
          unreadCount: number;
      }

      Object containing chat messages, unread count, and actions

      • clearUnread: () => void
      • loadChatHistory: (cursor?: string | null) => Promise<{ hasMore: boolean }>
      • messages: ChatMessage[]
      • sendDataMessage: (data: unknown) => void
      • sendMessage: (content: string) => void
      • unreadCount: number