Manta Developers
GitHub
Menu

@manta-eu/react/chat

Reference for @manta-eu/react/chat as it is on main.

Type Aliases

ChatConversationStartersArgs

ChatConversationStartersArgs = object

Properties

className?

optional className?: string

groups?

optional groups?: ConversationStarterGroup[]

isLoading?

optional isLoading?: boolean

onStarterClick

onStarterClick: (starter) => void

Parameters
starter

ConversationStarter

Returns

void

starters?

optional starters?: ConversationStarter[]


ChatInputActionsProps

ChatInputActionsProps = object

Properties

aria-label

aria-label: string

className?

optional className?: string

icon

icon: ComponentType<{ className?: string; }>

onClick?

optional onClick?: () => void

Returns

void


ChatInputAttachButtonProps

ChatInputAttachButtonProps = object

Properties

className?

optional className?: string


ChatInputFilePreviewProps

ChatInputFilePreviewProps = object

Properties

progress?

optional progress?: Record<string, number>


ChatInputProps

ChatInputProps = object

Properties

children

children: ReactNode

className?

optional className?: string

dropTargetRef?

optional dropTargetRef?: RefObject<HTMLElement | null>

initialValue?

optional initialValue?: string

Read once, on mount. Re-seed with a React key.

onRejected?

optional onRejected?: (_files) => void

Parameters
_files

RejectedFile[]

Returns

void

onSubmit?

optional onSubmit?: (_value, _files) => void | Promise<void>

Parameters
_value

string

_files

File[]

Returns

void | Promise<void>

topContent?

optional topContent?: ReactNode


ChatInputSubmitProps

ChatInputSubmitProps = object

Properties

aria-label

aria-label: string

className?

optional className?: string

disabled?

optional disabled?: boolean

icon

icon: ComponentType<{ className?: string; }>

isDisabled?

optional isDisabled?: boolean

isLoading?

optional isLoading?: boolean

stopGeneration?

optional stopGeneration?: () => void | Promise<void>

Returns

void | Promise<void>


ChatMessageArgs

ChatMessageArgs = object

Properties

children

children: ReactNode

className?

optional className?: string

role

role: "user" | "assistant"


ChatModelPickerModel

ChatModelPickerModel<TId> = object

Type Parameters

TId

TId extends string

Properties

id

id: TId

label

label: string


ChatModelPickerProps

ChatModelPickerProps<TId> = object

Type Parameters

TId

TId extends string

Properties

models

models: ReadonlyArray<ChatModelPickerModel<TId>>

onChange

onChange: (id) => void

Parameters
id

TId

Returns

void

selectedId

selectedId: TId


ChatReasoningArgs

ChatReasoningArgs = object

Properties

children?

optional children?: ReactNode

className?

optional className?: string

items?

optional items?: ChatReasoningItem[]

phase?

optional phase?: ChatReasoningPhase

seconds?

optional seconds?: number

subtitle?

optional subtitle?: string

text

text: string


ChatReasoningItem

ChatReasoningItem = object

Properties

children?

optional children?: ReactNode

icon

icon: ReactNode

title

title: ReactNode


ChatReasoningPhase

ChatReasoningPhase = "pending" | "streaming" | "done"


ChatWelcomeArgs

ChatWelcomeArgs = object

Properties

channel

channel: Channel

className?

optional className?: string

mark?

optional mark?: ReactNode

subtitle

subtitle: string

title

title: string


ConversationStarter

ConversationStarter = object

Properties

id

id: string

title

title: string


ConversationStarterGroup

ConversationStarterGroup = object

Properties

integration

integration: string

starters

starters: ConversationStarter[]


RejectedFile

RejectedFile = object

Properties

file

file: File

reason

reason: string

Variables

ChatInputTextarea

const ChatInputTextarea: ForwardRefExoticComponent<Omit<Omit<TextareaAutosizeProps & RefAttributes<HTMLTextAreaElement>, "ref">, "ref" | "value" | "onChange"> & object & RefAttributes<HTMLTextAreaElement>>

Functions

ChatConversationStarters()

ChatConversationStarters(props): Element

Parameters

props

ChatConversationStartersArgs

Returns

Element


ChatInput()

ChatInput(props): Element

Parameters

props

ChatInputProps

Returns

Element


ChatInputActions()

ChatInputActions(props): Element

Parameters

props

ChatInputActionsProps

Returns

Element


ChatInputAttachButton()

ChatInputAttachButton(props): Element

Parameters

props

ChatInputAttachButtonProps

Returns

Element


ChatInputFilePreview()

ChatInputFilePreview(props): Element | null

Parameters

props

ChatInputFilePreviewProps

Returns

Element | null


ChatInputSubmit()

ChatInputSubmit(props): Element

Parameters

props

ChatInputSubmitProps

Returns

Element


ChatMessage()

ChatMessage(props): Element

Parameters

props

ChatMessageArgs

Returns

Element


ChatModelPicker()

ChatModelPicker<TId>(props): Element

Type Parameters

TId

TId extends string

Parameters

props

ChatModelPickerProps<TId>

Returns

Element


ChatReasoning()

ChatReasoning(props): Element

Parameters

props

ChatReasoningArgs

Returns

Element


ChatWelcome()

ChatWelcome(props): Element

Parameters

props

ChatWelcomeArgs

Returns

Element

References

ChatInputFooter

Re-exports ChatInputFooter


ChatInputFooterArgs

Re-exports ChatInputFooterArgs


ModeOption

Re-exports ModeOption