@assistant-ui/react 0.5.85 → 0.5.86

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.
package/dist/index.mjs CHANGED
@@ -3061,7 +3061,7 @@ var subscribeToMainThread = (runtime, callback) => {
3061
3061
  };
3062
3062
 
3063
3063
  // src/runtimes/local/useLocalRuntime.tsx
3064
- import { useEffect as useEffect17, useMemo as useMemo11, useState as useState13 } from "react";
3064
+ import { useEffect as useEffect17, useMemo as useMemo11, useState as useState12 } from "react";
3065
3065
 
3066
3066
  // src/utils/ProxyConfigProvider.ts
3067
3067
  var ProxyConfigProvider = class {
@@ -4101,9 +4101,6 @@ var streamUtils = {
4101
4101
  streamPartDecoderStream
4102
4102
  };
4103
4103
 
4104
- // src/runtimes/edge/useEdgeRuntime.ts
4105
- import { useState as useState12 } from "react";
4106
-
4107
4104
  // src/runtimes/edge/streams/assistantDecoderStream.ts
4108
4105
  function assistantDecoderStream() {
4109
4106
  const toolCallNames = /* @__PURE__ */ new Map();
@@ -4283,8 +4280,10 @@ var splitLocalRuntimeOptions = (options) => {
4283
4280
  // src/runtimes/edge/useEdgeRuntime.ts
4284
4281
  var useEdgeRuntime = (options) => {
4285
4282
  const { localRuntimeOptions, otherOptions } = splitLocalRuntimeOptions(options);
4286
- const [adapter] = useState12(() => new EdgeChatAdapter(otherOptions));
4287
- return useLocalRuntime(adapter, localRuntimeOptions);
4283
+ return useLocalRuntime(
4284
+ new EdgeChatAdapter(otherOptions),
4285
+ localRuntimeOptions
4286
+ );
4288
4287
  };
4289
4288
 
4290
4289
  // src/runtimes/local/shouldContinue.tsx
@@ -4834,7 +4833,7 @@ var useLocalRuntime = (adapter, options = {}) => {
4834
4833
  chatModel: adapter
4835
4834
  }
4836
4835
  };
4837
- const [runtime] = useState13(() => new LocalRuntimeCore(opt));
4836
+ const [runtime] = useState12(() => new LocalRuntimeCore(opt));
4838
4837
  useEffect17(() => {
4839
4838
  runtime.setOptions(opt);
4840
4839
  });
@@ -4842,7 +4841,7 @@ var useLocalRuntime = (adapter, options = {}) => {
4842
4841
  };
4843
4842
 
4844
4843
  // src/runtimes/external-store/useExternalStoreRuntime.tsx
4845
- import { useEffect as useEffect18, useMemo as useMemo12, useState as useState14 } from "react";
4844
+ import { useEffect as useEffect18, useMemo as useMemo12, useState as useState13 } from "react";
4846
4845
 
4847
4846
  // src/runtimes/external-store/ExternalStoreThreadManagementAdapter.tsx
4848
4847
  var EMPTY_ARRAY2 = Object.freeze([]);
@@ -5228,7 +5227,7 @@ var ExternalStoreRuntimeCore = class extends BaseAssistantRuntimeCore {
5228
5227
 
5229
5228
  // src/runtimes/external-store/useExternalStoreRuntime.tsx
5230
5229
  var useExternalStoreRuntime = (store) => {
5231
- const [runtime] = useState14(() => new ExternalStoreRuntimeCore(store));
5230
+ const [runtime] = useState13(() => new ExternalStoreRuntimeCore(store));
5232
5231
  useEffect18(() => {
5233
5232
  runtime.setStore(store);
5234
5233
  });
@@ -5385,7 +5384,7 @@ var shallowArrayEqual = (a, b) => {
5385
5384
  };
5386
5385
 
5387
5386
  // src/runtimes/dangerous-in-browser/useDangerousInBrowserRuntime.ts
5388
- import { useState as useState15 } from "react";
5387
+ import { useState as useState14 } from "react";
5389
5388
 
5390
5389
  // src/runtimes/dangerous-in-browser/DangerousInBrowserAdapter.ts
5391
5390
  var DangerousInBrowserAdapter = class {
@@ -5414,7 +5413,7 @@ var DangerousInBrowserAdapter = class {
5414
5413
  // src/runtimes/dangerous-in-browser/useDangerousInBrowserRuntime.ts
5415
5414
  var useDangerousInBrowserRuntime = (options) => {
5416
5415
  const { localRuntimeOptions, otherOptions } = splitLocalRuntimeOptions(options);
5417
- const [adapter] = useState15(() => new DangerousInBrowserAdapter(otherOptions));
5416
+ const [adapter] = useState14(() => new DangerousInBrowserAdapter(otherOptions));
5418
5417
  return useLocalRuntime(adapter, localRuntimeOptions);
5419
5418
  };
5420
5419
 
@@ -6001,7 +6000,7 @@ CircleStopIcon.displayName = "CircleStopIcon";
6001
6000
  import {
6002
6001
  forwardRef as forwardRef28,
6003
6002
  useEffect as useEffect19,
6004
- useState as useState16
6003
+ useState as useState15
6005
6004
  } from "react";
6006
6005
  import { CircleXIcon, FileIcon } from "lucide-react";
6007
6006
 
@@ -6044,7 +6043,7 @@ var AttachmentRoot = withDefaults(attachment_exports.Root, {
6044
6043
  });
6045
6044
  AttachmentRoot.displayName = "AttachmentRoot";
6046
6045
  var useFileSrc = (file) => {
6047
- const [src, setSrc] = useState16(void 0);
6046
+ const [src, setSrc] = useState15(void 0);
6048
6047
  useEffect19(() => {
6049
6048
  if (!file) {
6050
6049
  setSrc(void 0);
@@ -6069,7 +6068,7 @@ var useAttachmentSrc = () => {
6069
6068
  return useFileSrc(file) ?? src;
6070
6069
  };
6071
6070
  var AttachmentPreview = ({ src }) => {
6072
- const [isLoaded, setIsLoaded] = useState16(false);
6071
+ const [isLoaded, setIsLoaded] = useState15(false);
6073
6072
  return (
6074
6073
  // eslint-disable-next-line @next/next/no-img-element
6075
6074
  /* @__PURE__ */ jsx46(