MCPcopy Create free account
hub / github.com/adobe/react-spectrum / TestThread

Function TestThread

packages/@react-spectrum/ai/test/Chat.test.tsx:28–43  ·  view source on GitHub ↗
({messages}: {messages: Message[]})

Source from the content-addressed store, hash-verified

26}
27
28function 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
45let mockAnnounce = announce as jest.MockedFunction<typeof announce>;
46const describeOrSkip = parseInt(React.version, 10) < 19 ? describe.skip : describe;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected