@assistant-ui/react 0.11.48 → 0.11.50

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.
Files changed (91) hide show
  1. package/dist/client/AssistantClient.d.ts.map +1 -1
  2. package/dist/client/AssistantClient.js +1 -2
  3. package/dist/client/AssistantClient.js.map +1 -1
  4. package/dist/client/ModelContextClient.d.ts +1 -1
  5. package/dist/client/ThreadMessageClient.d.ts.map +1 -1
  6. package/dist/client/ThreadMessageClient.js +8 -9
  7. package/dist/client/ThreadMessageClient.js.map +1 -1
  8. package/dist/client/util-hooks/tapLookupResources.d.ts +2 -2
  9. package/dist/client/util-hooks/tapLookupResources.d.ts.map +1 -1
  10. package/dist/client/util-hooks/tapLookupResources.js +13 -4
  11. package/dist/client/util-hooks/tapLookupResources.js.map +1 -1
  12. package/dist/context/providers/MessageProvider.d.ts.map +1 -1
  13. package/dist/context/providers/MessageProvider.js +1 -2
  14. package/dist/context/providers/MessageProvider.js.map +1 -1
  15. package/dist/context/providers/TextMessagePartProvider.d.ts.map +1 -1
  16. package/dist/context/providers/TextMessagePartProvider.js +1 -2
  17. package/dist/context/providers/TextMessagePartProvider.js.map +1 -1
  18. package/dist/context/react/AssistantApiContext.d.ts +1 -2
  19. package/dist/context/react/AssistantApiContext.d.ts.map +1 -1
  20. package/dist/context/react/AssistantApiContext.js +1 -12
  21. package/dist/context/react/AssistantApiContext.js.map +1 -1
  22. package/dist/legacy-runtime/client/ComposerRuntimeClient.d.ts.map +1 -1
  23. package/dist/legacy-runtime/client/ComposerRuntimeClient.js +4 -6
  24. package/dist/legacy-runtime/client/ComposerRuntimeClient.js.map +1 -1
  25. package/dist/legacy-runtime/client/EventManagerRuntimeClient.d.ts +1 -1
  26. package/dist/legacy-runtime/client/MessageRuntimeClient.d.ts.map +1 -1
  27. package/dist/legacy-runtime/client/MessageRuntimeClient.js +8 -6
  28. package/dist/legacy-runtime/client/MessageRuntimeClient.js.map +1 -1
  29. package/dist/legacy-runtime/client/ThreadListRuntimeClient.d.ts.map +1 -1
  30. package/dist/legacy-runtime/client/ThreadListRuntimeClient.js +4 -3
  31. package/dist/legacy-runtime/client/ThreadListRuntimeClient.js.map +1 -1
  32. package/dist/legacy-runtime/client/ThreadRuntimeClient.d.ts.map +1 -1
  33. package/dist/legacy-runtime/client/ThreadRuntimeClient.js +4 -6
  34. package/dist/legacy-runtime/client/ThreadRuntimeClient.js.map +1 -1
  35. package/dist/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.js +1 -1
  36. package/dist/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.js.map +1 -1
  37. package/dist/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.d.ts +1 -4
  38. package/dist/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.d.ts.map +1 -1
  39. package/dist/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.js +34 -12
  40. package/dist/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.js.map +1 -1
  41. package/dist/primitives/composer/ComposerInput.d.ts.map +1 -1
  42. package/dist/primitives/composer/ComposerInput.js +4 -2
  43. package/dist/primitives/composer/ComposerInput.js.map +1 -1
  44. package/dist/primitives/thread/ThreadViewport.d.ts +36 -0
  45. package/dist/primitives/thread/ThreadViewport.d.ts.map +1 -1
  46. package/dist/primitives/thread/ThreadViewport.js +21 -12
  47. package/dist/primitives/thread/ThreadViewport.js.map +1 -1
  48. package/dist/primitives/thread/ThreadViewportSlack.d.ts.map +1 -1
  49. package/dist/primitives/thread/ThreadViewportSlack.js +4 -1
  50. package/dist/primitives/thread/ThreadViewportSlack.js.map +1 -1
  51. package/dist/primitives/thread/useThreadViewportAutoScroll.d.ts +20 -2
  52. package/dist/primitives/thread/useThreadViewportAutoScroll.d.ts.map +1 -1
  53. package/dist/primitives/thread/useThreadViewportAutoScroll.js +21 -2
  54. package/dist/primitives/thread/useThreadViewportAutoScroll.js.map +1 -1
  55. package/dist/tests/setup.js +7 -7
  56. package/dist/tests/setup.js.map +1 -1
  57. package/dist/utils/tap-store/derived-scopes.d.ts +3 -10
  58. package/dist/utils/tap-store/derived-scopes.d.ts.map +1 -1
  59. package/dist/utils/tap-store/derived-scopes.js +14 -20
  60. package/dist/utils/tap-store/derived-scopes.js.map +1 -1
  61. package/dist/utils/tap-store/index.d.ts +1 -1
  62. package/dist/utils/tap-store/index.d.ts.map +1 -1
  63. package/dist/utils/tap-store/index.js.map +1 -1
  64. package/dist/utils/tap-store/store.d.ts +1 -7
  65. package/dist/utils/tap-store/store.d.ts.map +1 -1
  66. package/dist/utils/tap-store/store.js +2 -2
  67. package/dist/utils/tap-store/store.js.map +1 -1
  68. package/dist/utils/tap-store/tap-api.d.ts.map +1 -1
  69. package/dist/utils/tap-store/tap-api.js +13 -7
  70. package/dist/utils/tap-store/tap-api.js.map +1 -1
  71. package/package.json +5 -5
  72. package/src/client/AssistantClient.ts +0 -1
  73. package/src/client/ThreadMessageClient.tsx +10 -9
  74. package/src/client/util-hooks/tapLookupResources.ts +26 -11
  75. package/src/context/providers/MessageProvider.tsx +0 -1
  76. package/src/context/providers/TextMessagePartProvider.tsx +0 -1
  77. package/src/context/react/AssistantApiContext.tsx +1 -18
  78. package/src/legacy-runtime/client/ComposerRuntimeClient.ts +4 -6
  79. package/src/legacy-runtime/client/MessageRuntimeClient.ts +10 -6
  80. package/src/legacy-runtime/client/ThreadListRuntimeClient.ts +4 -3
  81. package/src/legacy-runtime/client/ThreadRuntimeClient.ts +4 -6
  82. package/src/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.tsx +1 -1
  83. package/src/legacy-runtime/runtime-cores/assistant-transport/useToolInvocations.ts +40 -17
  84. package/src/primitives/composer/ComposerInput.tsx +4 -2
  85. package/src/primitives/thread/ThreadViewport.tsx +49 -18
  86. package/src/primitives/thread/ThreadViewportSlack.tsx +4 -1
  87. package/src/primitives/thread/useThreadViewportAutoScroll.tsx +48 -2
  88. package/src/utils/tap-store/derived-scopes.ts +17 -28
  89. package/src/utils/tap-store/index.ts +1 -2
  90. package/src/utils/tap-store/store.ts +2 -7
  91. package/src/utils/tap-store/tap-api.ts +12 -7
