@assistant-ui/react 0.5.39 → 0.5.40

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.mts CHANGED
@@ -112,7 +112,7 @@ declare class MessageRepository {
112
112
 
113
113
  type LocalRuntimeOptions = {
114
114
  initialMessages?: readonly CoreMessage[] | undefined;
115
- maxToolRoundtrips?: number;
115
+ maxToolRoundtrips?: number | undefined;
116
116
  };
117
117
 
118
118
  declare class LocalThreadRuntime implements ThreadRuntime {
@@ -219,7 +219,7 @@ declare class EdgeChatAdapter implements ChatModelAdapter {
219
219
  }
220
220
 
221
221
  type EdgeRuntimeOptions = EdgeChatAdapterOptions & LocalRuntimeOptions;
222
- declare const useEdgeRuntime: ({ initialMessages, ...options }: EdgeRuntimeOptions) => LocalRuntime;
222
+ declare const useEdgeRuntime: ({ initialMessages, maxToolRoundtrips, ...options }: EdgeRuntimeOptions) => LocalRuntime;
223
223
 
224
224
  type ThreadMessageLike = {
225
225
  role: "assistant" | "user" | "system";
package/dist/index.d.ts CHANGED
@@ -112,7 +112,7 @@ declare class MessageRepository {
112
112
 
113
113
  type LocalRuntimeOptions = {
114
114
  initialMessages?: readonly CoreMessage[] | undefined;
115
- maxToolRoundtrips?: number;
115
+ maxToolRoundtrips?: number | undefined;
116
116
  };
117
117
 
118
118
  declare class LocalThreadRuntime implements ThreadRuntime {
@@ -219,7 +219,7 @@ declare class EdgeChatAdapter implements ChatModelAdapter {
219
219
  }
220
220
 
221
221
  type EdgeRuntimeOptions = EdgeChatAdapterOptions & LocalRuntimeOptions;
222
- declare const useEdgeRuntime: ({ initialMessages, ...options }: EdgeRuntimeOptions) => LocalRuntime;
222
+ declare const useEdgeRuntime: ({ initialMessages, maxToolRoundtrips, ...options }: EdgeRuntimeOptions) => LocalRuntime;
223
223
 
224
224
  type ThreadMessageLike = {
225
225
  role: "assistant" | "user" | "system";
package/dist/index.js CHANGED
@@ -1056,10 +1056,11 @@ var EdgeChatAdapter = class {
1056
1056
  // src/runtimes/edge/useEdgeRuntime.ts
1057
1057
  var useEdgeRuntime = ({
1058
1058
  initialMessages,
1059
+ maxToolRoundtrips,
1059
1060
  ...options
1060
1061
  }) => {
1061
1062
  const [adapter] = _react.useState.call(void 0, () => new EdgeChatAdapter(options));
1062
- return useLocalRuntime(adapter, { initialMessages });
1063
+ return useLocalRuntime(adapter, { initialMessages, maxToolRoundtrips });
1063
1064
  };
1064
1065
 
1065
1066
  // src/runtimes/local/shouldContinue.tsx