@alquimia-ai/ui 1.9.0 → 1.9.2

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.js CHANGED
@@ -3205,8 +3205,8 @@ var AssistantMessageArea = React34.forwardRef(
3205
3205
  {
3206
3206
  role: "assistant",
3207
3207
  "data-error-code": message.error_code,
3208
- additionalInfo: showDetailedErrors ? `${message.error_detail}
3209
- stream id: ${message.stream_id}` : void 0,
3208
+ additionalInfo: showDetailedErrors ? `${message.error_detail}${message.stream_id ? `
3209
+ stream id: ${message.stream_id}` : ""}` : void 0,
3210
3210
  toggleAdditionalInfo: true,
3211
3211
  children: getErrorMessage(message.error_code)
3212
3212
  }
@@ -3328,44 +3328,42 @@ var AssistantInput = React34.forwardRef(
3328
3328
  ...props,
3329
3329
  children: [
3330
3330
  attachmentsSlot,
3331
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center", children: [
3331
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3332
+ "textarea",
3333
+ {
3334
+ disabled: isButtonDisabled,
3335
+ value: input,
3336
+ onChange: handleInputChange,
3337
+ placeholder,
3338
+ className: cn(
3339
+ "flex-1 min-w-0 text-sm p-3 focus:outline-none w-full resize-none",
3340
+ "bg-transparent text-foreground",
3341
+ "placeholder:text-muted-foreground",
3342
+ "disabled:opacity-50 disabled:cursor-not-allowed"
3343
+ ),
3344
+ onKeyDown: (e) => {
3345
+ if (e.key === "Enter" && !e.shiftKey) {
3346
+ e.preventDefault();
3347
+ sendMessageFunc(e);
3348
+ }
3349
+ }
3350
+ }
3351
+ ),
3352
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center relative alq--assistant-actions", children: [
3353
+ userToolboxComponent,
3354
+ speechToTextComponent,
3332
3355
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3333
- "textarea",
3356
+ "button",
3334
3357
  {
3358
+ type: "submit",
3335
3359
  disabled: isButtonDisabled,
3336
- value: input,
3337
- onChange: handleInputChange,
3338
- placeholder,
3339
3360
  className: cn(
3340
- "flex-1 text-sm p-3 focus:outline-none w-full resize-none",
3341
- "bg-transparent text-foreground",
3342
- "placeholder:text-muted-foreground",
3343
- "disabled:opacity-50 disabled:cursor-not-allowed"
3361
+ "w-10 h-10 rounded-full flex items-center justify-center alq--assistant-button-send",
3362
+ isButtonDisabled ? "bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
3344
3363
  ),
3345
- onKeyDown: (e) => {
3346
- if (e.key === "Enter" && !e.shiftKey) {
3347
- e.preventDefault();
3348
- sendMessageFunc(e);
3349
- }
3350
- }
3364
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react15.Send, { className: "w-5 h-5" })
3351
3365
  }
3352
- ),
3353
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "relative alq--assistant-actions", children: [
3354
- userToolboxComponent && userToolboxComponent,
3355
- speechToTextComponent && speechToTextComponent,
3356
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3357
- "button",
3358
- {
3359
- type: "submit",
3360
- disabled: isButtonDisabled,
3361
- className: cn(
3362
- "w-10 h-10 rounded-full flex items-center justify-center alq--assistant-button-send",
3363
- isButtonDisabled ? "bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
3364
- ),
3365
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react15.Send, { className: "w-5 h-5" })
3366
- }
3367
- )
3368
- ] })
3366
+ )
3369
3367
  ] })
3370
3368
  ]
3371
3369
  }