@athenaintel/react 0.16.1 → 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.
@@ -25,7 +25,7 @@ import { createMessageConverter } from "@assistant-ui/core/react";
25
25
  import { convertLangChainMessages } from "@assistant-ui/react-langgraph";
26
26
  import { runsMaterialize } from "@assistant-ui/react-statewire";
27
27
  import "@assistant-ui/store";
28
- const version = "0.16.1";
28
+ const version = "0.16.2";
29
29
  const packageJson = {
30
30
  version
31
31
  };
@@ -4676,6 +4676,9 @@ const cn = function() {
4676
4676
  }
4677
4677
  return twMerge.mergeString(result);
4678
4678
  };
4679
+ function isAbortError(error2) {
4680
+ return error2 instanceof DOMException && error2.name === "AbortError" || error2 instanceof Error && error2.name === "AbortError";
4681
+ }
4679
4682
  function getAuthHeaders(auth) {
4680
4683
  if (auth.token) {
4681
4684
  return { Authorization: `Bearer ${auth.token}` };
@@ -4728,7 +4731,11 @@ async function listThreads(backendUrl, auth, opts = {}) {
4728
4731
  endSpan("threads.list.done", { data: { count: ((_a2 = data.threads) == null ? void 0 : _a2.length) ?? 0 } });
4729
4732
  return data;
4730
4733
  } catch (error2) {
4731
- endSpan("threads.list.error", { error: error2 });
4734
+ if (isAbortError(error2)) {
4735
+ endSpan("threads.list.aborted", { data: { reason: "request aborted" } });
4736
+ } else {
4737
+ endSpan("threads.list.error", { error: error2 });
4738
+ }
4732
4739
  throw error2;
4733
4740
  }
4734
4741
  }
@@ -4810,7 +4817,13 @@ async function getThreadState(backendUrl, auth, threadId) {
4810
4817
  })
4811
4818
  });
4812
4819
  } catch (error2) {
4813
- endSpan("threads.history.error", { error: error2, data: { thread_id: threadId } });
4820
+ if (isAbortError(error2)) {
4821
+ endSpan("threads.history.aborted", {
4822
+ data: { thread_id: threadId, reason: "request aborted" }
4823
+ });
4824
+ } else {
4825
+ endSpan("threads.history.error", { error: error2, data: { thread_id: threadId } });
4826
+ }
4814
4827
  throw error2;
4815
4828
  }
4816
4829
  if (!res.ok) {
@@ -36765,4 +36778,4 @@ export {
36765
36778
  convertDeepAgentState as y,
36766
36779
  deepAgentMaterialize as z
36767
36780
  };
36768
- //# sourceMappingURL=use-rest-conversation-history-CV7HyHGr.js.map
36781
+ //# sourceMappingURL=use-rest-conversation-history-FoEmnZcH.js.map