Ui
Interfaces
Interfaces
AgentAvatarProps
Props for the AgentAvatar component
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for the avatar |
avatarUrl | string | undefined | No | Optional URL for the avatar image |
isAgent | boolean | undefined | No | Whether this represents an AI agent (true) or a human user (false) |
size | "sm" | "md" | "lg" | undefined | No | Size of the avatar |
className | string | undefined | No | Optional additional class names |
Agent
Represents an agent that can be selected in the AgentSelector
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier for the agent |
name | string | Yes | Display name of the agent |
avatarUrl | string | undefined | No | Optional URL for the agent's avatar image |
isAgent | boolean | Yes | Whether this is an AI agent (true) or a human user (false) |
description | string | undefined | No | Optional description of the agent's capabilities or role |
AgentSelectorProps
Props for the AgentSelector component
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
agents | Agent[] | Yes | Array of available agents to select from |
selectedAgentId | string | undefined | No | ID of the currently selected agent |
onSelect | (agentId: string) => void | Yes | Callback fired when an agent is selected |
placeholder | string | undefined | No | Placeholder text when no agent is selected |
disabled | boolean | undefined | No | Whether the selector is disabled |
className | string | undefined | No | Optional additional class names |
ScopeBadgeProps
Props for the ScopeBadge component
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
entityType | ScopeEntityType | Yes | Type of the scoped entity |
entityTitle | string | undefined | No | Optional display title for the entity |
entityId | string | undefined | No | Optional ID of the entity (used as fallback if no title) |
variant | "default" | "outline" | "secondary" | undefined | No | Visual variant of the badge |
size | "sm" | "md" | undefined | No | Size of the badge |
className | string | undefined | No | Optional additional class names |
onClick | (() => void) | undefined | No | Optional 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:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | undefined | No | Unique identifier for the tool call |
toolName | string | Yes | Name of the tool being called |
arguments | Record<string, unknown> | Yes | Arguments passed to the tool |
result | unknown | No | Result returned from the tool execution |
status | "pending" | "success" | "error" | Yes | Current status of the tool call |
ChatMessageMetadata
Metadata associated with a chat message, primarily for assistant messages
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
tokens | { input: number; output: number; total: number; } | undefined | No | Token usage information |
cost | { total: number; } | undefined | No | Cost information |
latency | number | undefined | No | Response latency in milliseconds |
model | string | undefined | No | Model used for the response |
ChatMessage
Represents a single message in a chat conversation
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier for the message |
role | "user" | "assistant" | "system" | Yes | Role of the message sender |
content | string | Yes | Text content of the message |
createdAt | string | Yes | ISO 8601 timestamp of when the message was created |
toolCalls | ChatToolCall[] | undefined | No | Tool calls made by the assistant (if any) |
metadata | ChatMessageMetadata | undefined | No | Additional metadata for the message |
ChatConversation
Represents a chat conversation
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier for the conversation |
title | string | Yes | Display title for the conversation |
updatedAt | string | Yes | ISO 8601 timestamp of when the conversation was last updated |
metadata | { messageCount: number; lastMessageAt: string; } | Yes | Conversation metadata |
extended | { agentId?: string; scopedEntityType?: "project" | "milestone" | "task" | "teamMember"; scopedEntityId?: string; scopedEntityTitle?: string; isPinned?: boolean; } | undefined | No | Extended properties for scoped conversations |
MessageBubbleProps
Props for the MessageBubble component
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
message | ChatMessage | Yes | The message to display |
className | string | undefined | No | Optional additional class names |
MessageListProps
Props for the MessageList component
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
messages | ChatMessage[] | Yes | Array of messages to display |
streamingContent | string | undefined | No | Content being streamed (for real-time display) |
emptyMessage | string | undefined | No | Message to display when there are no messages |
className | string | undefined | No | Optional additional class names |
ChatInputProps
Props for the ChatInput component
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
value | string | Yes | Current input value |
onChange | (value: string) => void | Yes | Callback when the input value changes |
onSubmit | () => void | Yes | Callback when the user submits the message |
disabled | boolean | undefined | No | Whether the input is disabled (e.g., while AI is responding) |
placeholder | string | undefined | No | Placeholder text for the input |
className | string | undefined | No | Optional additional class names |
ConversationItemProps
Props for the ConversationItem component
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
conversation | ChatConversation | Yes | The conversation to display |
isActive | boolean | Yes | Whether this conversation is currently selected |
onClick | () => void | Yes | Callback when the conversation is clicked |
onDelete | (() => void) | undefined | No | Callback when the delete button is clicked |
className | string | undefined | No | Optional additional class names |
BadgeProps
ButtonProps
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
asChild | boolean | undefined | No |