@assistant-ui/react 0.5.78 → 0.5.79

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -3926,17 +3926,13 @@ function assistantDecoderStream() {
3926
3926
  }
3927
3927
  case "c" /* ToolCallDelta */: {
3928
3928
  const { toolCallId, argsTextDelta } = value;
3929
- if (_optionalChain([currentToolCall, 'optionalAccess', _192 => _192.id]) !== toolCallId) {
3930
- throw new Error(
3931
- `Received tool call delta for unknown tool call "${toolCallId}".`
3932
- );
3933
- }
3929
+ const toolName = toolCallNames.get(toolCallId);
3934
3930
  currentToolCall.argsText += argsTextDelta;
3935
3931
  controller.enqueue({
3936
3932
  type: "tool-call-delta",
3937
3933
  toolCallType: "function",
3938
- toolCallId: currentToolCall.id,
3939
- toolName: currentToolCall.name,
3934
+ toolCallId,
3935
+ toolName,
3940
3936
  argsTextDelta
3941
3937
  });
3942
3938
  break;
@@ -4073,7 +4069,7 @@ var useEdgeRuntime = (options) => {
4073
4069
  };
4074
4070
 
4075
4071
  // src/runtimes/local/shouldContinue.tsx
4076
- var shouldContinue = (result) => _optionalChain([result, 'access', _193 => _193.status, 'optionalAccess', _194 => _194.type]) === "requires-action" && result.status.reason === "tool-calls" && result.content.every((c) => c.type !== "tool-call" || !!c.result);
4072
+ var shouldContinue = (result) => _optionalChain([result, 'access', _192 => _192.status, 'optionalAccess', _193 => _193.type]) === "requires-action" && result.status.reason === "tool-calls" && result.content.every((c) => c.type !== "tool-call" || !!c.result);
4077
4073
 
4078
4074
  // src/runtimes/composer/DefaultEditComposerRuntimeCore.tsx
4079
4075
  var DefaultEditComposerRuntimeCore = class extends BaseComposerRuntimeCore {
@@ -4093,7 +4089,7 @@ var DefaultEditComposerRuntimeCore = class extends BaseComposerRuntimeCore {
4093
4089
  return true;
4094
4090
  }
4095
4091
  getAttachmentAdapter() {
4096
- return _optionalChain([this, 'access', _195 => _195.runtime, 'access', _196 => _196.adapters, 'optionalAccess', _197 => _197.attachments]);
4092
+ return _optionalChain([this, 'access', _194 => _194.runtime, 'access', _195 => _195.adapters, 'optionalAccess', _196 => _196.attachments]);
4097
4093
  }
4098
4094
 
4099
4095
 
@@ -4171,7 +4167,7 @@ var BaseThreadRuntimeCore = (_class12 = class {
4171
4167
  return this._submittedFeedback[messageId];
4172
4168
  }
4173
4169
  submitFeedback({ messageId, type }) {
4174
- const adapter = _optionalChain([this, 'access', _198 => _198.adapters, 'optionalAccess', _199 => _199.feedback]);
4170
+ const adapter = _optionalChain([this, 'access', _197 => _197.adapters, 'optionalAccess', _198 => _198.feedback]);
4175
4171
  if (!adapter) throw new Error("Feedback adapter not configured");
4176
4172
  const { message } = this.repository.getMessage(messageId);
4177
4173
  adapter.submit({ message, type });
@@ -4181,10 +4177,10 @@ var BaseThreadRuntimeCore = (_class12 = class {
4181
4177
 
4182
4178
 
4183
4179
  speak(messageId) {
4184
- const adapter = _optionalChain([this, 'access', _200 => _200.adapters, 'optionalAccess', _201 => _201.speech]);
4180
+ const adapter = _optionalChain([this, 'access', _199 => _199.adapters, 'optionalAccess', _200 => _200.speech]);
4185
4181
  if (!adapter) throw new Error("Speech adapter not configured");
4186
4182
  const { message } = this.repository.getMessage(messageId);
4187
- _optionalChain([this, 'access', _202 => _202._stopSpeaking, 'optionalCall', _203 => _203()]);
4183
+ _optionalChain([this, 'access', _201 => _201._stopSpeaking, 'optionalCall', _202 => _202()]);
4188
4184
  const utterance = adapter.speak(message);
4189
4185
  const unsub = utterance.subscribe(() => {
4190
4186
  if (utterance.status.type === "ended") {
@@ -4274,17 +4270,17 @@ var LocalThreadRuntimeCore = (_class13 = class extends BaseThreadRuntimeCore {
4274
4270
  set options({ initialMessages, ...options }) {
4275
4271
  this._options = options;
4276
4272
  let hasUpdates = false;
4277
- const canSpeak = _optionalChain([options, 'access', _204 => _204.adapters, 'optionalAccess', _205 => _205.speech]) !== void 0;
4273
+ const canSpeak = _optionalChain([options, 'access', _203 => _203.adapters, 'optionalAccess', _204 => _204.speech]) !== void 0;
4278
4274
  if (this.capabilities.speech !== canSpeak) {
4279
4275
  this.capabilities.speech = canSpeak;
4280
4276
  hasUpdates = true;
4281
4277
  }
4282
- const canAttach = _optionalChain([options, 'access', _206 => _206.adapters, 'optionalAccess', _207 => _207.attachments]) !== void 0;
4278
+ const canAttach = _optionalChain([options, 'access', _205 => _205.adapters, 'optionalAccess', _206 => _206.attachments]) !== void 0;
4283
4279
  if (this.capabilities.attachments !== canAttach) {
4284
4280
  this.capabilities.attachments = canAttach;
4285
4281
  hasUpdates = true;
4286
4282
  }
4287
- const canFeedback = _optionalChain([options, 'access', _208 => _208.adapters, 'optionalAccess', _209 => _209.feedback]) !== void 0;
4283
+ const canFeedback = _optionalChain([options, 'access', _207 => _207.adapters, 'optionalAccess', _208 => _208.feedback]) !== void 0;
4288
4284
  if (this.capabilities.feedback !== canFeedback) {
4289
4285
  this.capabilities.feedback = canFeedback;
4290
4286
  hasUpdates = true;
@@ -4320,13 +4316,13 @@ var LocalThreadRuntimeCore = (_class13 = class extends BaseThreadRuntimeCore {
4320
4316
  }
4321
4317
  async performRoundtrip(parentId, message) {
4322
4318
  const messages2 = this.repository.getMessages();
4323
- _optionalChain([this, 'access', _210 => _210.abortController, 'optionalAccess', _211 => _211.abort, 'call', _212 => _212()]);
4319
+ _optionalChain([this, 'access', _209 => _209.abortController, 'optionalAccess', _210 => _210.abort, 'call', _211 => _211()]);
4324
4320
  this.abortController = new AbortController();
4325
4321
  const initialContent = message.content;
4326
- const initialSteps = _optionalChain([message, 'access', _213 => _213.metadata, 'optionalAccess', _214 => _214.steps]);
4327
- const initalCustom = _optionalChain([message, 'access', _215 => _215.metadata, 'optionalAccess', _216 => _216.custom]);
4322
+ const initialSteps = _optionalChain([message, 'access', _212 => _212.metadata, 'optionalAccess', _213 => _213.steps]);
4323
+ const initalCustom = _optionalChain([message, 'access', _214 => _214.metadata, 'optionalAccess', _215 => _215.custom]);
4328
4324
  const updateMessage = (m) => {
4329
- const newSteps = _optionalChain([m, 'access', _217 => _217.metadata, 'optionalAccess', _218 => _218.steps]) || _optionalChain([m, 'access', _219 => _219.metadata, 'optionalAccess', _220 => _220.roundtrips]);
4325
+ const newSteps = _optionalChain([m, 'access', _216 => _216.metadata, 'optionalAccess', _217 => _217.steps]) || _optionalChain([m, 'access', _218 => _218.metadata, 'optionalAccess', _219 => _219.roundtrips]);
4330
4326
  const steps2 = newSteps ? [..._nullishCoalesce(initialSteps, () => ( [])), ...newSteps] : void 0;
4331
4327
  message = {
4332
4328
  ...message,
@@ -4338,7 +4334,7 @@ var LocalThreadRuntimeCore = (_class13 = class extends BaseThreadRuntimeCore {
4338
4334
  metadata: {
4339
4335
  ...message.metadata,
4340
4336
  ...steps2 ? { roundtrips: steps2, steps: steps2 } : void 0,
4341
- ..._optionalChain([m, 'access', _221 => _221.metadata, 'optionalAccess', _222 => _222.custom]) ? {
4337
+ ..._optionalChain([m, 'access', _220 => _220.metadata, 'optionalAccess', _221 => _221.custom]) ? {
4342
4338
  custom: { ..._nullishCoalesce(initalCustom, () => ( {})), ...m.metadata.custom }
4343
4339
  } : void 0
4344
4340
  }
@@ -4348,7 +4344,7 @@ var LocalThreadRuntimeCore = (_class13 = class extends BaseThreadRuntimeCore {
4348
4344
  this._notifySubscribers();
4349
4345
  };
4350
4346
  const maxSteps = this.options.maxSteps ? this.options.maxSteps : (_nullishCoalesce(this.options.maxToolRoundtrips, () => ( 1))) + 1;
4351
- const steps = _nullishCoalesce(_optionalChain([message, 'access', _223 => _223.metadata, 'optionalAccess', _224 => _224.steps, 'optionalAccess', _225 => _225.length]), () => ( 0));
4347
+ const steps = _nullishCoalesce(_optionalChain([message, 'access', _222 => _222.metadata, 'optionalAccess', _223 => _223.steps, 'optionalAccess', _224 => _224.length]), () => ( 0));
4352
4348
  if (steps >= maxSteps) {
4353
4349
  updateMessage({
4354
4350
  status: {
@@ -4400,7 +4396,7 @@ var LocalThreadRuntimeCore = (_class13 = class extends BaseThreadRuntimeCore {
4400
4396
  return message;
4401
4397
  }
4402
4398
  cancelRun() {
4403
- _optionalChain([this, 'access', _226 => _226.abortController, 'optionalAccess', _227 => _227.abort, 'call', _228 => _228()]);
4399
+ _optionalChain([this, 'access', _225 => _225.abortController, 'optionalAccess', _226 => _226.abort, 'call', _227 => _227()]);
4404
4400
  this.abortController = null;
4405
4401
  }
4406
4402
  addToolResult({
@@ -4472,7 +4468,7 @@ var LocalRuntimeCore = class extends BaseAssistantRuntimeCore {
4472
4468
  const messages2 = fromCoreMessages(initialMessages);
4473
4469
  this.thread.import({
4474
4470
  messages: messages2.map((m, idx) => ({
4475
- parentId: _nullishCoalesce(_optionalChain([messages2, 'access', _229 => _229[idx - 1], 'optionalAccess', _230 => _230.id]), () => ( null)),
4471
+ parentId: _nullishCoalesce(_optionalChain([messages2, 'access', _228 => _228[idx - 1], 'optionalAccess', _229 => _229.id]), () => ( null)),
4476
4472
  message: m
4477
4473
  }))
4478
4474
  });
@@ -4612,7 +4608,7 @@ var fromThreadMessageLike = (like, fallbackId, fallbackStatus) => {
4612
4608
  // src/runtimes/external-store/ExternalStoreThreadRuntimeCore.tsx
4613
4609
  var EMPTY_ARRAY2 = Object.freeze([]);
4614
4610
  var hasUpcomingMessage = (isRunning, messages2) => {
4615
- return isRunning && _optionalChain([messages2, 'access', _231 => _231[messages2.length - 1], 'optionalAccess', _232 => _232.role]) !== "assistant";
4611
+ return isRunning && _optionalChain([messages2, 'access', _230 => _230[messages2.length - 1], 'optionalAccess', _231 => _231.role]) !== "assistant";
4616
4612
  };
4617
4613
  var ExternalStoreThreadRuntimeCore = (_class15 = class extends BaseThreadRuntimeCore {
4618
4614
  __init34() {this.assistantOptimisticId = null}
@@ -4668,11 +4664,11 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class extends BaseThreadRuntime
4668
4664
  edit: this._store.onEdit !== void 0,
4669
4665
  reload: this._store.onReload !== void 0,
4670
4666
  cancel: this._store.onCancel !== void 0,
4671
- speech: _optionalChain([this, 'access', _236 => _236._store, 'access', _237 => _237.adapters, 'optionalAccess', _238 => _238.speech]) !== void 0,
4672
- unstable_copy: _optionalChain([this, 'access', _239 => _239._store, 'access', _240 => _240.unstable_capabilities, 'optionalAccess', _241 => _241.copy]) !== false,
4667
+ speech: _optionalChain([this, 'access', _235 => _235._store, 'access', _236 => _236.adapters, 'optionalAccess', _237 => _237.speech]) !== void 0,
4668
+ unstable_copy: _optionalChain([this, 'access', _238 => _238._store, 'access', _239 => _239.unstable_capabilities, 'optionalAccess', _240 => _240.copy]) !== false,
4673
4669
  // default true
4674
- attachments: !!_optionalChain([this, 'access', _242 => _242.store, 'access', _243 => _243.adapters, 'optionalAccess', _244 => _244.attachments]),
4675
- feedback: !!_optionalChain([this, 'access', _245 => _245.store, 'access', _246 => _246.adapters, 'optionalAccess', _247 => _247.feedback])
4670
+ attachments: !!_optionalChain([this, 'access', _241 => _241.store, 'access', _242 => _242.adapters, 'optionalAccess', _243 => _243.attachments]),
4671
+ feedback: !!_optionalChain([this, 'access', _244 => _244.store, 'access', _245 => _245.adapters, 'optionalAccess', _246 => _246.feedback])
4676
4672
  };
4677
4673
  if (oldStore) {
4678
4674
  if (oldStore.convertMessage !== store.convertMessage) {
@@ -4699,7 +4695,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class extends BaseThreadRuntime
4699
4695
  for (let i = 0; i < messages2.length; i++) {
4700
4696
  const message = messages2[i];
4701
4697
  const parent = messages2[i - 1];
4702
- this.repository.addOrUpdateMessage(_nullishCoalesce(_optionalChain([parent, 'optionalAccess', _248 => _248.id]), () => ( null)), message);
4698
+ this.repository.addOrUpdateMessage(_nullishCoalesce(_optionalChain([parent, 'optionalAccess', _247 => _247.id]), () => ( null)), message);
4703
4699
  }
4704
4700
  if (this.assistantOptimisticId) {
4705
4701
  this.repository.deleteMessage(this.assistantOptimisticId);
@@ -4707,7 +4703,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class extends BaseThreadRuntime
4707
4703
  }
4708
4704
  if (hasUpcomingMessage(isRunning, messages2)) {
4709
4705
  this.assistantOptimisticId = this.repository.appendOptimisticMessage(
4710
- _nullishCoalesce(_optionalChain([messages2, 'access', _249 => _249.at, 'call', _250 => _250(-1), 'optionalAccess', _251 => _251.id]), () => ( null)),
4706
+ _nullishCoalesce(_optionalChain([messages2, 'access', _248 => _248.at, 'call', _249 => _249(-1), 'optionalAccess', _250 => _250.id]), () => ( null)),
4711
4707
  {
4712
4708
  role: "assistant",
4713
4709
  content: []
@@ -4715,7 +4711,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class extends BaseThreadRuntime
4715
4711
  );
4716
4712
  }
4717
4713
  this.repository.resetHead(
4718
- _nullishCoalesce(_nullishCoalesce(this.assistantOptimisticId, () => ( _optionalChain([messages2, 'access', _252 => _252.at, 'call', _253 => _253(-1), 'optionalAccess', _254 => _254.id]))), () => ( null))
4714
+ _nullishCoalesce(_nullishCoalesce(this.assistantOptimisticId, () => ( _optionalChain([messages2, 'access', _251 => _251.at, 'call', _252 => _252(-1), 'optionalAccess', _253 => _253.id]))), () => ( null))
4719
4715
  );
4720
4716
  this._messages = this.repository.getMessages();
4721
4717
  this._notifySubscribers();
@@ -4727,7 +4723,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class extends BaseThreadRuntime
4727
4723
  this.updateMessages(this.repository.getMessages());
4728
4724
  }
4729
4725
  async append(message) {
4730
- if (message.parentId !== (_nullishCoalesce(_optionalChain([this, 'access', _255 => _255.messages, 'access', _256 => _256.at, 'call', _257 => _257(-1), 'optionalAccess', _258 => _258.id]), () => ( null)))) {
4726
+ if (message.parentId !== (_nullishCoalesce(_optionalChain([this, 'access', _254 => _254.messages, 'access', _255 => _255.at, 'call', _256 => _256(-1), 'optionalAccess', _257 => _257.id]), () => ( null)))) {
4731
4727
  if (!this._store.onEdit)
4732
4728
  throw new Error("Runtime does not support editing messages.");
4733
4729
  await this._store.onEdit(message);
@@ -4750,7 +4746,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class extends BaseThreadRuntime
4750
4746
  }
4751
4747
  let messages2 = this.repository.getMessages();
4752
4748
  const previousMessage = messages2[messages2.length - 1];
4753
- if (_optionalChain([previousMessage, 'optionalAccess', _259 => _259.role]) === "user" && previousMessage.id === _optionalChain([messages2, 'access', _260 => _260.at, 'call', _261 => _261(-1), 'optionalAccess', _262 => _262.id])) {
4749
+ if (_optionalChain([previousMessage, 'optionalAccess', _258 => _258.role]) === "user" && previousMessage.id === _optionalChain([messages2, 'access', _259 => _259.at, 'call', _260 => _260(-1), 'optionalAccess', _261 => _261.id])) {
4754
4750
  this.repository.deleteMessage(previousMessage.id);
4755
4751
  if (!this.composer.text.trim()) {
4756
4752
  this.composer.setText(getThreadMessageText(previousMessage));
@@ -4769,7 +4765,7 @@ var ExternalStoreThreadRuntimeCore = (_class15 = class extends BaseThreadRuntime
4769
4765
  this._store.onAddToolResult(options);
4770
4766
  }
4771
4767
  __init39() {this.updateMessages = (messages2) => {
4772
- _optionalChain([this, 'access', _263 => _263._store, 'access', _264 => _264.setMessages, 'optionalCall', _265 => _265(
4768
+ _optionalChain([this, 'access', _262 => _262._store, 'access', _263 => _263.setMessages, 'optionalCall', _264 => _264(
4773
4769
  messages2.flatMap(getExternalStoreMessage).filter((m) => m != null)
4774
4770
  )]);
4775
4771
  }}
@@ -5220,7 +5216,7 @@ var ThreadConfigProvider = ({
5220
5216
  }) => {
5221
5217
  const hasAssistant = !!useAssistantRuntime({ optional: true });
5222
5218
  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 });
5223
- if (!_optionalChain([config, 'optionalAccess', _266 => _266.runtime])) return configProvider;
5219
+ if (!_optionalChain([config, 'optionalAccess', _265 => _265.runtime])) return configProvider;
5224
5220
  if (hasAssistant) {
5225
5221
  throw new Error(
5226
5222
  "You provided a runtime to <Thread> while simulataneously using <AssistantRuntimeProvider>. This is not allowed."
@@ -5548,7 +5544,7 @@ var AssistantMessageContent = _react.forwardRef.call(void 0, ({ components: comp
5548
5544
  {
5549
5545
  components: {
5550
5546
  ...componentsProp,
5551
- Text: _nullishCoalesce(_nullishCoalesce(_optionalChain([componentsProp, 'optionalAccess', _267 => _267.Text]), () => ( components.Text)), () => ( content_part_default.Text)),
5547
+ Text: _nullishCoalesce(_nullishCoalesce(_optionalChain([componentsProp, 'optionalAccess', _266 => _266.Text]), () => ( components.Text)), () => ( content_part_default.Text)),
5552
5548
  tools: toolsComponents
5553
5549
  }
5554
5550
  }
@@ -5659,7 +5655,7 @@ var useAttachmentSrc = () => {
5659
5655
  const { file, src } = useAttachment((a) => {
5660
5656
  if (a.type !== "image") return {};
5661
5657
  if (a.file) return { file: a.file };
5662
- const src2 = _optionalChain([a, 'access', _268 => _268.content, 'optionalAccess', _269 => _269.filter, 'call', _270 => _270((c) => c.type === "image"), 'access', _271 => _271[0], 'optionalAccess', _272 => _272.image]);
5658
+ const src2 = _optionalChain([a, 'access', _267 => _267.content, 'optionalAccess', _268 => _268.filter, 'call', _269 => _269((c) => c.type === "image"), 'access', _270 => _270[0], 'optionalAccess', _271 => _271.image]);
5663
5659
  if (!src2) return {};
5664
5660
  return { src: src2 };
5665
5661
  });
@@ -5803,7 +5799,7 @@ var ComposerAttachments = ({ components }) => {
5803
5799
  {
5804
5800
  components: {
5805
5801
  ...components,
5806
- Attachment: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _273 => _273.Attachment]), () => ( attachment_default))
5802
+ Attachment: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _272 => _272.Attachment]), () => ( attachment_default))
5807
5803
  }
5808
5804
  }
5809
5805
  ) });
@@ -5931,7 +5927,7 @@ var ThreadWelcomeSuggestions = () => {
5931
5927
  const suggestions2 = useThread((t) => t.suggestions);
5932
5928
  const { welcome: { suggestions } = {} } = useThreadConfig();
5933
5929
  const finalSuggestions = suggestions2.length ? suggestions2 : suggestions;
5934
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadWelcomeSuggestionContainer, { children: _optionalChain([finalSuggestions, 'optionalAccess', _274 => _274.map, 'call', _275 => _275((suggestion, idx) => {
5930
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadWelcomeSuggestionContainer, { children: _optionalChain([finalSuggestions, 'optionalAccess', _273 => _273.map, 'call', _274 => _274((suggestion, idx) => {
5935
5931
  const key = `${suggestion.prompt}-${idx}`;
5936
5932
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThreadWelcomeSuggestion, { suggestion }, key);
5937
5933
  })]) });
@@ -6009,7 +6005,7 @@ var UserMessageContent = _react.forwardRef.call(void 0, ({ components, ...props
6009
6005
  {
6010
6006
  components: {
6011
6007
  ...components,
6012
- Text: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _276 => _276.Text]), () => ( content_part_default.Text))
6008
+ Text: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _275 => _275.Text]), () => ( content_part_default.Text))
6013
6009
  }
6014
6010
  }
6015
6011
  ) });
@@ -6026,7 +6022,7 @@ var UserMessageAttachments = ({
6026
6022
  {
6027
6023
  components: {
6028
6024
  ...components,
6029
- Attachment: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _277 => _277.Attachment]), () => ( attachment_default))
6025
+ Attachment: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _276 => _276.Attachment]), () => ( attachment_default))
6030
6026
  }
6031
6027
  }
6032
6028
  ) }) });
@@ -6129,10 +6125,10 @@ var ThreadMessages = ({ components, unstable_flexGrowDiv: flexGrowDiv = true, ..
6129
6125
  thread_exports.Messages,
6130
6126
  {
6131
6127
  components: {
6132
- UserMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _278 => _278.UserMessage]), () => ( user_message_default)),
6133
- EditComposer: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _279 => _279.EditComposer]), () => ( edit_composer_default)),
6134
- AssistantMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _280 => _280.AssistantMessage]), () => ( assistant_message_default)),
6135
- SystemMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _281 => _281.SystemMessage]), () => ( SystemMessage))
6128
+ UserMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _277 => _277.UserMessage]), () => ( user_message_default)),
6129
+ EditComposer: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _278 => _278.EditComposer]), () => ( edit_composer_default)),
6130
+ AssistantMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _279 => _279.AssistantMessage]), () => ( assistant_message_default)),
6131
+ SystemMessage: _nullishCoalesce(_optionalChain([components, 'optionalAccess', _280 => _280.SystemMessage]), () => ( SystemMessage))
6136
6132
  },
6137
6133
  ...rest
6138
6134
  }
@@ -6143,7 +6139,7 @@ var ThreadMessages = ({ components, unstable_flexGrowDiv: flexGrowDiv = true, ..
6143
6139
  ThreadMessages.displayName = "ThreadMessages";
6144
6140
  var ThreadFollowupSuggestions = () => {
6145
6141
  const suggestions = useThread((t) => t.suggestions);
6146
- 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', _282 => _282.map, 'call', _283 => _283((suggestion, idx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6142
+ 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', _281 => _281.map, 'call', _282 => _282((suggestion, idx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6147
6143
  thread_exports.Suggestion,
6148
6144
  {
6149
6145
  className: "aui-thread-followup-suggestion",