({messages}: {messages: Message[]})
| 26 | } |
| 27 | |
| 28 | function TestThread({messages}: {messages: Message[]}) { |
| 29 | return ( |
| 30 | <Chat> |
| 31 | <Thread items={messages} aria-label="Chat"> |
| 32 | {(item: Message) => ( |
| 33 | <ThreadItem textValue={item.text} isStreaming={item.isStreaming}> |
| 34 | {item.text} |
| 35 | </ThreadItem> |
| 36 | )} |
| 37 | </Thread> |
| 38 | <PromptField> |
| 39 | <PromptTokenField /> |
| 40 | </PromptField> |
| 41 | </Chat> |
| 42 | ); |
| 43 | } |
| 44 | |
| 45 | let mockAnnounce = announce as jest.MockedFunction<typeof announce>; |
| 46 | const describeOrSkip = parseInt(React.version, 10) < 19 ? describe.skip : describe; |
nothing calls this directly
no outgoing calls
no test coverage detected