@assistant-ui/react 0.5.71 → 0.5.73

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _chunk5KIEXJRKjs = require('./chunk-5KIEXJRK.js');
12
+ var _chunkKVXP3Q6Kjs = require('./chunk-KVXP3Q6K.js');
13
13
 
14
14
 
15
15
  var _chunkPZ5AY32Cjs = require('./chunk-PZ5AY32C.js');
@@ -3109,7 +3109,7 @@ var DefaultThreadComposerRuntimeCore = (_class9 = class extends BaseComposerRunt
3109
3109
  var ProxyConfigProvider = (_class10 = class {constructor() { _class10.prototype.__init19.call(this); }
3110
3110
  __init19() {this._providers = /* @__PURE__ */ new Set()}
3111
3111
  getModelConfig() {
3112
- return _chunk5KIEXJRKjs.mergeModelConfigs.call(void 0, this._providers);
3112
+ return _chunkKVXP3Q6Kjs.mergeModelConfigs.call(void 0, this._providers);
3113
3113
  }
3114
3114
  registerModelConfigProvider(provider) {
3115
3115
  this._providers.add(provider);
@@ -3687,7 +3687,7 @@ var ThreadRuntimeImpl = (_class12 = class {
3687
3687
  }, _class12);
3688
3688
 
3689
3689
  // src/runtimes/edge/converters/fromLanguageModelMessages.ts
3690
- var fromLanguageModelMessages = (lm, { mergeRoundtrips }) => {
3690
+ var fromLanguageModelMessages = (lm, { mergeSteps }) => {
3691
3691
  const messages2 = [];
3692
3692
  for (const lmMessage of lm) {
3693
3693
  const role = lmMessage.role;
@@ -3750,7 +3750,7 @@ var fromLanguageModelMessages = (lm, { mergeRoundtrips }) => {
3750
3750
  }
3751
3751
  return part;
3752
3752
  });
3753
- if (mergeRoundtrips) {
3753
+ if (mergeSteps) {
3754
3754
  const previousMessage = messages2[messages2.length - 1];
3755
3755
  if (_optionalChain([previousMessage, 'optionalAccess', _181 => _181.role]) === "assistant") {
3756
3756
  previousMessage.content.push(...newContent);
@@ -3841,14 +3841,14 @@ function streamPartDecoderStream() {
3841
3841
  controller.enqueue(decodeStreamPart(chunk));
3842
3842
  }
3843
3843
  });
3844
- return new (0, _chunk5KIEXJRKjs.PipeableTransformStream)((readable) => {
3844
+ return new (0, _chunkKVXP3Q6Kjs.PipeableTransformStream)((readable) => {
3845
3845
  return readable.pipeThrough(new TextDecoderStream()).pipeThrough(chunkByLineStream()).pipeThrough(decodeStream);
3846
3846
  });
3847
3847
  }
3848
3848
 
3849
3849
  // src/runtimes/edge/streams/utils/index.ts
3850
3850
  var streamUtils = {
3851
- streamPartEncoderStream: _chunk5KIEXJRKjs.streamPartEncoderStream,
3851
+ streamPartEncoderStream: _chunkKVXP3Q6Kjs.streamPartEncoderStream,
3852
3852
  streamPartDecoderStream
3853
3853
  };
3854
3854
 
@@ -3861,7 +3861,7 @@ function assistantDecoderStream() {
3861
3861
  let currentToolCall;
3862
3862
  return new TransformStream({
3863
3863
  transform({ type, value }, controller) {
3864
- if (currentToolCall && type !== "2" /* ToolCallArgsTextDelta */ && type !== "E" /* Error */) {
3864
+ if (currentToolCall && type !== "c" /* ToolCallDelta */ && type !== "3" /* Error */) {
3865
3865
  controller.enqueue({
3866
3866
  type: "tool-call",
3867
3867
  toolCallType: "function",
@@ -3879,48 +3879,82 @@ function assistantDecoderStream() {
3879
3879
  });
3880
3880
  break;
3881
3881
  }
3882
- case "1" /* ToolCallBegin */: {
3883
- const { id, name } = value;
3882
+ case "b" /* ToolCallBegin */: {
3883
+ const { toolCallId: id, toolName: name } = value;
3884
3884
  toolCallNames.set(id, name);
3885
3885
  currentToolCall = { id, name, argsText: "" };
3886
3886
  break;
3887
3887
  }
3888
- case "2" /* ToolCallArgsTextDelta */: {
3889
- const delta = value;
3890
- currentToolCall.argsText += delta;
3888
+ case "c" /* ToolCallDelta */: {
3889
+ const { toolCallId, argsTextDelta } = value;
3890
+ if (_optionalChain([currentToolCall, 'optionalAccess', _183 => _183.id]) !== toolCallId) {
3891
+ throw new Error(
3892
+ `Received tool call delta for unknown tool call "${toolCallId}".`
3893
+ );
3894
+ }
3895
+ currentToolCall.argsText += argsTextDelta;
3891
3896
  controller.enqueue({
3892
3897
  type: "tool-call-delta",
3893
3898
  toolCallType: "function",
3894
3899
  toolCallId: currentToolCall.id,
3895
3900
  toolName: currentToolCall.name,
3896
- argsTextDelta: delta
3901
+ argsTextDelta
3897
3902
  });
3898
3903
  break;
3899
3904
  }
3900
- case "3" /* ToolCallResult */: {
3905
+ case "a" /* ToolCallResult */: {
3901
3906
  controller.enqueue({
3902
3907
  type: "tool-result",
3903
3908
  toolCallType: "function",
3904
- toolCallId: value.id,
3905
- toolName: toolCallNames.get(value.id),
3909
+ toolCallId: value.toolCallId,
3910
+ toolName: toolCallNames.get(value.toolCallId),
3906
3911
  result: value.result
3907
3912
  });
3908
3913
  break;
3909
3914
  }
3910
- case "F" /* Finish */: {
3915
+ case "d" /* Finish */: {
3911
3916
  controller.enqueue({
3912
3917
  type: "finish",
3913
3918
  ...value
3914
3919
  });
3915
3920
  break;
3916
3921
  }
3917
- case "E" /* Error */: {
3922
+ case "3" /* Error */: {
3918
3923
  controller.enqueue({
3919
3924
  type: "error",
3920
3925
  error: value
3921
3926
  });
3922
3927
  break;
3923
3928
  }
3929
+ case "9" /* ToolCall */: {
3930
+ const { toolCallId, toolName, args } = value;
3931
+ const argsText = JSON.stringify(args);
3932
+ controller.enqueue({
3933
+ type: "tool-call-delta",
3934
+ toolCallType: "function",
3935
+ toolCallId,
3936
+ toolName,
3937
+ argsTextDelta: argsText
3938
+ });
3939
+ controller.enqueue({
3940
+ type: "tool-call",
3941
+ toolCallType: "function",
3942
+ toolCallId,
3943
+ toolName,
3944
+ args: argsText
3945
+ });
3946
+ break;
3947
+ }
3948
+ case "e" /* StepFinish */: {
3949
+ controller.enqueue({
3950
+ type: "step-finish",
3951
+ ...value
3952
+ });
3953
+ break;
3954
+ }
3955
+ // TODO
3956
+ case "2" /* Data */:
3957
+ break;
3924
3958
  default: {
3925
3959
  const unhandledType = type;
3926
3960
  throw new Error(`Unhandled chunk type: ${unhandledType}`);
@@ -3957,8 +3991,8 @@ var EdgeChatAdapter = class {
3957
3991
  credentials: _nullishCoalesce(this.options.credentials, () => ( "same-origin")),
3958
3992
  body: JSON.stringify({
3959
3993
  system: config.system,
3960
- messages: _chunk5KIEXJRKjs.toCoreMessages.call(void 0, messages2),
3961
- tools: config.tools ? _chunk5KIEXJRKjs.toLanguageModelTools.call(void 0, config.tools) : [],
3994
+ messages: _chunkKVXP3Q6Kjs.toCoreMessages.call(void 0, messages2),
3995
+ tools: config.tools ? _chunkKVXP3Q6Kjs.toLanguageModelTools.call(void 0, config.tools) : [],
3962
3996
  ...config.callSettings,
3963
3997
  ...config.config,
3964
3998
  ...this.options.body
@@ -3968,7 +4002,7 @@ var EdgeChatAdapter = class {
3968
4002
  if (!result.ok) {
3969
4003
  throw new Error(`Status ${result.status}: ${await result.text()}`);
3970
4004
  }
3971
- const stream = result.body.pipeThrough(streamPartDecoderStream()).pipeThrough(assistantDecoderStream()).pipeThrough(_chunk5KIEXJRKjs.toolResultStream.call(void 0, config.tools, abortSignal)).pipeThrough(_chunk5KIEXJRKjs.runResultStream.call(void 0, ));
4005
+ const stream = result.body.pipeThrough(streamPartDecoderStream()).pipeThrough(assistantDecoderStream()).pipeThrough(_chunkKVXP3Q6Kjs.toolResultStream.call(void 0, config.tools, abortSignal)).pipeThrough(_chunkKVXP3Q6Kjs.runResultStream.call(void 0, ));
3972
4006
  let update;
3973
4007
  for await (update of asAsyncIterable(stream)) {
3974
4008
  yield update;
@@ -3978,23 +4012,29 @@ var EdgeChatAdapter = class {
3978
4012
  }
3979
4013
  };
3980
4014
 
4015
+ // src/runtimes/local/LocalRuntimeOptions.tsx
4016
+ var splitLocalRuntimeOptions = (options) => {
4017
+ const { initialMessages, maxToolRoundtrips, maxSteps, adapters, ...rest } = options;
4018
+ return {
4019
+ localRuntimeOptions: {
4020
+ initialMessages,
4021
+ maxToolRoundtrips,
4022
+ maxSteps,
4023
+ adapters
4024
+ },
4025
+ otherOptions: rest
4026
+ };
4027
+ };
4028
+
3981
4029
  // src/runtimes/edge/useEdgeRuntime.ts
3982
- var useEdgeRuntime = ({
3983
- initialMessages,
3984
- maxToolRoundtrips,
3985
- adapters,
3986
- ...options
3987
- }) => {
3988
- const [adapter] = _react.useState.call(void 0, () => new EdgeChatAdapter(options));
3989
- return useLocalRuntime(adapter, {
3990
- initialMessages,
3991
- maxToolRoundtrips,
3992
- adapters
3993
- });
4030
+ var useEdgeRuntime = (options) => {
4031
+ const { localRuntimeOptions, otherOptions } = splitLocalRuntimeOptions(options);
4032
+ const [adapter] = _react.useState.call(void 0, () => new EdgeChatAdapter(otherOptions));
4033
+ return useLocalRuntime(adapter, localRuntimeOptions);
3994
4034
  };
3995
4035
 
3996
4036
  // src/runtimes/local/shouldContinue.tsx
3997
- var shouldContinue = (result) => _optionalChain([result, 'access', _183 => _183.status, 'optionalAccess', _184 => _184.type]) === "requires-action" && result.status.reason === "tool-calls" && result.content.every((c) => c.type !== "tool-call" || !!c.result);
4037
+ var shouldContinue = (result) => _optionalChain([result, 'access', _184 => _184.status, 'optionalAccess', _185 => _185.type]) === "requires-action" && result.status.reason === "tool-calls" && result.content.every((c) => c.type !== "tool-call" || !!c.result);
3998
4038
 
3999
4039
  // src/runtimes/composer/DefaultEditComposerRuntimeCore.tsx
4000
4040
  var DefaultEditComposerRuntimeCore = class extends BaseComposerRuntimeCore {
@@ -4082,18 +4122,18 @@ var LocalThreadRuntimeCore = (_class13 = class {
4082
4122
  set options({ initialMessages, ...options }) {
4083
4123
  this._options = options;
4084
4124
  let hasUpdates = false;
4085
- const canSpeak = _optionalChain([options, 'access', _185 => _185.adapters, 'optionalAccess', _186 => _186.speech]) !== void 0;
4125
+ const canSpeak = _optionalChain([options, 'access', _186 => _186.adapters, 'optionalAccess', _187 => _187.speech]) !== void 0;
4086
4126
  if (this.capabilities.speak !== canSpeak) {
4087
4127
  this.capabilities.speak = canSpeak;
4088
4128
  hasUpdates = true;
4089
4129
  }
4090
- this.composer.setAttachmentAdapter(_optionalChain([options, 'access', _187 => _187.adapters, 'optionalAccess', _188 => _188.attachments]));
4091
- const canAttach = _optionalChain([options, 'access', _189 => _189.adapters, 'optionalAccess', _190 => _190.attachments]) !== void 0;
4130
+ this.composer.setAttachmentAdapter(_optionalChain([options, 'access', _188 => _188.adapters, 'optionalAccess', _189 => _189.attachments]));
4131
+ const canAttach = _optionalChain([options, 'access', _190 => _190.adapters, 'optionalAccess', _191 => _191.attachments]) !== void 0;
4092
4132
  if (this.capabilities.attachments !== canAttach) {
4093
4133
  this.capabilities.attachments = canAttach;
4094
4134
  hasUpdates = true;
4095
4135
  }
4096
- const canFeedback = _optionalChain([options, 'access', _191 => _191.adapters, 'optionalAccess', _192 => _192.feedback]) !== void 0;
4136
+ const canFeedback = _optionalChain([options, 'access', _192 => _192.adapters, 'optionalAccess', _193 => _193.feedback]) !== void 0;
4097
4137
  if (this.capabilities.feedback !== canFeedback) {
4098
4138
  this.capabilities.feedback = canFeedback;
4099
4139
  hasUpdates = true;
@@ -4152,33 +4192,25 @@ var LocalThreadRuntimeCore = (_class13 = class {
4152
4192
  }
4153
4193
  async performRoundtrip(parentId, message) {
4154
4194
  const messages2 = this.repository.getMessages();
4155
- _optionalChain([this, 'access', _193 => _193.abortController, 'optionalAccess', _194 => _194.abort, 'call', _195 => _195()]);
4195
+ _optionalChain([this, 'access', _194 => _194.abortController, 'optionalAccess', _195 => _195.abort, 'call', _196 => _196()]);
4156
4196
  this.abortController = new AbortController();
4157
4197
  const initialContent = message.content;
4158
- const initialRoundtrips = _optionalChain([message, 'access', _196 => _196.metadata, 'optionalAccess', _197 => _197.roundtrips]);
4159
- const initalCustom = _optionalChain([message, 'access', _198 => _198.metadata, 'optionalAccess', _199 => _199.custom]);
4198
+ const initialSteps = _optionalChain([message, 'access', _197 => _197.metadata, 'optionalAccess', _198 => _198.steps]);
4199
+ const initalCustom = _optionalChain([message, 'access', _199 => _199.metadata, 'optionalAccess', _200 => _200.custom]);
4160
4200
  const updateMessage = (m) => {
4201
+ const newSteps = _optionalChain([m, 'access', _201 => _201.metadata, 'optionalAccess', _202 => _202.steps]) || _optionalChain([m, 'access', _203 => _203.metadata, 'optionalAccess', _204 => _204.roundtrips]);
4202
+ const steps2 = newSteps ? [..._nullishCoalesce(initialSteps, () => ( [])), ...newSteps] : void 0;
4161
4203
  message = {
4162
4204
  ...message,
4163
4205
  ...m.content ? { content: [...initialContent, ..._nullishCoalesce(m.content, () => ( []))] } : void 0,
4164
4206
  status: _nullishCoalesce(m.status, () => ( message.status)),
4165
4207
  // TODO deprecated, remove in v0.6
4166
- ..._optionalChain([m, 'access', _200 => _200.metadata, 'optionalAccess', _201 => _201.roundtrips]) ? {
4167
- roundtrips: [
4168
- ..._nullishCoalesce(initialRoundtrips, () => ( [])),
4169
- ...m.metadata.roundtrips
4170
- ]
4171
- } : void 0,
4208
+ ...steps2 ? { roundtrips: steps2 } : void 0,
4172
4209
  ...m.metadata ? {
4173
4210
  metadata: {
4174
4211
  ...message.metadata,
4175
- ...m.metadata.roundtrips ? {
4176
- roundtrips: [
4177
- ..._nullishCoalesce(initialRoundtrips, () => ( [])),
4178
- ...m.metadata.roundtrips
4179
- ]
4180
- } : void 0,
4181
- ..._optionalChain([m, 'access', _202 => _202.metadata, 'optionalAccess', _203 => _203.custom]) ? {
4212
+ ...steps2 ? { roundtrips: steps2, steps: steps2 } : void 0,
4213
+ ..._optionalChain([m, 'access', _205 => _205.metadata, 'optionalAccess', _206 => _206.custom]) ? {
4182
4214
  custom: { ..._nullishCoalesce(initalCustom, () => ( {})), ...m.metadata.custom }
4183
4215
  } : void 0
4184
4216
  }
@@ -4187,9 +4219,9 @@ var LocalThreadRuntimeCore = (_class13 = class {
4187
4219
  this.repository.addOrUpdateMessage(parentId, message);
4188
4220
  this.notifySubscribers();
4189
4221
  };
4190
- const maxToolRoundtrips = _nullishCoalesce(this.options.maxToolRoundtrips, () => ( 1));
4191
- const toolRoundtrips = _nullishCoalesce(_optionalChain([message, 'access', _204 => _204.metadata, 'optionalAccess', _205 => _205.roundtrips, 'optionalAccess', _206 => _206.length]), () => ( 0));
4192
- if (toolRoundtrips > maxToolRoundtrips) {
4222
+ const maxSteps = this.options.maxSteps ? this.options.maxSteps : (_nullishCoalesce(this.options.maxToolRoundtrips, () => ( 1))) + 1;
4223
+ const steps = _nullishCoalesce(_optionalChain([message, 'access', _207 => _207.metadata, 'optionalAccess', _208 => _208.steps, 'optionalAccess', _209 => _209.length]), () => ( 0));
4224
+ if (steps >= maxSteps) {
4193
4225
  updateMessage({
4194
4226
  status: {
4195
4227
  type: "incomplete",
@@ -4287,7 +4319,7 @@ var LocalThreadRuntimeCore = (_class13 = class {
4287
4319
  // TODO lift utterance state to thread runtime
4288
4320
 
4289
4321
  speak(messageId) {
4290
- const adapter = _optionalChain([this, 'access', _207 => _207.options, 'access', _208 => _208.adapters, 'optionalAccess', _209 => _209.speech]);
4322
+ const adapter = _optionalChain([this, 'access', _210 => _210.options, 'access', _211 => _211.adapters, 'optionalAccess', _212 => _212.speech]);
4291
4323
  if (!adapter) throw new Error("Speech adapter not configured");
4292
4324
  const { message } = this.repository.getMessage(messageId);
4293
4325
  if (this._utterance) {
@@ -4304,7 +4336,7 @@ var LocalThreadRuntimeCore = (_class13 = class {
4304
4336
  return this._utterance;
4305
4337
  }
4306
4338
  submitFeedback({ messageId, type }) {
4307
- const adapter = _optionalChain([this, 'access', _210 => _210.options, 'access', _211 => _211.adapters, 'optionalAccess', _212 => _212.feedback]);
4339
+ const adapter = _optionalChain([this, 'access', _213 => _213.options, 'access', _214 => _214.adapters, 'optionalAccess', _215 => _215.feedback]);
4308
4340
  if (!adapter) throw new Error("Feedback adapter not configured");
4309
4341
  const { message } = this.repository.getMessage(messageId);
4310
4342
  adapter.submit({ message, type });
@@ -4351,7 +4383,7 @@ var LocalRuntimeCore = class extends BaseAssistantRuntimeCore {
4351
4383
  const messages2 = fromCoreMessages(initialMessages);
4352
4384
  this.thread.import({
4353
4385
  messages: messages2.map((m, idx) => ({
4354
- parentId: _nullishCoalesce(_optionalChain([messages2, 'access', _213 => _213[idx - 1], 'optionalAccess', _214 => _214.id]), () => ( null)),
4386
+ parentId: _nullishCoalesce(_optionalChain([messages2, 'access', _216 => _216[idx - 1], 'optionalAccess', _217 => _217.id]), () => ( null)),
4355
4387
  message: m
4356
4388
  }))
4357
4389
  });
@@ -4485,7 +4517,7 @@ var fromThreadMessageLike = (like, fallbackId, fallbackStatus) => {
4485
4517
  // src/runtimes/external-store/ExternalStoreThreadRuntimeCore.tsx
4486
4518
  var EMPTY_ARRAY2 = Object.freeze([]);
4487
4519
  var hasUpcomingMessage = (isRunning, messages2) => {
4488
- return isRunning && _optionalChain([messages2, 'access', _215 => _215[messages2.length - 1], 'optionalAccess', _216 => _216.role]) !== "assistant";
4520
+ return isRunning && _optionalChain([messages2, 'access', _218 => _218[messages2.length - 1], 'optionalAccess', _219 => _219.role]) !== "assistant";
4489
4521
  };
4490
4522
  var ExternalStoreThreadRuntimeCore = (_class15 = class {
4491
4523
  constructor(configProvider, store) {;_class15.prototype.__init33.call(this);_class15.prototype.__init34.call(this);_class15.prototype.__init35.call(this);_class15.prototype.__init36.call(this);_class15.prototype.__init37.call(this);_class15.prototype.__init38.call(this);_class15.prototype.__init39.call(this);_class15.prototype.__init40.call(this);_class15.prototype.__init41.call(this);_class15.prototype.__init42.call(this);
@@ -4551,12 +4583,12 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
4551
4583
  reload: this._store.onReload !== void 0,
4552
4584
  cancel: this._store.onCancel !== void 0,
4553
4585
  speak: this._store.onSpeak !== void 0,
4554
- unstable_copy: _optionalChain([this, 'access', _220 => _220._store, 'access', _221 => _221.unstable_capabilities, 'optionalAccess', _222 => _222.copy]) !== false,
4586
+ unstable_copy: _optionalChain([this, 'access', _223 => _223._store, 'access', _224 => _224.unstable_capabilities, 'optionalAccess', _225 => _225.copy]) !== false,
4555
4587
  // default true
4556
- attachments: !!_optionalChain([this, 'access', _223 => _223.store, 'access', _224 => _224.adapters, 'optionalAccess', _225 => _225.attachments]),
4557
- feedback: !!_optionalChain([this, 'access', _226 => _226.store, 'access', _227 => _227.adapters, 'optionalAccess', _228 => _228.feedback])
4588
+ attachments: !!_optionalChain([this, 'access', _226 => _226.store, 'access', _227 => _227.adapters, 'optionalAccess', _228 => _228.attachments]),
4589
+ feedback: !!_optionalChain([this, 'access', _229 => _229.store, 'access', _230 => _230.adapters, 'optionalAccess', _231 => _231.feedback])
4558
4590
  };
4559
- this.composer.setAttachmentAdapter(_optionalChain([this, 'access', _229 => _229._store, 'access', _230 => _230.adapters, 'optionalAccess', _231 => _231.attachments]));
4591
+ this.composer.setAttachmentAdapter(_optionalChain([this, 'access', _232 => _232._store, 'access', _233 => _233.adapters, 'optionalAccess', _234 => _234.attachments]));
4560
4592
  if (oldStore) {
4561
4593
  if (oldStore.convertMessage !== store.convertMessage) {
4562
4594
  this._converter = new ThreadMessageConverter();
@@ -4582,7 +4614,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
4582
4614
  for (let i = 0; i < messages2.length; i++) {
4583
4615
  const message = messages2[i];
4584
4616
  const parent = messages2[i - 1];
4585
- this.repository.addOrUpdateMessage(_nullishCoalesce(_optionalChain([parent, 'optionalAccess', _232 => _232.id]), () => ( null)), message);
4617
+ this.repository.addOrUpdateMessage(_nullishCoalesce(_optionalChain([parent, 'optionalAccess', _235 => _235.id]), () => ( null)), message);
4586
4618
  }
4587
4619
  if (this.assistantOptimisticId) {
4588
4620
  this.repository.deleteMessage(this.assistantOptimisticId);
@@ -4590,7 +4622,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
4590
4622
  }
4591
4623
  if (hasUpcomingMessage(isRunning, messages2)) {
4592
4624
  this.assistantOptimisticId = this.repository.appendOptimisticMessage(
4593
- _nullishCoalesce(_optionalChain([messages2, 'access', _233 => _233.at, 'call', _234 => _234(-1), 'optionalAccess', _235 => _235.id]), () => ( null)),
4625
+ _nullishCoalesce(_optionalChain([messages2, 'access', _236 => _236.at, 'call', _237 => _237(-1), 'optionalAccess', _238 => _238.id]), () => ( null)),
4594
4626
  {
4595
4627
  role: "assistant",
4596
4628
  content: []
@@ -4598,7 +4630,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
4598
4630
  );
4599
4631
  }
4600
4632
  this.repository.resetHead(
4601
- _nullishCoalesce(_nullishCoalesce(this.assistantOptimisticId, () => ( _optionalChain([messages2, 'access', _236 => _236.at, 'call', _237 => _237(-1), 'optionalAccess', _238 => _238.id]))), () => ( null))
4633
+ _nullishCoalesce(_nullishCoalesce(this.assistantOptimisticId, () => ( _optionalChain([messages2, 'access', _239 => _239.at, 'call', _240 => _240(-1), 'optionalAccess', _241 => _241.id]))), () => ( null))
4602
4634
  );
4603
4635
  this.messages = this.repository.getMessages();
4604
4636
  this.notifySubscribers();
@@ -4619,7 +4651,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
4619
4651
  this.updateMessages(this.repository.getMessages());
4620
4652
  }
4621
4653
  async append(message) {
4622
- if (message.parentId !== (_nullishCoalesce(_optionalChain([this, 'access', _239 => _239.messages, 'access', _240 => _240.at, 'call', _241 => _241(-1), 'optionalAccess', _242 => _242.id]), () => ( null)))) {
4654
+ if (message.parentId !== (_nullishCoalesce(_optionalChain([this, 'access', _242 => _242.messages, 'access', _243 => _243.at, 'call', _244 => _244(-1), 'optionalAccess', _245 => _245.id]), () => ( null)))) {
4623
4655
  if (!this._store.onEdit)
4624
4656
  throw new Error("Runtime does not support editing messages.");
4625
4657
  await this._store.onEdit(message);
@@ -4642,7 +4674,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
4642
4674
  }
4643
4675
  let messages2 = this.repository.getMessages();
4644
4676
  const previousMessage = messages2[messages2.length - 1];
4645
- if (_optionalChain([previousMessage, 'optionalAccess', _243 => _243.role]) === "user" && previousMessage.id === _optionalChain([messages2, 'access', _244 => _244.at, 'call', _245 => _245(-1), 'optionalAccess', _246 => _246.id])) {
4677
+ if (_optionalChain([previousMessage, 'optionalAccess', _246 => _246.role]) === "user" && previousMessage.id === _optionalChain([messages2, 'access', _247 => _247.at, 'call', _248 => _248(-1), 'optionalAccess', _249 => _249.id])) {
4646
4678
  this.repository.deleteMessage(previousMessage.id);
4647
4679
  if (!this.composer.text.trim()) {
4648
4680
  this.composer.setText(getThreadMessageText(previousMessage));
@@ -4667,7 +4699,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
4667
4699
  return this._store.onSpeak(message);
4668
4700
  }
4669
4701
  submitFeedback({ messageId, type }) {
4670
- const adapter = _optionalChain([this, 'access', _247 => _247._store, 'access', _248 => _248.adapters, 'optionalAccess', _249 => _249.feedback]);
4702
+ const adapter = _optionalChain([this, 'access', _250 => _250._store, 'access', _251 => _251.adapters, 'optionalAccess', _252 => _252.feedback]);
4671
4703
  if (!adapter) throw new Error("Feedback adapter not configured");
4672
4704
  const { message } = this.repository.getMessage(messageId);
4673
4705
  adapter.submit({ message, type });
@@ -4677,7 +4709,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class {
4677
4709
  return () => this._subscriptions.delete(callback);
4678
4710
  }
4679
4711
  __init42() {this.updateMessages = (messages2) => {
4680
- _optionalChain([this, 'access', _250 => _250._store, 'access', _251 => _251.setMessages, 'optionalCall', _252 => _252(
4712
+ _optionalChain([this, 'access', _253 => _253._store, 'access', _254 => _254.setMessages, 'optionalCall', _255 => _255(
4681
4713
  messages2.flatMap(getExternalStoreMessage).filter((m) => m != null)
4682
4714
  )]);
4683
4715
  }}
@@ -4901,18 +4933,18 @@ var DangerousInBrowserAdapter = class {
4901
4933
  this.options = options;
4902
4934
  }
4903
4935
  async *run({ messages: messages2, abortSignal, config }) {
4904
- const res = await _chunk5KIEXJRKjs.getEdgeRuntimeStream.call(void 0, {
4936
+ const res = await _chunkKVXP3Q6Kjs.getEdgeRuntimeStream.call(void 0, {
4905
4937
  options: this.options,
4906
4938
  abortSignal,
4907
4939
  requestData: {
4908
4940
  system: config.system,
4909
- messages: _chunk5KIEXJRKjs.toCoreMessages.call(void 0, messages2),
4910
- tools: config.tools ? _chunk5KIEXJRKjs.toLanguageModelTools.call(void 0, config.tools) : [],
4941
+ messages: _chunkKVXP3Q6Kjs.toCoreMessages.call(void 0, messages2),
4942
+ tools: config.tools ? _chunkKVXP3Q6Kjs.toLanguageModelTools.call(void 0, config.tools) : [],
4911
4943
  ...config.callSettings,
4912
4944
  ...config.config
4913
4945
  }
4914
4946
  });
4915
- const stream = res.pipeThrough(_chunk5KIEXJRKjs.toolResultStream.call(void 0, config.tools, abortSignal)).pipeThrough(_chunk5KIEXJRKjs.runResultStream.call(void 0, ));
4947
+ const stream = res.pipeThrough(_chunkKVXP3Q6Kjs.toolResultStream.call(void 0, config.tools, abortSignal)).pipeThrough(_chunkKVXP3Q6Kjs.runResultStream.call(void 0, ));
4916
4948
  for await (const update of asAsyncIterable(stream)) {
4917
4949
  yield update;
4918
4950
  }
@@ -4920,12 +4952,10 @@ var DangerousInBrowserAdapter = class {
4920
4952
  };
4921
4953
 
4922
4954
  // src/runtimes/dangerous-in-browser/useDangerousInBrowserRuntime.ts
4923
- var useDangerousInBrowserRuntime = ({
4924
- initialMessages,
4925
- ...options
4926
- }) => {
4927
- const [adapter] = _react.useState.call(void 0, () => new DangerousInBrowserAdapter(options));
4928
- return useLocalRuntime(adapter, { initialMessages });
4955
+ var useDangerousInBrowserRuntime = (options) => {
4956
+ const { localRuntimeOptions, otherOptions } = splitLocalRuntimeOptions(options);
4957
+ const [adapter] = _react.useState.call(void 0, () => new DangerousInBrowserAdapter(otherOptions));
4958
+ return useLocalRuntime(adapter, localRuntimeOptions);
4929
4959
  };
4930
4960
 
4931
4961
  // src/runtimes/speech/WebSpeechSynthesisAdapter.ts
@@ -5134,7 +5164,7 @@ var ThreadConfigProvider = ({
5134
5164
  }) => {
5135
5165
  const hasAssistant = !!useAssistantRuntime({ optional: true });
5136
5166
  const configProvider = config && Object.keys(_nullishCoalesce(config, () => ( {}))).length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadConfigContext.Provider, { value: config, children }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children });
5137
- if (!_optionalChain([config, 'optionalAccess', _253 => _253.runtime])) return configProvider;
5167
+ if (!_optionalChain([config, 'optionalAccess', _256 => _256.runtime])) return configProvider;
5138
5168
  if (hasAssistant) {
5139
5169
  throw new Error(
5140
5170
  "You provided a runtime to <Thread> while simulataneously using <AssistantRuntimeProvider>. This is not allowed."
@@ -5462,7 +5492,7 @@ var AssistantMessageContent = _react.forwardRef.call(void 0, ({ components: comp
5462
5492
  {
5463
5493
  components: {
5464
5494
  ...componentsProp,
5465
- Text: _nullishCoalesce(_nullishCoalesce(_optionalChain([componentsProp, 'optionalAccess', _254 => _254.Text]), () => ( components.Text)), () => ( content_part_default.Text)),
5495
+ Text: _nullishCoalesce(_nullishCoalesce(_optionalChain([componentsProp, 'optionalAccess', _257 => _257.Text]), () => ( components.Text)), () => ( content_part_default.Text)),
5466
5496
  tools: toolsComponents
5467
5497
  }
5468
5498
  }
@@ -5604,7 +5634,7 @@ var ComposerAttachments = ({ components }) => {
5604
5634
  {
5605
5635
  components: {
5606
5636
  ...components,
5607
- Attachment: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _255 => _255.Attachment]), () => ( composer_attachment_default))
5637
+ Attachment: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _258 => _258.Attachment]), () => ( composer_attachment_default))
5608
5638
  }
5609
5639
  }
5610
5640
  ) });
@@ -5730,7 +5760,7 @@ var ThreadWelcomeSuggestions = () => {
5730
5760
  const suggestions2 = useThread((t) => t.suggestions);
5731
5761
  const { welcome: { suggestions } = {} } = useThreadConfig();
5732
5762
  const finalSuggestions = suggestions2.length ? suggestions2 : suggestions;
5733
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadWelcomeSuggestionContainer, { children: _optionalChain([finalSuggestions, 'optionalAccess', _256 => _256.map, 'call', _257 => _257((suggestion, idx) => {
5763
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadWelcomeSuggestionContainer, { children: _optionalChain([finalSuggestions, 'optionalAccess', _259 => _259.map, 'call', _260 => _260((suggestion, idx) => {
5734
5764
  const key = `${suggestion.prompt}-${idx}`;
5735
5765
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadWelcomeSuggestion, { suggestion }, key);
5736
5766
  })]) });
@@ -5829,7 +5859,7 @@ var UserMessageContent = _react.forwardRef.call(void 0,
5829
5859
  {
5830
5860
  components: {
5831
5861
  ...components,
5832
- Text: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _258 => _258.Text]), () => ( content_part_default.Text))
5862
+ Text: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _261 => _261.Text]), () => ( content_part_default.Text))
5833
5863
  }
5834
5864
  }
5835
5865
  ) });
@@ -5847,7 +5877,7 @@ var UserMessageAttachments = ({
5847
5877
  {
5848
5878
  components: {
5849
5879
  ...components,
5850
- Attachment: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _259 => _259.Attachment]), () => ( user_message_attachment_default))
5880
+ Attachment: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _262 => _262.Attachment]), () => ( user_message_attachment_default))
5851
5881
  }
5852
5882
  }
5853
5883
  ) }) });
@@ -5916,9 +5946,14 @@ var edit_composer_default = Object.assign(EditComposer, exports11);
5916
5946
  // src/ui/thread.tsx
5917
5947
 
5918
5948
  var Thread = (config) => {
5919
- const { components: { Composer: ComposerComponent = composer_default } = {} } = config;
5949
+ const {
5950
+ components: {
5951
+ Composer: ComposerComponent = composer_default,
5952
+ ThreadWelcome: ThreadWelcomeComponent = thread_welcome_default
5953
+ } = {}
5954
+ } = config;
5920
5955
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadRoot, { config, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ThreadViewport, { children: [
5921
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, thread_welcome_default, {}),
5956
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadWelcomeComponent, {}),
5922
5957
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadMessages, {}),
5923
5958
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadFollowupSuggestions, {}),
5924
5959
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ThreadViewportFooter, { children: [
@@ -5951,10 +5986,10 @@ var ThreadMessages = ({ components, unstable_flexGrowDiv: flexGrowDiv = true, ..
5951
5986
  thread_exports.Messages,
5952
5987
  {
5953
5988
  components: {
5954
- UserMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _260 => _260.UserMessage]), () => ( user_message_default)),
5955
- EditComposer: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _261 => _261.EditComposer]), () => ( edit_composer_default)),
5956
- AssistantMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _262 => _262.AssistantMessage]), () => ( assistant_message_default)),
5957
- SystemMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _263 => _263.SystemMessage]), () => ( SystemMessage))
5989
+ UserMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _263 => _263.UserMessage]), () => ( user_message_default)),
5990
+ EditComposer: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _264 => _264.EditComposer]), () => ( edit_composer_default)),
5991
+ AssistantMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _265 => _265.AssistantMessage]), () => ( assistant_message_default)),
5992
+ SystemMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _266 => _266.SystemMessage]), () => ( SystemMessage))
5958
5993
  },
5959
5994
  ...rest
5960
5995
  }
@@ -5965,7 +6000,7 @@ var ThreadMessages = ({ components, unstable_flexGrowDiv: flexGrowDiv = true, ..
5965
6000
  ThreadMessages.displayName = "ThreadMessages";
5966
6001
  var ThreadFollowupSuggestions = () => {
5967
6002
  const suggestions = useThread((t) => t.suggestions);
5968
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, thread_exports.If, { empty: false, running: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "aui-thread-followup-suggestions", children: _optionalChain([suggestions, 'optionalAccess', _264 => _264.map, 'call', _265 => _265((suggestion, idx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6003
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, thread_exports.If, { empty: false, running: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "aui-thread-followup-suggestions", children: _optionalChain([suggestions, 'optionalAccess', _267 => _267.map, 'call', _268 => _268((suggestion, idx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5969
6004
  thread_exports.Suggestion,
5970
6005
  {
5971
6006
  className: "aui-thread-followup-suggestion",
@@ -6193,5 +6228,5 @@ var assistant_modal_default = Object.assign(AssistantModal, exports13);
6193
6228
 
6194
6229
 
6195
6230
 
6196
- exports.ActionBarPrimitive = actionBar_exports; exports.AssistantActionBar = assistant_action_bar_default; exports.AssistantMessage = assistant_message_default; exports.AssistantModal = assistant_modal_default; exports.AssistantModalPrimitive = assistantModal_exports; exports.AssistantRuntimeProvider = AssistantRuntimeProvider; exports.BranchPicker = branch_picker_default; exports.BranchPickerPrimitive = branchPicker_exports; exports.Composer = composer_default; exports.ComposerAttachment = composer_attachment_default; exports.ComposerPrimitive = composer_exports; exports.CompositeAttachmentAdapter = CompositeAttachmentAdapter; exports.ContentPart = content_part_default; exports.ContentPartPrimitive = contentPart_exports; exports.EdgeChatAdapter = EdgeChatAdapter; exports.EditComposer = edit_composer_default; exports.INTERNAL = internal_exports; exports.MessagePrimitive = message_exports; exports.SimpleImageAttachmentAdapter = SimpleImageAttachmentAdapter; exports.SimpleTextAttachmentAdapter = SimpleTextAttachmentAdapter; exports.TextContentPartProvider = TextContentPartProvider; exports.Thread = thread_default; exports.ThreadConfigProvider = ThreadConfigProvider; exports.ThreadPrimitive = thread_exports; exports.ThreadWelcome = thread_welcome_default; exports.UserActionBar = user_action_bar_default; exports.UserMessage = user_message_default; exports.UserMessageAttachment = user_message_attachment_default; exports.WebSpeechSynthesisAdapter = WebSpeechSynthesisAdapter; exports.fromCoreMessage = fromCoreMessage; exports.fromCoreMessages = fromCoreMessages; exports.fromLanguageModelMessages = fromLanguageModelMessages; exports.fromLanguageModelTools = fromLanguageModelTools; exports.getExternalStoreMessage = getExternalStoreMessage; exports.makeAssistantTool = makeAssistantTool; exports.makeAssistantToolUI = makeAssistantToolUI; exports.streamUtils = streamUtils; exports.subscribeToMainThread = subscribeToMainThread; exports.toCoreMessage = _chunk5KIEXJRKjs.toCoreMessage; exports.toCoreMessages = _chunk5KIEXJRKjs.toCoreMessages; exports.toLanguageModelMessages = _chunk5KIEXJRKjs.toLanguageModelMessages; exports.toLanguageModelTools = _chunk5KIEXJRKjs.toLanguageModelTools; exports.useActionBarCopy = useActionBarCopy; exports.useActionBarEdit = useActionBarEdit; exports.useActionBarFeedbackNegative = useActionBarFeedbackNegative; exports.useActionBarFeedbackPositive = useActionBarFeedbackPositive; exports.useActionBarReload = useActionBarReload; exports.useActionBarSpeak = useActionBarSpeak; exports.useActionBarStopSpeaking = useActionBarStopSpeaking; exports.useAppendMessage = useAppendMessage; exports.useAssistantActions = useAssistantActions; exports.useAssistantActionsStore = useAssistantActionsStore; exports.useAssistantContext = useAssistantContext; exports.useAssistantInstructions = useAssistantInstructions; exports.useAssistantRuntime = useAssistantRuntime; exports.useAssistantRuntimeStore = useAssistantRuntimeStore; exports.useAssistantTool = useAssistantTool; exports.useAssistantToolUI = useAssistantToolUI; exports.useBranchPickerCount = useBranchPickerCount; exports.useBranchPickerNext = useBranchPickerNext; exports.useBranchPickerNumber = useBranchPickerNumber; exports.useBranchPickerPrevious = useBranchPickerPrevious; exports.useComposer = useComposer; exports.useComposerAddAttachment = useComposerAddAttachment; exports.useComposerCancel = useComposerCancel; exports.useComposerContext = useComposerContext; exports.useComposerIf = useComposerIf; exports.useComposerRuntime = useComposerRuntime; exports.useComposerSend = useComposerSend; exports.useComposerStore = useComposerStore; exports.useContentPart = useContentPart; exports.useContentPartContext = useContentPartContext; exports.useContentPartDisplay = useContentPartDisplay; exports.useContentPartImage = useContentPartImage; exports.useContentPartRuntime = useContentPartRuntime; exports.useContentPartStore = useContentPartStore; exports.useContentPartText = useContentPartText; exports.useDangerousInBrowserRuntime = useDangerousInBrowserRuntime; exports.useEdgeRuntime = useEdgeRuntime; exports.useEditComposer = useEditComposer; exports.useEditComposerStore = useEditComposerStore; exports.useExternalMessageConverter = useExternalMessageConverter; exports.useExternalStoreRuntime = useExternalStoreRuntime; exports.useLocalRuntime = useLocalRuntime; exports.useMessage = useMessage; exports.useMessageContext = useMessageContext; exports.useMessageIf = useMessageIf; exports.useMessageRuntime = useMessageRuntime; exports.useMessageStore = useMessageStore; exports.useMessageUtils = useMessageUtils; exports.useMessageUtilsStore = useMessageUtilsStore; exports.useSwitchToNewThread = useSwitchToNewThread; exports.useThread = useThread; exports.useThreadActions = useThreadActions; exports.useThreadActionsStore = useThreadActionsStore; exports.useThreadComposer = useThreadComposer; exports.useThreadComposerStore = useThreadComposerStore; exports.useThreadConfig = useThreadConfig; exports.useThreadContext = useThreadContext; exports.useThreadEmpty = useThreadEmpty; exports.useThreadIf = useThreadIf; exports.useThreadMessages = useThreadMessages; exports.useThreadMessagesStore = useThreadMessagesStore; exports.useThreadRuntime = useThreadRuntime; exports.useThreadRuntimeStore = useThreadRuntimeStore; exports.useThreadScrollToBottom = useThreadScrollToBottom; exports.useThreadStore = useThreadStore; exports.useThreadSuggestion = useThreadSuggestion; exports.useThreadViewport = useThreadViewport; exports.useThreadViewportStore = useThreadViewportStore; exports.useToolUIs = useToolUIs; exports.useToolUIsStore = useToolUIsStore;
6231
+ exports.ActionBarPrimitive = actionBar_exports; exports.AssistantActionBar = assistant_action_bar_default; exports.AssistantMessage = assistant_message_default; exports.AssistantModal = assistant_modal_default; exports.AssistantModalPrimitive = assistantModal_exports; exports.AssistantRuntimeProvider = AssistantRuntimeProvider; exports.BranchPicker = branch_picker_default; exports.BranchPickerPrimitive = branchPicker_exports; exports.Composer = composer_default; exports.ComposerAttachment = composer_attachment_default; exports.ComposerPrimitive = composer_exports; exports.CompositeAttachmentAdapter = CompositeAttachmentAdapter; exports.ContentPart = content_part_default; exports.ContentPartPrimitive = contentPart_exports; exports.EdgeChatAdapter = EdgeChatAdapter; exports.EditComposer = edit_composer_default; exports.INTERNAL = internal_exports; exports.MessagePrimitive = message_exports; exports.SimpleImageAttachmentAdapter = SimpleImageAttachmentAdapter; exports.SimpleTextAttachmentAdapter = SimpleTextAttachmentAdapter; exports.TextContentPartProvider = TextContentPartProvider; exports.Thread = thread_default; exports.ThreadConfigProvider = ThreadConfigProvider; exports.ThreadPrimitive = thread_exports; exports.ThreadWelcome = thread_welcome_default; exports.UserActionBar = user_action_bar_default; exports.UserMessage = user_message_default; exports.UserMessageAttachment = user_message_attachment_default; exports.WebSpeechSynthesisAdapter = WebSpeechSynthesisAdapter; exports.fromCoreMessage = fromCoreMessage; exports.fromCoreMessages = fromCoreMessages; exports.fromLanguageModelMessages = fromLanguageModelMessages; exports.fromLanguageModelTools = fromLanguageModelTools; exports.getExternalStoreMessage = getExternalStoreMessage; exports.makeAssistantTool = makeAssistantTool; exports.makeAssistantToolUI = makeAssistantToolUI; exports.streamUtils = streamUtils; exports.subscribeToMainThread = subscribeToMainThread; exports.toCoreMessage = _chunkKVXP3Q6Kjs.toCoreMessage; exports.toCoreMessages = _chunkKVXP3Q6Kjs.toCoreMessages; exports.toLanguageModelMessages = _chunkKVXP3Q6Kjs.toLanguageModelMessages; exports.toLanguageModelTools = _chunkKVXP3Q6Kjs.toLanguageModelTools; exports.useActionBarCopy = useActionBarCopy; exports.useActionBarEdit = useActionBarEdit; exports.useActionBarFeedbackNegative = useActionBarFeedbackNegative; exports.useActionBarFeedbackPositive = useActionBarFeedbackPositive; exports.useActionBarReload = useActionBarReload; exports.useActionBarSpeak = useActionBarSpeak; exports.useActionBarStopSpeaking = useActionBarStopSpeaking; exports.useAppendMessage = useAppendMessage; exports.useAssistantActions = useAssistantActions; exports.useAssistantActionsStore = useAssistantActionsStore; exports.useAssistantContext = useAssistantContext; exports.useAssistantInstructions = useAssistantInstructions; exports.useAssistantRuntime = useAssistantRuntime; exports.useAssistantRuntimeStore = useAssistantRuntimeStore; exports.useAssistantTool = useAssistantTool; exports.useAssistantToolUI = useAssistantToolUI; exports.useBranchPickerCount = useBranchPickerCount; exports.useBranchPickerNext = useBranchPickerNext; exports.useBranchPickerNumber = useBranchPickerNumber; exports.useBranchPickerPrevious = useBranchPickerPrevious; exports.useComposer = useComposer; exports.useComposerAddAttachment = useComposerAddAttachment; exports.useComposerCancel = useComposerCancel; exports.useComposerContext = useComposerContext; exports.useComposerIf = useComposerIf; exports.useComposerRuntime = useComposerRuntime; exports.useComposerSend = useComposerSend; exports.useComposerStore = useComposerStore; exports.useContentPart = useContentPart; exports.useContentPartContext = useContentPartContext; exports.useContentPartDisplay = useContentPartDisplay; exports.useContentPartImage = useContentPartImage; exports.useContentPartRuntime = useContentPartRuntime; exports.useContentPartStore = useContentPartStore; exports.useContentPartText = useContentPartText; exports.useDangerousInBrowserRuntime = useDangerousInBrowserRuntime; exports.useEdgeRuntime = useEdgeRuntime; exports.useEditComposer = useEditComposer; exports.useEditComposerStore = useEditComposerStore; exports.useExternalMessageConverter = useExternalMessageConverter; exports.useExternalStoreRuntime = useExternalStoreRuntime; exports.useLocalRuntime = useLocalRuntime; exports.useMessage = useMessage; exports.useMessageContext = useMessageContext; exports.useMessageIf = useMessageIf; exports.useMessageRuntime = useMessageRuntime; exports.useMessageStore = useMessageStore; exports.useMessageUtils = useMessageUtils; exports.useMessageUtilsStore = useMessageUtilsStore; exports.useSwitchToNewThread = useSwitchToNewThread; exports.useThread = useThread; exports.useThreadActions = useThreadActions; exports.useThreadActionsStore = useThreadActionsStore; exports.useThreadComposer = useThreadComposer; exports.useThreadComposerStore = useThreadComposerStore; exports.useThreadConfig = useThreadConfig; exports.useThreadContext = useThreadContext; exports.useThreadEmpty = useThreadEmpty; exports.useThreadIf = useThreadIf; exports.useThreadMessages = useThreadMessages; exports.useThreadMessagesStore = useThreadMessagesStore; exports.useThreadRuntime = useThreadRuntime; exports.useThreadRuntimeStore = useThreadRuntimeStore; exports.useThreadScrollToBottom = useThreadScrollToBottom; exports.useThreadStore = useThreadStore; exports.useThreadSuggestion = useThreadSuggestion; exports.useThreadViewport = useThreadViewport; exports.useThreadViewportStore = useThreadViewportStore; exports.useToolUIs = useToolUIs; exports.useToolUIsStore = useToolUIsStore;
6197
6232
  //# sourceMappingURL=index.js.map