|
| 1 | +import type { Meta, StoryObj } from '@storybook/react' |
| 2 | +import { ChatDemo } from './demo' |
| 3 | +import { ChatDemoLongMessages } from './demo-long-messages' |
| 4 | +import { |
| 5 | + ChatDemoToolCalling, |
| 6 | + ChatDemoMarkdownResponses, |
| 7 | + ChatDemoUIComponents, |
| 8 | + ChatDemoFileUploads, |
| 9 | + ChatDemoErrorHandling, |
| 10 | + ChatDemoCapabilitiesInteraction |
| 11 | +} from './demo-tests' |
| 12 | + |
| 13 | +const meta: Meta<typeof ChatDemo> = { |
| 14 | + title: 'Chat/Chat Demo', |
| 15 | + component: ChatDemo, |
| 16 | + parameters: { |
| 17 | + layout: 'fullscreen', |
| 18 | + }, |
| 19 | +} |
| 20 | + |
| 21 | +export default meta |
| 22 | +type Story = StoryObj<typeof ChatDemo> |
| 23 | + |
| 24 | +export const Default: Story = { |
| 25 | + name: 'Clean Interface with File Upload & Bottom Capabilities', |
| 26 | + parameters: { |
| 27 | + docs: { |
| 28 | + description: { |
| 29 | + story: 'Basic chat interface with file upload capabilities and bottom menu.', |
| 30 | + }, |
| 31 | + }, |
| 32 | + }, |
| 33 | +} |
| 34 | + |
| 35 | +export const LongMessages: StoryObj<typeof ChatDemoLongMessages> = { |
| 36 | + render: () => <ChatDemoLongMessages />, |
| 37 | + name: 'Long Text Messages', |
| 38 | + parameters: { |
| 39 | + docs: { |
| 40 | + description: { |
| 41 | + story: 'Demonstrates how the chat interface handles very long text messages with proper width constraints and text wrapping.', |
| 42 | + }, |
| 43 | + }, |
| 44 | + }, |
| 45 | +} |
| 46 | + |
| 47 | +export const ToolCalling: StoryObj<typeof ChatDemoToolCalling> = { |
| 48 | + render: () => <ChatDemoToolCalling />, |
| 49 | + name: 'Tool Calling & Function Execution', |
| 50 | + parameters: { |
| 51 | + docs: { |
| 52 | + description: { |
| 53 | + story: 'Tests the interface with tool calling scenarios, including function execution, results display, and error handling.', |
| 54 | + }, |
| 55 | + }, |
| 56 | + }, |
| 57 | +} |
| 58 | + |
| 59 | +export const MarkdownResponses: StoryObj<typeof ChatDemoMarkdownResponses> = { |
| 60 | + render: () => <ChatDemoMarkdownResponses />, |
| 61 | + name: 'Markdown & Rich Text Responses', |
| 62 | + parameters: { |
| 63 | + docs: { |
| 64 | + description: { |
| 65 | + story: 'Tests how the chat interface renders markdown content including code blocks, tables, lists, and formatting.', |
| 66 | + }, |
| 67 | + }, |
| 68 | + }, |
| 69 | +} |
| 70 | + |
| 71 | +export const UIComponents: StoryObj<typeof ChatDemoUIComponents> = { |
| 72 | + render: () => <ChatDemoUIComponents />, |
| 73 | + name: 'Custom UI Components', |
| 74 | + parameters: { |
| 75 | + docs: { |
| 76 | + description: { |
| 77 | + story: 'Tests the interface with custom UI components like charts, cards, and interactive elements.', |
| 78 | + }, |
| 79 | + }, |
| 80 | + }, |
| 81 | +} |
| 82 | + |
| 83 | +export const FileUploads: StoryObj<typeof ChatDemoFileUploads> = { |
| 84 | + render: () => <ChatDemoFileUploads />, |
| 85 | + name: 'File Upload Scenarios', |
| 86 | + parameters: { |
| 87 | + docs: { |
| 88 | + description: { |
| 89 | + story: 'Tests various file upload scenarios including different file types, sizes, and upload states.', |
| 90 | + }, |
| 91 | + }, |
| 92 | + }, |
| 93 | +} |
| 94 | + |
| 95 | +export const ErrorHandling: StoryObj<typeof ChatDemoErrorHandling> = { |
| 96 | + render: () => <ChatDemoErrorHandling />, |
| 97 | + name: 'Error Handling & Edge Cases', |
| 98 | + parameters: { |
| 99 | + docs: { |
| 100 | + description: { |
| 101 | + story: 'Tests error scenarios, loading states, and edge cases in the chat interface.', |
| 102 | + }, |
| 103 | + }, |
| 104 | + }, |
| 105 | +} |
| 106 | + |
| 107 | +export const CapabilitiesInteraction: StoryObj<typeof ChatDemoCapabilitiesInteraction> = { |
| 108 | + render: () => <ChatDemoCapabilitiesInteraction />, |
| 109 | + name: 'Capabilities Menu Interaction', |
| 110 | + parameters: { |
| 111 | + docs: { |
| 112 | + description: { |
| 113 | + story: 'Tests the capabilities menu functionality, navigation, and action triggering.', |
| 114 | + }, |
| 115 | + }, |
| 116 | + }, |
| 117 | +} |
0 commit comments