()
| 21 | } |
| 22 | |
| 23 | render() { |
| 24 | const { error, data, isFetching } = this.message() |
| 25 | |
| 26 | if (error) return html`An error has occurred: ${error.message}` |
| 27 | |
| 28 | return html` |
| 29 | <div> |
| 30 | <message-bubble |
| 31 | .message=${{ content: this.question, isQuestion: true }} |
| 32 | ></message-bubble> |
| 33 | <message-bubble |
| 34 | .inProgress=${isFetching} |
| 35 | .message=${{ content: (data ?? []).join(' '), isQuestion: false }} |
| 36 | ></message-bubble> |
| 37 | </div> |
| 38 | ` |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | customElements.define('chat-message', ChatMessage) |
nothing calls this directly
no outgoing calls
no test coverage detected