Ui

Interfaces

Interfaces

AgentAvatarProps

Props for the AgentAvatar component

Properties:

PropertyTypeRequiredDescription
namestringYesDisplay name for the avatar
avatarUrlstring | undefinedNoOptional URL for the avatar image
isAgentboolean | undefinedNoWhether this represents an AI agent (true) or a human user (false)
size"sm" | "md" | "lg" | undefinedNoSize of the avatar
classNamestring | undefinedNoOptional additional class names

Agent

Represents an agent that can be selected in the AgentSelector

Properties:

PropertyTypeRequiredDescription
idstringYesUnique identifier for the agent
namestringYesDisplay name of the agent
avatarUrlstring | undefinedNoOptional URL for the agent's avatar image
isAgentbooleanYesWhether this is an AI agent (true) or a human user (false)
descriptionstring | undefinedNoOptional description of the agent's capabilities or role

AgentSelectorProps

Props for the AgentSelector component

Properties:

PropertyTypeRequiredDescription
agentsAgent[]YesArray of available agents to select from
selectedAgentIdstring | undefinedNoID of the currently selected agent
onSelect(agentId: string) => voidYesCallback fired when an agent is selected
placeholderstring | undefinedNoPlaceholder text when no agent is selected
disabledboolean | undefinedNoWhether the selector is disabled
classNamestring | undefinedNoOptional additional class names

ScopeBadgeProps

Props for the ScopeBadge component

Properties:

PropertyTypeRequiredDescription
entityTypeScopeEntityTypeYesType of the scoped entity
entityTitlestring | undefinedNoOptional display title for the entity
entityIdstring | undefinedNoOptional ID of the entity (used as fallback if no title)
variant"default" | "outline" | "secondary" | undefinedNoVisual variant of the badge
size"sm" | "md" | undefinedNoSize of the badge
classNamestring | undefinedNoOptional additional class names
onClick(() => void) | undefinedNoOptional click handler for interactive badges

ChatToolCall

Chat component types for flowstate-ui These are simplified versions that don't depend on RxDB or other app-specific packages

Properties:

PropertyTypeRequiredDescription
idstring | undefinedNoUnique identifier for the tool call
toolNamestringYesName of the tool being called
argumentsRecord<string, unknown>YesArguments passed to the tool
resultunknownNoResult returned from the tool execution
status"pending" | "success" | "error"YesCurrent status of the tool call

ChatMessageMetadata

Metadata associated with a chat message, primarily for assistant messages

Properties:

PropertyTypeRequiredDescription
tokens{ input: number; output: number; total: number; } | undefinedNoToken usage information
cost{ total: number; } | undefinedNoCost information
latencynumber | undefinedNoResponse latency in milliseconds
modelstring | undefinedNoModel used for the response

ChatMessage

Represents a single message in a chat conversation

Properties:

PropertyTypeRequiredDescription
idstringYesUnique identifier for the message
role"user" | "assistant" | "system"YesRole of the message sender
contentstringYesText content of the message
createdAtstringYesISO 8601 timestamp of when the message was created
toolCallsChatToolCall[] | undefinedNoTool calls made by the assistant (if any)
metadataChatMessageMetadata | undefinedNoAdditional metadata for the message

ChatConversation

Represents a chat conversation

Properties:

PropertyTypeRequiredDescription
idstringYesUnique identifier for the conversation
titlestringYesDisplay title for the conversation
updatedAtstringYesISO 8601 timestamp of when the conversation was last updated
metadata{ messageCount: number; lastMessageAt: string; }YesConversation metadata
extended{ agentId?: string; scopedEntityType?: "project" | "milestone" | "task" | "teamMember"; scopedEntityId?: string; scopedEntityTitle?: string; isPinned?: boolean; } | undefinedNoExtended properties for scoped conversations

MessageBubbleProps

Props for the MessageBubble component

Properties:

PropertyTypeRequiredDescription
messageChatMessageYesThe message to display
classNamestring | undefinedNoOptional additional class names

MessageListProps

Props for the MessageList component

Properties:

PropertyTypeRequiredDescription
messagesChatMessage[]YesArray of messages to display
streamingContentstring | undefinedNoContent being streamed (for real-time display)
emptyMessagestring | undefinedNoMessage to display when there are no messages
classNamestring | undefinedNoOptional additional class names

ChatInputProps

Props for the ChatInput component

Properties:

PropertyTypeRequiredDescription
valuestringYesCurrent input value
onChange(value: string) => voidYesCallback when the input value changes
onSubmit() => voidYesCallback when the user submits the message
disabledboolean | undefinedNoWhether the input is disabled (e.g., while AI is responding)
placeholderstring | undefinedNoPlaceholder text for the input
classNamestring | undefinedNoOptional additional class names

ConversationItemProps

Props for the ConversationItem component

Properties:

PropertyTypeRequiredDescription
conversationChatConversationYesThe conversation to display
isActivebooleanYesWhether this conversation is currently selected
onClick() => voidYesCallback when the conversation is clicked
onDelete(() => void) | undefinedNoCallback when the delete button is clicked
classNamestring | undefinedNoOptional additional class names

BadgeProps

ButtonProps

Properties:

PropertyTypeRequiredDescription
asChildboolean | undefinedNo
Previous
API Reference
Next
Types