@athenaintel/react 0.16.0 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,7 +63,7 @@ function _interopNamespaceDefault(e) {
63
63
  }
64
64
  const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
65
65
  const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
66
- const version = "0.16.0";
66
+ const version = "0.16.2";
67
67
  const packageJson = {
68
68
  version
69
69
  };
@@ -4714,6 +4714,9 @@ const cn = function() {
4714
4714
  }
4715
4715
  return twMerge.mergeString(result);
4716
4716
  };
4717
+ function isAbortError(error2) {
4718
+ return error2 instanceof DOMException && error2.name === "AbortError" || error2 instanceof Error && error2.name === "AbortError";
4719
+ }
4717
4720
  function getAuthHeaders(auth) {
4718
4721
  if (auth.token) {
4719
4722
  return { Authorization: `Bearer ${auth.token}` };
@@ -4766,7 +4769,11 @@ async function listThreads(backendUrl, auth, opts = {}) {
4766
4769
  endSpan("threads.list.done", { data: { count: ((_a2 = data.threads) == null ? void 0 : _a2.length) ?? 0 } });
4767
4770
  return data;
4768
4771
  } catch (error2) {
4769
- endSpan("threads.list.error", { error: error2 });
4772
+ if (isAbortError(error2)) {
4773
+ endSpan("threads.list.aborted", { data: { reason: "request aborted" } });
4774
+ } else {
4775
+ endSpan("threads.list.error", { error: error2 });
4776
+ }
4770
4777
  throw error2;
4771
4778
  }
4772
4779
  }
@@ -4848,7 +4855,13 @@ async function getThreadState(backendUrl, auth, threadId) {
4848
4855
  })
4849
4856
  });
4850
4857
  } catch (error2) {
4851
- endSpan("threads.history.error", { error: error2, data: { thread_id: threadId } });
4858
+ if (isAbortError(error2)) {
4859
+ endSpan("threads.history.aborted", {
4860
+ data: { thread_id: threadId, reason: "request aborted" }
4861
+ });
4862
+ } else {
4863
+ endSpan("threads.history.error", { error: error2, data: { thread_id: threadId } });
4864
+ }
4852
4865
  throw error2;
4853
4866
  }
4854
4867
  if (!res.ok) {
@@ -36801,4 +36814,4 @@ exports.useRestConversationHistory = useRestConversationHistory;
36801
36814
  exports.useStore = useStore;
36802
36815
  exports.withCaptureGateBypass = withCaptureGateBypass;
36803
36816
  exports.wrapPosthogClient = wrapPosthogClient;
36804
- //# sourceMappingURL=use-rest-conversation-history-DqpE-QGK.cjs.map
36817
+ //# sourceMappingURL=use-rest-conversation-history-CbMCaMzR.cjs.map