MCPcopy
hub / github.com/codeaashu/claude-code / fetchResponse

Function fetchResponse

src/commands/btw/btw.tsx:88–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers 1

BtwSideQuestionFunction · 0.85

Calls 3

buildCacheSafeParamsFunction · 0.85
runSideQuestionFunction · 0.85
errorMessageFunction · 0.50

Tested by

no test coverage detected