@assistant-ui/react 0.5.71 → 0.5.72

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
@@ -3979,19 +3979,20 @@ var EdgeChatAdapter = class {
3979
3979
  }
3980
3980
  };
3981
3981
 
3982
+ // src/runtimes/local/LocalRuntimeOptions.tsx
3983
+ var splitLocalRuntimeOptions = (options) => {
3984
+ const { initialMessages, maxToolRoundtrips, adapters, ...rest } = options;
3985
+ return {
3986
+ localRuntimeOptions: { initialMessages, maxToolRoundtrips, adapters },
3987
+ otherOptions: rest
3988
+ };
3989
+ };
3990
+
3982
3991
  // src/runtimes/edge/useEdgeRuntime.ts
3983
- var useEdgeRuntime = ({
3984
- initialMessages,
3985
- maxToolRoundtrips,
3986
- adapters,
3987
- ...options
3988
- }) => {
3989
- const [adapter] = useState10(() => new EdgeChatAdapter(options));
3990
- return useLocalRuntime(adapter, {
3991
- initialMessages,
3992
- maxToolRoundtrips,
3993
- adapters
3994
- });
3992
+ var useEdgeRuntime = (options) => {
3993
+ const { localRuntimeOptions, otherOptions } = splitLocalRuntimeOptions(options);
3994
+ const [adapter] = useState10(() => new EdgeChatAdapter(otherOptions));
3995
+ return useLocalRuntime(adapter, localRuntimeOptions);
3995
3996
  };
3996
3997
 
3997
3998
  // src/runtimes/local/shouldContinue.tsx
@@ -4921,12 +4922,10 @@ var DangerousInBrowserAdapter = class {
4921
4922
  };
4922
4923
 
4923
4924
  // src/runtimes/dangerous-in-browser/useDangerousInBrowserRuntime.ts
4924
- var useDangerousInBrowserRuntime = ({
4925
- initialMessages,
4926
- ...options
4927
- }) => {
4928
- const [adapter] = useState13(() => new DangerousInBrowserAdapter(options));
4929
- return useLocalRuntime(adapter, { initialMessages });
4925
+ var useDangerousInBrowserRuntime = (options) => {
4926
+ const { localRuntimeOptions, otherOptions } = splitLocalRuntimeOptions(options);
4927
+ const [adapter] = useState13(() => new DangerousInBrowserAdapter(otherOptions));
4928
+ return useLocalRuntime(adapter, localRuntimeOptions);
4930
4929
  };
4931
4930
 
4932
4931
  // src/runtimes/speech/WebSpeechSynthesisAdapter.ts