()
| 86 | t3 = () => { |
| 87 | const abortController = createAbortController(); |
| 88 | const fetchResponse = async function fetchResponse() { |
| 89 | ; |
| 90 | try { |
| 91 | const cacheSafeParams = await buildCacheSafeParams(context); |
| 92 | const result = await runSideQuestion({ |
| 93 | question, |
| 94 | cacheSafeParams |
| 95 | }); |
| 96 | if (!abortController.signal.aborted) { |
| 97 | if (result.response) { |
| 98 | setResponse(result.response); |
| 99 | } else { |
| 100 | setError("No response received"); |
| 101 | } |
| 102 | } |
| 103 | } catch (t5) { |
| 104 | const err = t5; |
| 105 | if (!abortController.signal.aborted) { |
| 106 | setError(errorMessage(err) || "Failed to get response"); |
| 107 | } |
| 108 | } |
| 109 | }; |
| 110 | fetchResponse(); |
| 111 | return () => { |
| 112 | abortController.abort(); |
no test coverage detected