UNPKG

remix-nlux

Version:

Remix IDE NLUX integration. Remix IDE is the leading IDE for building and deploying smart contracts on Ethereum. NLUX is a JavaScript and React library for building conversational AI experiences.

17 lines (13 loc) 469 B
import {ChatItem} from '@shared/types/conversation'; export const getChatRoomStatus = <AiMsg = string>( initialConversationContent: ChatItem<AiMsg>[] | undefined, segmentsCount?: number, ): 'starting' | 'active' => { if (initialConversationContent !== undefined && initialConversationContent.length > 0) { return 'active'; } if (segmentsCount !== undefined && segmentsCount > 0) { return 'active'; } return 'starting'; };