components constant
Implementation
static const Map<String, BrickInfo> components = {
// ── Chat Essentials ──────────────────────────────────────────────
'chat_screen': BrickInfo(
name: 'chat_screen',
description:
'Full-featured chat screen with messages, input, and streaming.',
category: BrickCategory.chatEssentials,
dependencies: [
'message_bubble',
'input_bar',
'streaming_text',
'typing_indicator',
],
),
'message_bubble': BrickInfo(
name: 'message_bubble',
description: 'Styled message bubble supporting markdown content.',
category: BrickCategory.chatEssentials,
pubDependencies: ['flutter_markdown'],
),
'input_bar': BrickInfo(
name: 'input_bar',
description: 'Chat input bar with send button and text field.',
category: BrickCategory.chatEssentials,
),
'streaming_text': BrickInfo(
name: 'streaming_text',
description: 'Animated text widget that renders streamed token output.',
category: BrickCategory.chatEssentials,
),
'typing_indicator': BrickInfo(
name: 'typing_indicator',
description: 'Animated dots indicating the AI is responding.',
category: BrickCategory.chatEssentials,
),
// ── AI Widgets ───────────────────────────────────────────────────
'tool_call_card': BrickInfo(
name: 'tool_call_card',
description:
'Card that displays an AI tool/function call and its result.',
category: BrickCategory.aiWidgets,
),
'code_block': BrickInfo(
name: 'code_block',
description: 'Syntax-highlighted code block with copy button.',
category: BrickCategory.aiWidgets,
pubDependencies: ['flutter_highlight'],
),
'thinking_indicator': BrickInfo(
name: 'thinking_indicator',
description:
'Expandable panel showing the AI reasoning/thinking process.',
category: BrickCategory.aiWidgets,
),
'citation_card': BrickInfo(
name: 'citation_card',
description: 'Inline citation card linking to source material.',
category: BrickCategory.aiWidgets,
),
'image_preview': BrickInfo(
name: 'image_preview',
description: 'Thumbnail image preview with full-screen expansion.',
category: BrickCategory.aiWidgets,
),
// ── Conversation ─────────────────────────────────────────────────
'conversation_list': BrickInfo(
name: 'conversation_list',
description: 'Scrollable list of past conversations with search.',
category: BrickCategory.conversation,
),
'model_selector': BrickInfo(
name: 'model_selector',
description: 'Dropdown selector for switching between AI models.',
category: BrickCategory.conversation,
),
'token_usage': BrickInfo(
name: 'token_usage',
description: 'Widget displaying token count and usage statistics.',
category: BrickCategory.conversation,
),
// ── Providers ────────────────────────────────────────────────────
'openai_provider': BrickInfo(
name: 'openai_provider',
description: 'Provider implementation for the OpenAI API.',
category: BrickCategory.providers,
pubDependencies: ['http'],
),
'anthropic_provider': BrickInfo(
name: 'anthropic_provider',
description: 'Provider implementation for the Anthropic API.',
category: BrickCategory.providers,
pubDependencies: ['http'],
),
};