({ question }: { question: string })
| 23 | } |
| 24 | |
| 25 | function ChatMessage({ question }: { question: string }) { |
| 26 | const { error, data = [], isFetching } = useQuery(chatQueryOptions(question)) |
| 27 | |
| 28 | if (error) return 'An error has occurred: ' + error.message |
| 29 | |
| 30 | return ( |
| 31 | <div> |
| 32 | <Message message={{ content: question, isQuestion: true }} /> |
| 33 | <Message |
| 34 | inProgress={isFetching} |
| 35 | message={{ content: data.join(' '), isQuestion: false }} |
| 36 | /> |
| 37 | </div> |
| 38 | ) |
| 39 | } |
| 40 | |
| 41 | function Example() { |
| 42 | const [questions, setQuestions] = useState<Array<string>>([]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…