@@ -1 +1 @@
1
- {"version":3,"file":"useThreadViewportAutoScroll.d.ts","sourceRoot":"","sources":["../../../src/primitives/thread/useThreadViewportAutoScroll.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAuB,MAAM,OAAO,CAAC;AAQzD,yBAAiB,2BAA2B,CAAC;IAC3C,KAAY,OAAO,GAAG;QACpB;;;;;WAKG;QACH,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KAClC,CAAC;CACH;AAED,eAAO,MAAM,2BAA2B,GAAI,QAAQ,SAAS,WAAW,EAAE,iBAEvE,2BAA2B,CAAC,OAAO,KAAG,WAAW,CAAC,QAAQ,CAiF5D,CAAC"}
1
+ {"version":3,"file":"useThreadViewportAutoScroll.d.ts","sourceRoot":"","sources":["../../../src/primitives/thread/useThreadViewportAutoScroll.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAQ9D,yBAAiB,2BAA2B,CAAC;IAC3C,KAAY,OAAO,GAAG;QACpB;;;;;WAKG;QACH,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAEjC;;;;WAIG;QACH,wBAAwB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAE/C;;;;WAIG;QACH,0BAA0B,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAEjD;;;;WAIG;QACH,4BAA4B,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KACpD,CAAC;CACH;AAED,eAAO,MAAM,2BAA2B,GAAI,QAAQ,SAAS,WAAW,EAAE,qGAKvE,2BAA2B,CAAC,OAAO,KAAG,WAAW,CAAC,QAAQ,CAuG5D,CAAC"}
@@ -10,7 +10,10 @@ import { useManagedRef } from "../../utils/hooks/useManagedRef.js";
10
10
  import { writableStore } from "../../context/ReadonlyStore.js";
11
11
  import { useThreadViewportStore } from "../../context/react/ThreadViewportContext.js";
12
12
  var useThreadViewportAutoScroll = ({
13
- autoScroll
13
+ autoScroll,
14
+ scrollToBottomOnRunStart = true,
15
+ scrollToBottomOnInitialize = true,
16
+ scrollToBottomOnThreadSwitch = true
14
17
  }) => {
15
18
  const divRef = useRef(null);
16
19
  const threadViewportStore = useThreadViewportStore();
@@ -35,7 +38,8 @@ var useThreadViewportAutoScroll = ({
35
38
  if (newIsAtBottom) {
36
39
  scrollingToBottomBehaviorRef.current = null;
37
40
  }
38
- if (newIsAtBottom !== isAtBottom) {
41
+ const shouldUpdate = newIsAtBottom || scrollingToBottomBehaviorRef.current === null;
42
+ if (shouldUpdate && newIsAtBottom !== isAtBottom) {
39
43
  writableStore(threadViewportStore).setState({
40
44
  isAtBottom: newIsAtBottom
41
45
  });
@@ -62,11 +66,26 @@ var useThreadViewportAutoScroll = ({
62
66
  scrollToBottom(behavior);
63
67
  });
64
68
  useAssistantEvent("thread.run-start", () => {
69
+ if (!scrollToBottomOnRunStart) return;
65
70
  scrollingToBottomBehaviorRef.current = "auto";
66
71
  requestAnimationFrame(() => {
67
72
  scrollToBottom("auto");
68
73
  });
69
74
  });
75
+ useAssistantEvent("thread.initialize", () => {
76
+ if (!scrollToBottomOnInitialize) return;
77
+ scrollingToBottomBehaviorRef.current = "instant";
78
+ requestAnimationFrame(() => {
79
+ scrollToBottom("instant");
80
+ });
81
+ });
82
+ useAssistantEvent("thread-list-item.switched-to", () => {
83
+ if (!scrollToBottomOnThreadSwitch) return;
84
+ scrollingToBottomBehaviorRef.current = "instant";
85
+ requestAnimationFrame(() => {
86
+ scrollToBottom("instant");
87
+ });
88
+ });
70
89
  const autoScrollRef = useComposedRefs(resizeRef, scrollRef, divRef);
71
90
  return autoScrollRef;
72
91
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/primitives/thread/useThreadViewportAutoScroll.tsx"],"sourcesContent":["\"use client\";\n\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { RefCallback, useCallback, useRef } from \"react\";\nimport { useAssistantEvent } from \"../../context\";\nimport { useOnResizeContent } from \"../../utils/hooks/useOnResizeContent\";\nimport { useOnScrollToBottom } from \"../../utils/hooks/useOnScrollToBottom\";\nimport { useManagedRef } from \"../../utils/hooks/useManagedRef\";\nimport { writableStore } from \"../../context/ReadonlyStore\";\nimport { useThreadViewportStore } from \"../../context/react/ThreadViewportContext\";\n\nexport namespace useThreadViewportAutoScroll {\n export type Options = {\n /**\n * Whether to automatically scroll to the bottom when new messages are added.\n * When enabled, the viewport will automatically scroll to show the latest content.\n *\n * Default false if `turnAnchor` is \"top\", otherwise defaults to true.\n */\n autoScroll?: boolean | undefined;\n };\n}\n\nexport const useThreadViewportAutoScroll = <TElement extends HTMLElement>({\n autoScroll,\n}: useThreadViewportAutoScroll.Options): RefCallback<TElement> => {\n const divRef = useRef<TElement>(null);\n\n const threadViewportStore = useThreadViewportStore();\n if (autoScroll === undefined) {\n autoScroll = threadViewportStore.getState().turnAnchor !== \"top\";\n }\n\n const lastScrollTop = useRef<number>(0);\n\n // bug: when ScrollToBottom's button changes its disabled state, the scroll stops\n // fix: delay the state change until the scroll is done\n // stores the scroll behavior to reuse during content resize, or null if not scrolling\n const scrollingToBottomBehaviorRef = useRef<ScrollBehavior | null>(null);\n\n const scrollToBottom = useCallback((behavior: ScrollBehavior) => {\n const div = divRef.current;\n if (!div) return;\n\n scrollingToBottomBehaviorRef.current = behavior;\n div.scrollTo({ top: div.scrollHeight, behavior });\n }, []);\n\n const handleScroll = () => {\n const div = divRef.current;\n if (!div) return;\n\n const isAtBottom = threadViewportStore.getState().isAtBottom;\n const newIsAtBottom =\n Math.abs(div.scrollHeight - div.scrollTop - div.clientHeight) < 1 ||\n div.scrollHeight <= div.clientHeight;\n\n if (!newIsAtBottom && lastScrollTop.current < div.scrollTop) {\n // ignore scroll down\n } else {\n if (newIsAtBottom) {\n scrollingToBottomBehaviorRef.current = null;\n }\n\n if (newIsAtBottom !== isAtBottom) {\n writableStore(threadViewportStore).setState({\n isAtBottom: newIsAtBottom,\n });\n }\n }\n\n lastScrollTop.current = div.scrollTop;\n };\n\n const resizeRef = useOnResizeContent(() => {\n const scrollBehavior = scrollingToBottomBehaviorRef.current;\n if (scrollBehavior) {\n scrollToBottom(scrollBehavior);\n } else if (autoScroll && threadViewportStore.getState().isAtBottom) {\n scrollToBottom(\"instant\");\n }\n\n handleScroll();\n });\n\n const scrollRef = useManagedRef<HTMLElement>((el) => {\n el.addEventListener(\"scroll\", handleScroll);\n return () => {\n el.removeEventListener(\"scroll\", handleScroll);\n };\n });\n\n useOnScrollToBottom(({ behavior }) => {\n scrollToBottom(behavior);\n });\n\n // autoscroll on run start\n useAssistantEvent(\"thread.run-start\", () => {\n scrollingToBottomBehaviorRef.current = \"auto\";\n requestAnimationFrame(() => {\n scrollToBottom(\"auto\");\n });\n });\n\n const autoScrollRef = useComposedRefs<TElement>(resizeRef, scrollRef, divRef);\n return autoScrollRef as RefCallback<TElement>;\n};\n"],"mappings":";;;AAEA,SAAS,uBAAuB;AAChC,SAAsB,aAAa,cAAc;AACjD,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,2BAA2B;AACpC,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,8BAA8B;AAchC,IAAM,8BAA8B,CAA+B;AAAA,EACxE;AACF,MAAkE;AAChE,QAAM,SAAS,OAAiB,IAAI;AAEpC,QAAM,sBAAsB,uBAAuB;AACnD,MAAI,eAAe,QAAW;AAC5B,iBAAa,oBAAoB,SAAS,EAAE,eAAe;AAAA,EAC7D;AAEA,QAAM,gBAAgB,OAAe,CAAC;AAKtC,QAAM,+BAA+B,OAA8B,IAAI;AAEvE,QAAM,iBAAiB,YAAY,CAAC,aAA6B;AAC/D,UAAM,MAAM,OAAO;AACnB,QAAI,CAAC,IAAK;AAEV,iCAA6B,UAAU;AACvC,QAAI,SAA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ViewportAutoScroll.tsx"],"sourcesContent":["\"use client\";\n\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallback, useRef, type RefCallback } from \"react\";\nimport { useAssistantEvent } from \"../../context\";\nimport { useOnResizeContent } from \"../../utils/hooks/useOnResizeContent\";\nimport { useOnScrollToBottom } from \"../../utils/hooks/useOnScrollToBottom\";\nimport { useManagedRef } from \"../../utils/hooks/useManagedRef\";\nimport { writableStore } from \"../../context/ReadonlyStore\";\nimport { useThreadViewportStore } from \"../../context/react/ThreadViewportContext\";\n\nexport namespace useThreadViewportAutoScroll {\n export type Options = {\n /**\n * Whether to automatically scroll to the bottom when new messages are added.\n * When enabled, the viewport will automatically scroll to show the latest content.\n *\n * Default false if `turnAnchor` is \"top\", otherwise defaults to true.\n */\n autoScroll?: boolean | undefined;\n\n /**\n * Whether to scroll to bottom when a new run starts.\n *\n * Defaults to true.\n */\n scrollToBottomOnRunStart?: boolean | undefined;\n\n /**\n * Whether to scroll to bottom when thread history is first loaded.\n *\n * Defaults to true.\n */\n scrollToBottomOnInitialize?: boolean | undefined;\n\n /**\n * Whether to scroll to bottom when switching to a different thread.\n *\n * Defaults to true.\n */\n scrollToBottomOnThreadSwitch?: boolean | undefined;\n };\n}\n\nexport const useThreadViewportAutoScroll = <TElement extends HTMLElement>({\n autoScroll,\n scrollToBottomOnRunStart = true,\n scrollToBottomOnInitialize = true,\n scrollToBottomOnThreadSwitch = true,\n}: useThreadViewportAutoScroll.Options): RefCallback<TElement> => {\n const divRef = useRef<TElement>(null);\n\n const threadViewportStore = useThreadViewportStore();\n if (autoScroll === undefined) {\n autoScroll = threadViewportStore.getState().turnAnchor !== \"top\";\n }\n\n const lastScrollTop = useRef<number>(0);\n\n // bug: when ScrollToBottom's button changes its disabled state, the scroll stops\n // fix: delay the state change until the scroll is done\n // stores the scroll behavior to reuse during content resize, or null if not scrolling\n const scrollingToBottomBehaviorRef = useRef<ScrollBehavior | null>(null);\n\n const scrollToBottom = useCallback((behavior: ScrollBehavior) => {\n const div = divRef.current;\n if (!div) return;\n\n scrollingToBottomBehaviorRef.current = behavior;\n div.scrollTo({ top: div.scrollHeight, behavior });\n }, []);\n\n const handleScroll = () => {\n const div = divRef.current;\n if (!div) return;\n\n const isAtBottom = threadViewportStore.getState().isAtBottom;\n const newIsAtBottom =\n Math.abs(div.scrollHeight - div.scrollTop - div.clientHeight) < 1 ||\n div.scrollHeight <= div.clientHeight;\n\n if (!newIsAtBottom && lastScrollTop.current < div.scrollTop) {\n // ignore scroll down\n } else {\n if (newIsAtBottom) {\n scrollingToBottomBehaviorRef.current = null;\n }\n\n const shouldUpdate =\n newIsAtBottom || scrollingToBottomBehaviorRef.current === null;\n\n if (shouldUpdate && newIsAtBottom !== isAtBottom) {\n writableStore(threadViewportStore).setState({\n isAtBottom: newIsAtBottom,\n });\n }\n }\n\n lastScrollTop.current = div.scrollTop;\n };\n\n const resizeRef = useOnResizeContent(() => {\n const scrollBehavior = scrollingToBottomBehaviorRef.current;\n if (scrollBehavior) {\n scrollToBottom(scrollBehavior);\n } else if (autoScroll && threadViewportStore.getState().isAtBottom) {\n scrollToBottom(\"instant\");\n }\n\n handleScroll();\n });\n\n const scrollRef = useManagedRef<HTMLElement>((el) => {\n el.addEventListener(\"scroll\", handleScroll);\n return () => {\n el.removeEventListener(\"scroll\", handleScroll);\n };\n });\n\n useOnScrollToBottom(({ behavior }) => {\n scrollToBottom(behavior);\n });\n\n // autoscroll on run start\n useAssistantEvent(\"thread.run-start\", () => {\n if (!scrollToBottomOnRunStart) return;\n scrollingToBottomBehaviorRef.current = \"auto\";\n requestAnimationFrame(() => {\n scrollToBottom(\"auto\");\n });\n });\n\n // scroll to bottom instantly when thread history is first loaded\n useAssistantEvent(\"thread.initialize\", () => {\n if (!scrollToBottomOnInitialize) return;\n scrollingToBottomBehaviorRef.current = \"instant\";\n requestAnimationFrame(() => {\n scrollToBottom(\"instant\");\n });\n });\n\n // scroll to bottom instantly when switching threads\n useAssistantEvent(\"thread-list-item.switched-to\", () => {\n if (!scrollToBottomOnThreadSwitch) return;\n scrollingToBottomBehaviorRef.current = \"instant\";\n requestAnimationFrame(() => {\n scrollToBottom(\"instant\");\n });\n });\n\n const autoScrollRef = useComposedRefs<TElement>(resizeRef, scrollRef, divRef);\n return autoScrollRef as RefCallback<TElement>;\n};\n"],"mappings":";;;AAEA,SAAS,uBAAuB;AAChC,SAAS,aAAa,cAAgC;AACtD,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,2BAA2B;AACpC,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,8BAA8B;AAmChC,IAAM,8BAA8B,CAA+B;AAAA,EACxE;AAAA,EACA,2BAA2B;AAAA,EAC3B,6BAA6B;AAAA,EAC7B,+BAA+B;AACjC,MAAkE;AAChE,QAAM,SAAS,OAAiB,IAAI;AAEpC,QAAM,sBAAsB,uBAAuB;AACnD,MAAI,eAAe,QAAW;AAC5B,iBAAa,oBAAoB,SAAS,EAAE,eAAe;AAAA,EAC7D;AAEA,QAAM,gBAAgB,OAAe,CAAC;AAKtC,QAAM,+BAA+B,OAA8B,IAAI;AAEvE,QAAM,iBAAiB,YAAY,CAAC,aAA6B;AAC/D,UAAM,MAAM,OAAO;AACnB,QAAI,CAAC,IAAK;AAEV,iCAA6B,UAAU;AACvC,QAAI,SAAS,EAAE,KAAK,IAAI,cAAc,SAAS,CAAC;AAAA,EAClD,GAAG,CAAC,CAAC;AAEL,QAAM,eAAe,MAAM;AACzB,UAAM,MAAM,OAAO;AACnB,QAAI,CAAC,IAAK;AAEV,UAAM,aAAa,oBAAoB,SAAS,EAAE;AAClD,UAAM,gBACJ,KAAK,IAAI,IAAI,eAAe,IAAI,YAAY,IAAI,YAAY,IAAI,KAChE,IAAI,gBAAgB,IAAI;AAE1B,QAAI,CAAC,iBAAiB,cAAc,UAAU,IAAI,WAAW;AAAA,IAE7D,OAAO;AACL,UAAI,eAAe;AACjB,qCAA6B,UAAU;AAAA,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4.0.15_@opentelemetry+api@1.9.0_@types+node@24.10.1_@vitest+ui@4.0.15_jiti@2.6.1_1316c7438d8db3eab2efa08f08502397/node_modules/vitest/dist/chunks/vi.2VT5v0um.js
1
+ // ../../node_modules/.pnpm/vitest@4.0.15_@opentelemetry+api@1.9.0_@types+node@25.0.0_@vitest+ui@4.0.15_jiti@2.6.1__a905abac14c7ecb2319509a42a33135d/node_modules/vitest/dist/chunks/vi.2VT5v0um.js
2
2
  import { chai, equals, iterableEquality, subsetEquality, JestExtend, JestChaiExpect, JestAsymmetricMatchers, GLOBAL_EXPECT, ASYMMETRIC_MATCHERS_OBJECT, getState, setState, addCustomEqualityTesters, customMatchers } from "@vitest/expect.js";
3
3
  import { getCurrentTest } from "@vitest/runner.js";
4
4
 
5
- // ../../node_modules/.pnpm/vitest@4.0.15_@opentelemetry+api@1.9.0_@types+node@24.10.1_@vitest+ui@4.0.15_jiti@2.6.1_1316c7438d8db3eab2efa08f08502397/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js
5
+ // ../../node_modules/.pnpm/vitest@4.0.15_@opentelemetry+api@1.9.0_@types+node@25.0.0_@vitest+ui@4.0.15_jiti@2.6.1__a905abac14c7ecb2319509a42a33135d/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js
6
6
  import { getSafeTimers } from "@vitest/utils/timers.js";
7
7
  var NAME_WORKER_STATE = "__vitest_worker__";
8
8
  function getWorkerState() {
@@ -43,7 +43,7 @@ async function waitForImportsToResolve() {
43
43
  await waitForImportsToResolve();
44
44
  }
45
45
 
46
- // ../../node_modules/.pnpm/vitest@4.0.15_@opentelemetry+api@1.9.0_@types+node@24.10.1_@vitest+ui@4.0.15_jiti@2.6.1_1316c7438d8db3eab2efa08f08502397/node_modules/vitest/dist/chunks/vi.2VT5v0um.js
46
+ // ../../node_modules/.pnpm/vitest@4.0.15_@opentelemetry+api@1.9.0_@types+node@25.0.0_@vitest+ui@4.0.15_jiti@2.6.1__a905abac14c7ecb2319509a42a33135d/node_modules/vitest/dist/chunks/vi.2VT5v0um.js
47
47
  import { getSafeTimers as getSafeTimers2, delay } from "@vitest/utils/timers.js";
48
48
  import { getNames } from "@vitest/runner/utils.js";
49
49
  import { stripSnapshotIndentation, addSerializer, SnapshotClient } from "@vitest/snapshot.js";
@@ -53,10 +53,10 @@ import { fn, spyOn, restoreAllMocks, resetAllMocks, clearAllMocks, isMockFunctio
53
53
  import "@vitest/utils/offset.js";
54
54
  import { parseSingleStack } from "@vitest/utils/source-map.js";
55
55
 
56
- // ../../node_modules/.pnpm/vitest@4.0.15_@opentelemetry+api@1.9.0_@types+node@24.10.1_@vitest+ui@4.0.15_jiti@2.6.1_1316c7438d8db3eab2efa08f08502397/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js
56
+ // ../../node_modules/.pnpm/vitest@4.0.15_@opentelemetry+api@1.9.0_@types+node@25.0.0_@vitest+ui@4.0.15_jiti@2.6.1__a905abac14c7ecb2319509a42a33135d/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js
57
57
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
58
58
 
59
- // ../../node_modules/.pnpm/vitest@4.0.15_@opentelemetry+api@1.9.0_@types+node@24.10.1_@vitest+ui@4.0.15_jiti@2.6.1_1316c7438d8db3eab2efa08f08502397/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js
59
+ // ../../node_modules/.pnpm/vitest@4.0.15_@opentelemetry+api@1.9.0_@types+node@25.0.0_@vitest+ui@4.0.15_jiti@2.6.1__a905abac14c7ecb2319509a42a33135d/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js
60
60
  var RealDate = Date;
61
61
  var now = null;
62
62
  var MockDate = class _MockDate extends RealDate {
@@ -104,7 +104,7 @@ function resetDate() {
104
104
  globalThis.Date = RealDate;
105
105
  }
106
106
 
107
- // ../../node_modules/.pnpm/vitest@4.0.15_@opentelemetry+api@1.9.0_@types+node@24.10.1_@vitest+ui@4.0.15_jiti@2.6.1_1316c7438d8db3eab2efa08f08502397/node_modules/vitest/dist/chunks/vi.2VT5v0um.js
107
+ // ../../node_modules/.pnpm/vitest@4.0.15_@opentelemetry+api@1.9.0_@types+node@25.0.0_@vitest+ui@4.0.15_jiti@2.6.1__a905abac14c7ecb2319509a42a33135d/node_modules/vitest/dist/chunks/vi.2VT5v0um.js
108
108
  var unsupported = [
109
109
  "matchSnapshot",
110
110
  "toMatchSnapshot",
@@ -2698,7 +2698,7 @@ function getImporter(name) {
2698
2698
  }) + 1])?.file || "";
2699
2699
  }
2700
2700
 
2701
- // ../../node_modules/.pnpm/vitest@4.0.15_@opentelemetry+api@1.9.0_@types+node@24.10.1_@vitest+ui@4.0.15_jiti@2.6.1_1316c7438d8db3eab2efa08f08502397/node_modules/vitest/dist/index.js
2701
+ // ../../node_modules/.pnpm/vitest@4.0.15_@opentelemetry+api@1.9.0_@types+node@25.0.0_@vitest+ui@4.0.15_jiti@2.6.1__a905abac14c7ecb2319509a42a33135d/node_modules/vitest/dist/index.js
2702
2702
  import { expectTypeOf } from "expect-type.js";
2703
2703
  import { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, recordArtifact, suite, test } from "@vitest/runner.js";
2704
2704
  import { chai as chai2 } from "@vitest/expect.js";