@aleph-alpha/chat-kit 2.3.0 → 3.0.0

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.
Files changed (83) hide show
  1. package/dist/{CkInput.vue_vue_type_script_setup_true_lang-DYTizPsB.js → CkInput.vue_vue_type_script_setup_true_lang-CwH5M5WD.js} +203 -141
  2. package/dist/chat-kit.css +33 -6
  3. package/dist/components/base/CkDropZoneOverlay/CkDropZoneOverlay.vue.d.ts.map +1 -1
  4. package/dist/components/base/CkModelSelector/types.d.ts +1 -1
  5. package/dist/components/base/CkPromptInput/CkPromptInput.stories.d.ts +48 -5
  6. package/dist/components/base/CkPromptInput/CkPromptInput.stories.d.ts.map +1 -1
  7. package/dist/components/base/CkPromptInput/CkPromptInput.vue.d.ts +7 -6
  8. package/dist/components/base/CkPromptInput/CkPromptInput.vue.d.ts.map +1 -1
  9. package/dist/components/base/CkPromptInput/types.d.ts +11 -12
  10. package/dist/components/base/CkPromptInput/types.d.ts.map +1 -1
  11. package/dist/components/base/CkPromptMenuButton/CkPromptMenuButton.stories.d.ts +18 -0
  12. package/dist/components/base/CkPromptMenuButton/CkPromptMenuButton.stories.d.ts.map +1 -0
  13. package/dist/components/base/CkPromptMenuButton/CkPromptMenuButton.vue.d.ts +18 -0
  14. package/dist/components/base/CkPromptMenuButton/CkPromptMenuButton.vue.d.ts.map +1 -0
  15. package/dist/components/base/CkPromptMenuButton/index.d.ts +3 -0
  16. package/dist/components/base/CkPromptMenuButton/index.d.ts.map +1 -0
  17. package/dist/components/base/CkPromptMenuButton/types.d.ts +30 -0
  18. package/dist/components/base/CkPromptMenuButton/types.d.ts.map +1 -0
  19. package/dist/components/base/{CkPromptActionButton/CkPromptActionButton.stories.d.ts → CkPromptSendButton/CkPromptSendButton.stories.d.ts} +5 -5
  20. package/dist/components/base/CkPromptSendButton/CkPromptSendButton.stories.d.ts.map +1 -0
  21. package/dist/components/base/{CkPromptActionButton/CkPromptActionButton.vue.d.ts → CkPromptSendButton/CkPromptSendButton.vue.d.ts} +3 -3
  22. package/dist/components/base/CkPromptSendButton/CkPromptSendButton.vue.d.ts.map +1 -0
  23. package/dist/components/base/CkPromptSendButton/index.d.ts +3 -0
  24. package/dist/components/base/CkPromptSendButton/index.d.ts.map +1 -0
  25. package/dist/components/base/CkPromptSendButton/types.d.ts +34 -0
  26. package/dist/components/base/CkPromptSendButton/types.d.ts.map +1 -0
  27. package/dist/components/base/CkPromptStopButton/CkPromptStopButton.stories.d.ts +1 -1
  28. package/dist/components/base/CkPromptStopButton/CkPromptStopButton.vue.d.ts.map +1 -1
  29. package/dist/components/base/CkPromptStopButton/types.d.ts +6 -4
  30. package/dist/components/base/CkPromptStopButton/types.d.ts.map +1 -1
  31. package/dist/components/base/icons/CkSendIcon.vue.d.ts.map +1 -1
  32. package/dist/components/base/index.d.ts +3 -1
  33. package/dist/components/base/index.d.ts.map +1 -1
  34. package/dist/components/composed/CkHistory/CkHistory.vue.d.ts +1 -1
  35. package/dist/components/composed/CkInput/CkInput.stories.d.ts.map +1 -1
  36. package/dist/components/composed/CkInput/CkInput.vue.d.ts +9 -8
  37. package/dist/components/composed/CkInput/CkInput.vue.d.ts.map +1 -1
  38. package/dist/components/composed/CkInput/types.d.ts +2 -7
  39. package/dist/components/composed/CkInput/types.d.ts.map +1 -1
  40. package/dist/components/index.d.ts +2 -2
  41. package/dist/components/index.d.ts.map +1 -1
  42. package/dist/components/index.js +9 -8
  43. package/dist/index.d.ts +2 -2
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +10 -9
  46. package/package.json +1 -1
  47. package/src/components/base/CkDropZoneOverlay/CkDropZoneOverlay.vue +2 -7
  48. package/src/components/base/CkModelSelector/types.ts +1 -1
  49. package/src/components/base/CkPromptInput/CkPromptInput.spec.ts +206 -11
  50. package/src/components/base/CkPromptInput/CkPromptInput.stories.ts +1068 -43
  51. package/src/components/base/CkPromptInput/CkPromptInput.vue +137 -28
  52. package/src/components/base/CkPromptInput/types.ts +11 -12
  53. package/src/components/base/CkPromptMenuButton/CkPromptMenuButton.spec.ts +62 -0
  54. package/src/components/base/CkPromptMenuButton/CkPromptMenuButton.stories.ts +75 -0
  55. package/src/components/base/CkPromptMenuButton/CkPromptMenuButton.vue +26 -0
  56. package/src/components/base/CkPromptMenuButton/index.ts +2 -0
  57. package/src/components/base/CkPromptMenuButton/types.ts +29 -0
  58. package/src/components/base/{CkPromptActionButton/CkPromptActionButton.spec.ts → CkPromptSendButton/CkPromptSendButton.spec.ts} +11 -11
  59. package/src/components/base/CkPromptSendButton/CkPromptSendButton.stories.ts +117 -0
  60. package/src/components/base/{CkPromptActionButton/CkPromptActionButton.vue → CkPromptSendButton/CkPromptSendButton.vue} +4 -4
  61. package/src/components/base/CkPromptSendButton/index.ts +2 -0
  62. package/src/components/base/CkPromptSendButton/types.ts +33 -0
  63. package/src/components/base/CkPromptStopButton/CkPromptStopButton.spec.ts +5 -5
  64. package/src/components/base/CkPromptStopButton/CkPromptStopButton.stories.ts +1 -1
  65. package/src/components/base/CkPromptStopButton/CkPromptStopButton.vue +3 -2
  66. package/src/components/base/CkPromptStopButton/types.ts +6 -4
  67. package/src/components/base/icons/CkSendIcon.vue +3 -16
  68. package/src/components/base/icons/CkStopIcon.vue +1 -1
  69. package/src/components/base/index.ts +3 -1
  70. package/src/components/composed/CkInput/CkInput.stories.ts +0 -4
  71. package/src/components/composed/CkInput/CkInput.vue +7 -5
  72. package/src/components/composed/CkInput/types.ts +2 -7
  73. package/src/components/index.ts +3 -1
  74. package/src/index.ts +3 -1
  75. package/dist/components/base/CkPromptActionButton/CkPromptActionButton.stories.d.ts.map +0 -1
  76. package/dist/components/base/CkPromptActionButton/CkPromptActionButton.vue.d.ts.map +0 -1
  77. package/dist/components/base/CkPromptActionButton/index.d.ts +0 -3
  78. package/dist/components/base/CkPromptActionButton/index.d.ts.map +0 -1
  79. package/dist/components/base/CkPromptActionButton/types.d.ts +0 -33
  80. package/dist/components/base/CkPromptActionButton/types.d.ts.map +0 -1
  81. package/src/components/base/CkPromptActionButton/CkPromptActionButton.stories.ts +0 -126
  82. package/src/components/base/CkPromptActionButton/index.ts +0 -2
  83. package/src/components/base/CkPromptActionButton/types.ts +0 -32
@@ -1,6 +1,6 @@
1
- import { defineComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createCommentVNode, ref, onMounted, nextTick, onUnmounted, watch, Fragment, renderList, normalizeStyle, createBlock, unref, mergeProps, withCtx, createVNode, Transition, toDisplayString, createStaticVNode, computed, onBeforeUnmount, Teleport, withModifiers, normalizeClass, toRefs, h, useId, createTextVNode, useAttrs, useSlots, resolveDynamicComponent, useTemplateRef, createSlots, normalizeProps, guardReactiveProps } from "vue";
1
+ import { defineComponent, openBlock, createBlock, unref, createElementBlock, createElementVNode, renderSlot, createCommentVNode, ref, onMounted, nextTick, onUnmounted, watch, Fragment, renderList, normalizeStyle, mergeProps, withCtx, createVNode, Transition, toDisplayString, createStaticVNode, computed, onBeforeUnmount, Teleport, withModifiers, normalizeClass, toRefs, h, useId, createTextVNode, useAttrs, useSlots, resolveDynamicComponent, useTemplateRef, onUpdated, createSlots, normalizeProps, guardReactiveProps } from "vue";
2
+ import { UiIcon, UiButton, UiTooltip, formatFileSize, UiDialog, UiDialogContent, UiDialogDescription, UiFieldLabel, UiToggleGroup, UiToggleGroupItem, UiField, UiTextarea, UiFileItem, UiPopover, UiPopoverTrigger, UiFileType, UiProgress, UiPopoverContent, Primitive, UiAvatar, UiAvatarImage, UiSpinner, UiAvatarFallback, UiSidebarPopoverMenu, UiSidebarPopoverMenuItem } from "@aleph-alpha/ui-library";
2
3
  import { u as useChatKitLabels, d as defaultChatKitLabels, a as useMarkdownParser } from "./useChatKitLabels-ZutacPad.js";
3
- import { UiButton, UiTooltip, UiIcon, UiDialog, UiDialogContent, UiDialogDescription, UiFieldLabel, UiToggleGroup, UiToggleGroupItem, UiField, UiTextarea, UiFileItem, UiPopover, UiPopoverTrigger, UiFileType, UiProgress, UiPopoverContent, Primitive, UiAvatar, UiAvatarImage, UiSpinner, UiAvatarFallback, UiSidebarPopoverMenu, UiSidebarPopoverMenuItem } from "@aleph-alpha/ui-library";
4
4
  const MINUTE = 60;
5
5
  const HOUR = 60 * MINUTE;
6
6
  const DAY = 24 * HOUR;
@@ -36,26 +36,12 @@ function formatRelativeTime(unixSeconds, nowSeconds = Math.floor(Date.now() / 1e
36
36
  const years = Math.floor(delta / YEAR);
37
37
  return years === 1 ? "1 year ago" : `${years} years ago`;
38
38
  }
39
- const _hoisted_1$e = {
40
- xmlns: "http://www.w3.org/2000/svg",
41
- width: "16",
42
- height: "16",
43
- viewBox: "0 0 24 24",
44
- fill: "none",
45
- stroke: "currentColor",
46
- "stroke-width": "2",
47
- "stroke-linecap": "round",
48
- "stroke-linejoin": "round"
49
- };
50
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
39
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
51
40
  ...{ name: "CkSendIcon" },
52
41
  __name: "CkSendIcon",
53
42
  setup(__props) {
54
43
  return (_ctx, _cache) => {
55
- return openBlock(), createElementBlock("svg", _hoisted_1$e, [..._cache[0] || (_cache[0] = [
56
- createElementVNode("path", { d: "M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z" }, null, -1),
57
- createElementVNode("path", { d: "M6 12h16" }, null, -1)
58
- ])]);
44
+ return openBlock(), createBlock(unref(UiIcon), { name: "arrow-up-right" });
59
45
  };
60
46
  }
61
47
  });
@@ -66,7 +52,7 @@ const _hoisted_1$d = {
66
52
  viewBox: "0 0 16 16",
67
53
  fill: "none"
68
54
  };
69
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
55
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
70
56
  ...{ name: "CkStopIcon" },
71
57
  __name: "CkStopIcon",
72
58
  setup(__props) {
@@ -74,7 +60,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
74
60
  return openBlock(), createElementBlock("svg", _hoisted_1$d, [..._cache[0] || (_cache[0] = [
75
61
  createElementVNode("path", {
76
62
  d: "M13.3335 3.33301C13.3335 2.96482 13.035 2.66634 12.6668 2.66634H3.3335C2.96531 2.66634 2.66683 2.96482 2.66683 3.33301V12.6663C2.66683 13.0345 2.96531 13.333 3.3335 13.333H12.6668C13.035 13.333 13.3335 13.0345 13.3335 12.6663V3.33301ZM14.6668 12.6663C14.6668 13.7709 13.7714 14.6663 12.6668 14.6663H3.3335C2.22893 14.6663 1.3335 13.7709 1.3335 12.6663V3.33301C1.3335 2.22844 2.22893 1.33301 3.3335 1.33301H12.6668C13.7714 1.33301 14.6668 2.22844 14.6668 3.33301V12.6663Z",
77
- fill: "#1D1D1B"
63
+ fill: "currentColor"
78
64
  }, null, -1)
79
65
  ])]);
80
66
  };
@@ -95,12 +81,12 @@ const _hoisted_4$6 = {
95
81
  "data-testid": "ck-agent-message-header",
96
82
  class: "body-14-regular text-content-on-surface-muted min-w-0 flex-1 [word-break:break-word]"
97
83
  };
98
- const _hoisted_5$5 = { class: "text-content-on-surface-primary text-base leading-7" };
99
- const _hoisted_6$4 = {
84
+ const _hoisted_5$4 = { class: "text-content-on-surface-primary text-base leading-7" };
85
+ const _hoisted_6$3 = {
100
86
  key: 1,
101
87
  class: "flex items-center gap-4"
102
88
  };
103
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
89
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
104
90
  ...{ name: "CkAgentMessage" },
105
91
  __name: "CkAgentMessage",
106
92
  setup(__props) {
@@ -114,10 +100,10 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
114
100
  renderSlot(_ctx.$slots, "header")
115
101
  ])) : createCommentVNode("", true)
116
102
  ])) : createCommentVNode("", true),
117
- createElementVNode("div", _hoisted_5$5, [
103
+ createElementVNode("div", _hoisted_5$4, [
118
104
  renderSlot(_ctx.$slots, "default")
119
105
  ]),
120
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_6$4, [
106
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_6$3, [
121
107
  renderSlot(_ctx.$slots, "footer")
122
108
  ])) : createCommentVNode("", true)
123
109
  ]);
@@ -133,7 +119,7 @@ const _hoisted_3$6 = {
133
119
  key: 1,
134
120
  class: "flex justify-start"
135
121
  };
136
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
122
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
137
123
  ...{ name: "CkConversationLayout" },
138
124
  __name: "CkConversationLayout",
139
125
  props: {
@@ -289,7 +275,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
289
275
  };
290
276
  }
291
277
  });
292
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
278
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
293
279
  ...{
294
280
  name: "CkMessageActionButton"
295
281
  },
@@ -317,7 +303,7 @@ const _hoisted_1$a = {
317
303
  class: "sr-only",
318
304
  "aria-live": "polite"
319
305
  };
320
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
306
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
321
307
  ...{
322
308
  name: "CkCopyMessageActionButton"
323
309
  },
@@ -374,7 +360,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
374
360
  "delay-duration": 0
375
361
  }, {
376
362
  default: withCtx(() => [
377
- createVNode(unref(_sfc_main$j), mergeProps({ ariaLabel: copied.value ? __props.ariaLabelCopied : __props.ariaLabelCopy }, {
363
+ createVNode(unref(_sfc_main$k), mergeProps({ ariaLabel: copied.value ? __props.ariaLabelCopied : __props.ariaLabelCopy }, {
378
364
  disabled: __props.disabled,
379
365
  onClick: handleClick
380
366
  }), {
@@ -415,7 +401,7 @@ const _export_sfc = (sfc, props) => {
415
401
  }
416
402
  return target;
417
403
  };
418
- const CkCopyMessageActionButton = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-f77a1193"]]);
404
+ const CkCopyMessageActionButton = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-f77a1193"]]);
419
405
  const _hoisted_1$9 = {
420
406
  width: "208",
421
407
  height: "144",
@@ -425,7 +411,7 @@ const _hoisted_1$9 = {
425
411
  "aria-hidden": "true",
426
412
  focusable: "false"
427
413
  };
428
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
414
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
429
415
  ...{ name: "CkDropZoneIllustration" },
430
416
  __name: "CkDropZoneIllustration",
431
417
  setup(__props) {
@@ -440,17 +426,17 @@ const _hoisted_1$8 = ["aria-label"];
440
426
  const _hoisted_2$6 = { class: "pointer-events-none flex h-full w-full flex-col items-center justify-center gap-4 text-content-on-surface-primary" };
441
427
  const _hoisted_3$5 = { class: "flex flex-col items-center gap-1 text-center" };
442
428
  const _hoisted_4$5 = { class: "body-16-bold" };
443
- const _hoisted_5$4 = {
429
+ const _hoisted_5$3 = {
444
430
  key: 0,
445
431
  class: "body-16-regular"
446
432
  };
447
- const _hoisted_6$3 = {
433
+ const _hoisted_6$2 = {
448
434
  key: 0,
449
435
  "data-slot": "drop-zone-errors",
450
436
  class: "pointer-events-none fixed bottom-6 left-1/2 z-50 max-w-[36rem] -translate-x-1/2 flex list-inside list-disc flex-col gap-1 rounded-md border border-border-surface-default bg-background-surface-default p-3 text-sm text-content-on-surface-secondary",
451
437
  role: "alert"
452
438
  };
453
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
439
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
454
440
  ...{
455
441
  name: "CkDropZoneOverlay"
456
442
  },
@@ -501,11 +487,6 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
501
487
  if (type && wildcards.some((w) => type.startsWith(w))) return true;
502
488
  return false;
503
489
  }
504
- function formatBytes(bytes) {
505
- const mb = bytes / (1024 * 1024);
506
- if (mb >= 1) return `${mb.toFixed(0)} MB`;
507
- return `${Math.max(1, Math.round(bytes / 1024))} KB`;
508
- }
509
490
  const isSingle = computed(() => props.maxFiles === 1);
510
491
  const resolvedHeading = computed(
511
492
  () => props.heading ?? (isSingle.value ? "Drop a file here to add to chat" : "Drop files here to add to chat")
@@ -561,7 +542,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
561
542
  rejected.push({
562
543
  file,
563
544
  reason: "too-large",
564
- message: `"${file.name}" — exceeds ${formatBytes(props.maxFileSizeBytes)} limit`
545
+ message: `"${file.name}" — exceeds ${formatFileSize(props.maxFileSizeBytes)} limit`
565
546
  });
566
547
  continue;
567
548
  }
@@ -618,10 +599,10 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
618
599
  }, [
619
600
  createElementVNode("div", _hoisted_2$6, [
620
601
  renderSlot(_ctx.$slots, "default", {}, () => [
621
- createVNode(_sfc_main$h, { class: "h-36 w-52" }),
602
+ createVNode(_sfc_main$i, { class: "h-36 w-52" }),
622
603
  createElementVNode("div", _hoisted_3$5, [
623
604
  createElementVNode("p", _hoisted_4$5, toDisplayString(resolvedHeading.value), 1),
624
- __props.hint ? (openBlock(), createElementBlock("p", _hoisted_5$4, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
605
+ __props.hint ? (openBlock(), createElementBlock("p", _hoisted_5$3, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
625
606
  ])
626
607
  ], true)
627
608
  ])
@@ -631,7 +612,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
631
612
  }),
632
613
  createVNode(Transition, { name: "ck-drop-overlay" }, {
633
614
  default: withCtx(() => [
634
- __props.showErrors && errors.value.length ? (openBlock(), createElementBlock("ul", _hoisted_6$3, [
615
+ __props.showErrors && errors.value.length ? (openBlock(), createElementBlock("ul", _hoisted_6$2, [
635
616
  (openBlock(true), createElementBlock(Fragment, null, renderList(errors.value, (msg, i) => {
636
617
  return openBlock(), createElementBlock("li", { key: i }, toDisplayString(msg), 1);
637
618
  }), 128))
@@ -643,9 +624,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
643
624
  };
644
625
  }
645
626
  });
646
- const CkDropZoneOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-ede88d0d"]]);
627
+ const CkDropZoneOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-54119668"]]);
647
628
  const _hoisted_1$7 = ["aria-label"];
648
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
629
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
649
630
  ...{
650
631
  name: "CkFeedbackButton"
651
632
  },
@@ -700,7 +681,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
700
681
  "delay-duration": 0
701
682
  }, {
702
683
  default: withCtx(() => [
703
- createVNode(unref(_sfc_main$j), mergeProps({ ariaLabel: thumbsUpLabel.value }, {
684
+ createVNode(unref(_sfc_main$k), mergeProps({ ariaLabel: thumbsUpLabel.value }, {
704
685
  "aria-pressed": isUpSelected.value,
705
686
  "aria-disabled": __props.locked || void 0,
706
687
  disabled: isUpDisabled.value,
@@ -730,7 +711,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
730
711
  "delay-duration": 0
731
712
  }, {
732
713
  default: withCtx(() => [
733
- createVNode(unref(_sfc_main$j), mergeProps({ ariaLabel: thumbsDownLabel.value }, {
714
+ createVNode(unref(_sfc_main$k), mergeProps({ ariaLabel: thumbsDownLabel.value }, {
734
715
  "aria-pressed": isDownSelected.value,
735
716
  "aria-disabled": __props.locked || void 0,
736
717
  disabled: isDownDisabled.value,
@@ -757,7 +738,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
757
738
  };
758
739
  }
759
740
  });
760
- const CkFeedbackButton = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-245705b8"]]);
741
+ const CkFeedbackButton = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-245705b8"]]);
761
742
  const defaultMarkdownClasses = {
762
743
  p: "my-1 leading-7",
763
744
  a: "underline underline-offset-4",
@@ -799,7 +780,7 @@ function domToVNode(node, slots, classes) {
799
780
  }
800
781
  return h(tag, attrs, children);
801
782
  }
802
- const _sfc_main$e = defineComponent({
783
+ const _sfc_main$f = defineComponent({
803
784
  name: "CkMarkdownRenderer",
804
785
  props: {
805
786
  content: { type: String, required: true },
@@ -839,7 +820,7 @@ const _hoisted_4$4 = {
839
820
  class: "self-end text-sm text-content-on-surface-muted tabular-nums",
840
821
  "aria-live": "polite"
841
822
  };
842
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
823
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
843
824
  ...{
844
825
  name: "CkFeedbackDialog"
845
826
  },
@@ -1000,7 +981,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1000
981
  _: 1
1001
982
  }),
1002
983
  createElementVNode("div", _hoisted_2$5, [
1003
- createVNode(unref(_sfc_main$e), { content: __props.responseText }, null, 8, ["content"])
984
+ createVNode(unref(_sfc_main$f), { content: __props.responseText }, null, 8, ["content"])
1004
985
  ])
1005
986
  ])) : createCommentVNode("", true),
1006
987
  createElementVNode("section", _hoisted_3$4, [
@@ -1066,8 +1047,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1066
1047
  };
1067
1048
  }
1068
1049
  });
1069
- const CkFeedbackDialog = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-12dfee8a"]]);
1070
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
1050
+ const CkFeedbackDialog = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-12dfee8a"]]);
1051
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1071
1052
  ...{
1072
1053
  name: "CkFileItemRow",
1073
1054
  inheritAttrs: false
@@ -1117,17 +1098,17 @@ const _hoisted_4$3 = {
1117
1098
  key: 3,
1118
1099
  class: "flex min-w-0 flex-1 flex-col items-start gap-0.5"
1119
1100
  };
1120
- const _hoisted_5$3 = {
1101
+ const _hoisted_5$2 = {
1121
1102
  key: 1,
1122
1103
  class: "label-12-medium w-full truncate text-content-on-status-error-inverse"
1123
1104
  };
1124
- const _hoisted_6$2 = {
1105
+ const _hoisted_6$1 = {
1125
1106
  key: 2,
1126
1107
  class: "label-12-medium w-full truncate text-content-on-surface-muted"
1127
1108
  };
1128
- const _hoisted_7$2 = ["aria-label"];
1109
+ const _hoisted_7$1 = ["aria-label"];
1129
1110
  const _hoisted_8$1 = ["onClick"];
1130
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
1111
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
1131
1112
  ...{
1132
1113
  name: "CkFileItemsList"
1133
1114
  },
@@ -1216,7 +1197,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
1216
1197
  class: "min-w-0 max-w-64 flex-1 basis-0",
1217
1198
  onClick: ($event) => handleRowClick(file, $event)
1218
1199
  }, [
1219
- createVNode(_sfc_main$c, {
1200
+ createVNode(_sfc_main$d, {
1220
1201
  file,
1221
1202
  size: __props.size,
1222
1203
  "is-removable": __props.isRemovable,
@@ -1266,7 +1247,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
1266
1247
  "model-value": aggregateProgress.value,
1267
1248
  class: "h-1 w-full",
1268
1249
  "aria-label": `${resolvedTriggerLabel.value} upload progress`
1269
- }, null, 8, ["model-value", "aria-label"])) : hasFailures.value ? (openBlock(), createElementBlock("span", _hoisted_5$3, toDisplayString(failedStatusLabel.value), 1)) : __props.triggerLabel ? (openBlock(), createElementBlock("span", _hoisted_6$2, toDisplayString(countStatusLabel.value), 1)) : createCommentVNode("", true)
1250
+ }, null, 8, ["model-value", "aria-label"])) : hasFailures.value ? (openBlock(), createElementBlock("span", _hoisted_5$2, toDisplayString(failedStatusLabel.value), 1)) : __props.triggerLabel ? (openBlock(), createElementBlock("span", _hoisted_6$1, toDisplayString(countStatusLabel.value), 1)) : createCommentVNode("", true)
1270
1251
  ])),
1271
1252
  createVNode(unref(UiIcon), {
1272
1253
  name: "chevron-down",
@@ -1295,7 +1276,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
1295
1276
  class: "min-w-0 max-w-64",
1296
1277
  onClick: ($event) => handleRowClick(file, $event)
1297
1278
  }, [
1298
- createVNode(_sfc_main$c, {
1279
+ createVNode(_sfc_main$d, {
1299
1280
  file,
1300
1281
  size: __props.size,
1301
1282
  "is-removable": __props.isRemovable,
@@ -1310,7 +1291,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
1310
1291
  }, 8, ["file", "size", "is-removable", "remove-label", "disabled", "onRemove"])
1311
1292
  ], 8, _hoisted_8$1);
1312
1293
  }), 128))
1313
- ], 8, _hoisted_7$2)
1294
+ ], 8, _hoisted_7$1)
1314
1295
  ]),
1315
1296
  _: 3
1316
1297
  }, 8, ["class"])
@@ -1328,22 +1309,22 @@ const _hoisted_4$2 = {
1328
1309
  key: 0,
1329
1310
  class: "mt-0.5 flex min-w-0 items-center gap-1 label-12-medium text-content-on-surface-muted"
1330
1311
  };
1331
- const _hoisted_5$2 = {
1312
+ const _hoisted_5$1 = {
1332
1313
  key: 0,
1333
1314
  class: "truncate"
1334
1315
  };
1335
- const _hoisted_6$1 = {
1316
+ const _hoisted_6 = {
1336
1317
  key: 1,
1337
1318
  "aria-hidden": "true"
1338
1319
  };
1339
- const _hoisted_7$1 = {
1320
+ const _hoisted_7 = {
1340
1321
  key: 2,
1341
1322
  class: "truncate"
1342
1323
  };
1343
1324
  const _hoisted_8 = ["aria-label"];
1344
1325
  const _hoisted_9 = ["aria-label"];
1345
1326
  const _hoisted_10 = ["aria-label"];
1346
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
1327
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
1347
1328
  ...{
1348
1329
  name: "CkHistoryItem",
1349
1330
  inheritAttrs: false
@@ -1476,9 +1457,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1476
1457
  createElementVNode("div", _hoisted_3$2, toDisplayString(props.title), 1),
1477
1458
  props.metaStart || props.metaEnd || _ctx.$slots.meta ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
1478
1459
  renderSlot(_ctx.$slots, "meta", {}, () => [
1479
- props.metaStart ? (openBlock(), createElementBlock("span", _hoisted_5$2, toDisplayString(props.metaStart), 1)) : createCommentVNode("", true),
1480
- props.metaStart && props.metaEnd ? (openBlock(), createElementBlock("span", _hoisted_6$1, "|")) : createCommentVNode("", true),
1481
- props.metaEnd ? (openBlock(), createElementBlock("span", _hoisted_7$1, toDisplayString(props.metaEnd), 1)) : createCommentVNode("", true)
1460
+ props.metaStart ? (openBlock(), createElementBlock("span", _hoisted_5$1, toDisplayString(props.metaStart), 1)) : createCommentVNode("", true),
1461
+ props.metaStart && props.metaEnd ? (openBlock(), createElementBlock("span", _hoisted_6, "|")) : createCommentVNode("", true),
1462
+ props.metaEnd ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(props.metaEnd), 1)) : createCommentVNode("", true)
1482
1463
  ])
1483
1464
  ])) : createCommentVNode("", true)
1484
1465
  ])
@@ -1584,7 +1565,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1584
1565
  }
1585
1566
  });
1586
1567
  const baseClass = "flex w-full min-w-0 flex-col p-2";
1587
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1568
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1588
1569
  ...{
1589
1570
  name: "CkHistoryWrapper",
1590
1571
  inheritAttrs: false
@@ -1618,8 +1599,8 @@ const _hoisted_1$3 = ["disabled", "aria-expanded", "aria-label"];
1618
1599
  const _hoisted_2$2 = { class: "max-w-[10rem] truncate" };
1619
1600
  const _hoisted_3$1 = ["aria-label"];
1620
1601
  const _hoisted_4$1 = ["aria-selected", "onClick"];
1621
- const _hoisted_5$1 = { class: "min-w-0 flex-1 truncate" };
1622
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1602
+ const _hoisted_5 = { class: "min-w-0 flex-1 truncate" };
1603
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
1623
1604
  ...{ name: "CkModelSelector" },
1624
1605
  __name: "CkModelSelector",
1625
1606
  props: {
@@ -1705,7 +1686,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1705
1686
  class: "relative flex w-full items-center gap-2 rounded-sm py-2 pr-8 pl-3 text-left body-14-regular text-content-on-surface-primary outline-none hover:bg-background-surface-muted-subtle focus-visible:ring-2 focus-visible:ring-ring",
1706
1687
  onClick: ($event) => select(model.id)
1707
1688
  }, [
1708
- createElementVNode("span", _hoisted_5$1, toDisplayString(model.label), 1),
1689
+ createElementVNode("span", _hoisted_5, toDisplayString(model.label), 1),
1709
1690
  model.id === __props.selectedModelId ? (openBlock(), createBlock(unref(UiIcon), {
1710
1691
  key: 0,
1711
1692
  name: "check",
@@ -1726,9 +1707,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1726
1707
  };
1727
1708
  }
1728
1709
  });
1729
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1730
- ...{ name: "CkPromptActionButton" },
1731
- __name: "CkPromptActionButton",
1710
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1711
+ ...{ name: "CkPromptSendButton" },
1712
+ __name: "CkPromptSendButton",
1732
1713
  props: {
1733
1714
  ariaLabel: {},
1734
1715
  disabled: { type: Boolean, default: false },
@@ -1742,7 +1723,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1742
1723
  type: __props.type,
1743
1724
  disabled: __props.disabled,
1744
1725
  loading: __props.loading,
1745
- class: "!bg-brand-bg-brand hover:!bg-brand-bg-brand-hover !text-brand-content-default !rounded-md"
1726
+ class: "!rounded-full"
1746
1727
  }), {
1747
1728
  default: withCtx(() => [
1748
1729
  renderSlot(_ctx.$slots, "default")
@@ -1752,6 +1733,36 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1752
1733
  };
1753
1734
  }
1754
1735
  });
1736
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1737
+ ...{ name: "CkPromptMenuButton" },
1738
+ __name: "CkPromptMenuButton",
1739
+ props: {
1740
+ ariaLabel: {},
1741
+ disabled: { type: Boolean, default: false },
1742
+ type: { default: "button" }
1743
+ },
1744
+ setup(__props) {
1745
+ return (_ctx, _cache) => {
1746
+ return openBlock(), createBlock(unref(UiButton), mergeProps({ ariaLabel: __props.ariaLabel }, {
1747
+ variant: "ghost",
1748
+ size: "icon",
1749
+ type: __props.type,
1750
+ disabled: __props.disabled,
1751
+ class: "!rounded-full"
1752
+ }), {
1753
+ default: withCtx(() => [
1754
+ renderSlot(_ctx.$slots, "default", {}, () => [
1755
+ createVNode(unref(UiIcon), {
1756
+ name: "plus",
1757
+ size: 20
1758
+ })
1759
+ ])
1760
+ ]),
1761
+ _: 3
1762
+ }, 16, ["type", "disabled"]);
1763
+ };
1764
+ }
1765
+ });
1755
1766
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1756
1767
  ...{ name: "CkPromptStopButton" },
1757
1768
  __name: "CkPromptStopButton",
@@ -1764,9 +1775,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1764
1775
  const props = __props;
1765
1776
  return (_ctx, _cache) => {
1766
1777
  return openBlock(), createBlock(unref(UiButton), mergeProps({ ariaLabel: __props.ariaLabel }, {
1767
- size: "icon-sm",
1778
+ variant: "secondary",
1779
+ size: "icon",
1768
1780
  disabled: props.disabled,
1769
- class: "!bg-brand-bg-brand hover:!bg-brand-bg-brand-hover !text-brand-content-default !rounded-md",
1781
+ class: "!rounded-full",
1770
1782
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
1771
1783
  }), {
1772
1784
  default: withCtx(() => [
@@ -1778,12 +1790,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1778
1790
  }
1779
1791
  });
1780
1792
  const _hoisted_1$2 = { class: "flex flex-col gap-2" };
1781
- const _hoisted_2$1 = ["for"];
1782
- const _hoisted_3 = ["id", "value", "placeholder", "disabled"];
1783
- const _hoisted_4 = { class: "flex items-center justify-between" };
1784
- const _hoisted_5 = { key: 0 };
1785
- const _hoisted_6 = { key: 1 };
1786
- const _hoisted_7 = { class: "ml-auto" };
1793
+ const _hoisted_2$1 = {
1794
+ key: 0,
1795
+ style: { "grid-area": "top" }
1796
+ };
1797
+ const _hoisted_3 = ["for"];
1798
+ const _hoisted_4 = ["id", "value", "placeholder", "disabled"];
1799
+ const LINE_HEIGHT = 24;
1800
+ const MAX_LINES = 6;
1787
1801
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1788
1802
  ...{ name: "CkPromptInput" },
1789
1803
  __name: "CkPromptInput",
@@ -1791,27 +1805,51 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1791
1805
  modelValue: { default: "" },
1792
1806
  placeholder: { default: void 0 },
1793
1807
  disabled: { type: Boolean, default: false },
1794
- maxHeight: { default: 200 },
1795
1808
  ariaLabel: { default: void 0 }
1796
1809
  },
1797
1810
  emits: ["update:modelValue", "submit"],
1798
1811
  setup(__props, { expose: __expose, emit: __emit }) {
1812
+ const MAX_HEIGHT = LINE_HEIGHT * MAX_LINES;
1799
1813
  const props = __props;
1800
1814
  const emit = __emit;
1801
1815
  const textareaId = useId();
1802
1816
  const textareaRef = useTemplateRef("textareaRef");
1817
+ const slots = useSlots();
1818
+ const isMultiLine = ref(false);
1803
1819
  const isEmpty = computed(() => props.modelValue.trim() === "");
1804
1820
  const isSubmitDisabled = computed(() => props.disabled || isEmpty.value);
1821
+ const hasToolbarTop = ref(typeof slots["toolbar-top"] === "function");
1822
+ function syncSlotState() {
1823
+ const next = typeof slots["toolbar-top"] === "function";
1824
+ if (next !== hasToolbarTop.value) hasToolbarTop.value = next;
1825
+ }
1826
+ onMounted(syncSlotState);
1827
+ onUpdated(syncSlotState);
1828
+ const hasMultipleRows = computed(
1829
+ () => isMultiLine.value || hasToolbarTop.value
1830
+ );
1831
+ const gridAreas = computed(() => {
1832
+ const top = hasToolbarTop.value ? '"top top top" ' : "";
1833
+ return isMultiLine.value ? `${top}"input input input" "left . right"` : `${top}"left input right"`;
1834
+ });
1805
1835
  function adjustHeight() {
1806
1836
  const el = textareaRef.value;
1807
1837
  if (!el) return;
1838
+ if (props.modelValue === "") {
1839
+ isMultiLine.value = false;
1840
+ el.style.height = "";
1841
+ return;
1842
+ }
1808
1843
  el.style.height = "auto";
1809
- el.style.height = `${Math.min(el.scrollHeight, props.maxHeight)}px`;
1844
+ const measured = el.scrollHeight;
1845
+ el.style.height = `${Math.min(measured, MAX_HEIGHT)}px`;
1846
+ const hasExplicitNewline = props.modelValue.includes("\n");
1847
+ if (!isMultiLine.value && (hasExplicitNewline || measured >= LINE_HEIGHT * 2)) {
1848
+ isMultiLine.value = true;
1849
+ }
1810
1850
  }
1811
1851
  function onInput(event) {
1812
- const value = event.target.value;
1813
- emit("update:modelValue", value);
1814
- adjustHeight();
1852
+ emit("update:modelValue", event.target.value);
1815
1853
  }
1816
1854
  function submit() {
1817
1855
  if (isSubmitDisabled.value) return;
@@ -1830,52 +1868,70 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1830
1868
  }
1831
1869
  watch(
1832
1870
  () => props.modelValue,
1833
- () => {
1834
- nextTick(adjustHeight);
1835
- }
1871
+ () => nextTick(adjustHeight)
1836
1872
  );
1873
+ onMounted(adjustHeight);
1837
1874
  __expose({ focus, submit });
1838
1875
  return (_ctx, _cache) => {
1839
1876
  return openBlock(), createElementBlock("div", _hoisted_1$2, [
1840
1877
  createElementVNode("form", {
1841
- class: "border-core-border-default bg-core-bg-primary [&:has(textarea:focus)]:ring-core-border-focus flex flex-col gap-3 rounded-xl border px-4 pt-3 pb-3 shadow-sm [&:has(textarea:focus)]:ring-2",
1878
+ class: normalizeClass([
1879
+ "ck-prompt-form border-border-surface-default bg-background-input-strong [&:has(textarea:focus)]:border-border-surface-focus-ring [&:has(textarea:focus)]:ring-border-surface-focus-ring/40 min-h-17 grid items-center gap-x-0 gap-y-5 border p-4 transition-[border-radius] duration-250 ease-[cubic-bezier(0.22,1,0.36,1)] [&:has(textarea:focus)]:ring-2",
1880
+ hasMultipleRows.value ? "rounded-2xl" : "rounded-3xl"
1881
+ ]),
1882
+ style: normalizeStyle({
1883
+ gridTemplateColumns: "auto 1fr auto",
1884
+ gridTemplateAreas: gridAreas.value
1885
+ }),
1842
1886
  onSubmit: withModifiers(submit, ["prevent"])
1843
1887
  }, [
1888
+ hasToolbarTop.value ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
1889
+ renderSlot(_ctx.$slots, "toolbar-top", {}, void 0, true)
1890
+ ])) : createCommentVNode("", true),
1844
1891
  __props.ariaLabel ? (openBlock(), createElementBlock("label", {
1845
- key: 0,
1892
+ key: 1,
1846
1893
  for: unref(textareaId),
1847
1894
  class: "sr-only"
1848
- }, toDisplayString(__props.ariaLabel), 9, _hoisted_2$1)) : createCommentVNode("", true),
1895
+ }, toDisplayString(__props.ariaLabel), 9, _hoisted_3)) : createCommentVNode("", true),
1896
+ createElementVNode("div", {
1897
+ class: normalizeClass([!isMultiLine.value && "pr-2"]),
1898
+ style: { "grid-area": "left" }
1899
+ }, [
1900
+ renderSlot(_ctx.$slots, "toolbar-left", {}, void 0, true)
1901
+ ], 2),
1849
1902
  createElementVNode("textarea", {
1850
1903
  id: unref(textareaId),
1851
1904
  ref_key: "textareaRef",
1852
1905
  ref: textareaRef,
1853
- rows: "2",
1906
+ rows: "1",
1854
1907
  value: __props.modelValue,
1855
1908
  placeholder: __props.placeholder,
1856
1909
  disabled: __props.disabled,
1857
- class: "text-core-content-primary placeholder-core-content-placeholder min-h-10 w-full resize-none bg-transparent text-sm leading-5 focus:outline-none",
1910
+ style: { "grid-area": "input" },
1911
+ class: normalizeClass([
1912
+ "ck-prompt-textarea text-content-on-surface-primary placeholder-content-on-surface-muted w-full min-w-0 resize-none overflow-y-auto bg-transparent py-0 font-sans text-base font-normal leading-6 max-h-36 focus:outline-none disabled:cursor-not-allowed disabled:opacity-60",
1913
+ isMultiLine.value ? "pl-3 pr-3" : "px-0"
1914
+ ]),
1858
1915
  onInput,
1859
1916
  onKeydown
1860
- }, null, 40, _hoisted_3),
1861
- createElementVNode("div", _hoisted_4, [
1862
- _ctx.$slots["toolbar-left"] ? (openBlock(), createElementBlock("div", _hoisted_5, [
1863
- renderSlot(_ctx.$slots, "toolbar-left")
1864
- ])) : (openBlock(), createElementBlock("div", _hoisted_6)),
1865
- createElementVNode("div", _hoisted_7, [
1866
- renderSlot(_ctx.$slots, "toolbar-right", {
1867
- submit,
1868
- disabled: isSubmitDisabled.value,
1869
- isEmpty: isEmpty.value
1870
- })
1871
- ])
1872
- ])
1873
- ], 32),
1874
- renderSlot(_ctx.$slots, "footer")
1917
+ }, null, 42, _hoisted_4),
1918
+ createElementVNode("div", {
1919
+ class: normalizeClass([!isMultiLine.value && "pl-4"]),
1920
+ style: { "grid-area": "right" }
1921
+ }, [
1922
+ renderSlot(_ctx.$slots, "toolbar-right", {
1923
+ submit,
1924
+ disabled: isSubmitDisabled.value,
1925
+ isEmpty: isEmpty.value
1926
+ }, void 0, true)
1927
+ ], 2)
1928
+ ], 38),
1929
+ renderSlot(_ctx.$slots, "footer", {}, void 0, true)
1875
1930
  ]);
1876
1931
  };
1877
1932
  }
1878
1933
  });
1934
+ const CkPromptInput = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-92b05731"]]);
1879
1935
  const _hoisted_1$1 = {
1880
1936
  key: 0,
1881
1937
  class: "text-core-content-tertiary text-center text-xs leading-3.5"
@@ -1990,7 +2046,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1990
2046
  return message.content.filter((c) => c.type === "text").map((c) => c.text).join("");
1991
2047
  }
1992
2048
  return (_ctx, _cache) => {
1993
- return openBlock(), createBlock(_sfc_main$k, { messages: __props.messages }, {
2049
+ return openBlock(), createBlock(_sfc_main$l, { messages: __props.messages }, {
1994
2050
  "user-message": withCtx(({ message }) => [
1995
2051
  createElementVNode("div", {
1996
2052
  class: normalizeClass({ "ml-8": hasIcon.value })
@@ -2009,7 +2065,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2009
2065
  ]),
2010
2066
  "agent-message": withCtx(({ message }) => [
2011
2067
  renderSlot(_ctx.$slots, "agent-message", { message }, () => [
2012
- createVNode(_sfc_main$l, null, createSlots({
2068
+ createVNode(_sfc_main$m, null, createSlots({
2013
2069
  footer: withCtx(() => [
2014
2070
  renderSlot(_ctx.$slots, "agent-message-footer", { message }, () => [
2015
2071
  getMessageText(message) && !isLoading(message) ? (openBlock(), createBlock(CkCopyMessageActionButton, {
@@ -2022,7 +2078,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2022
2078
  ]),
2023
2079
  default: withCtx(() => [
2024
2080
  renderSlot(_ctx.$slots, "agent-message-content", { message }, () => [
2025
- createVNode(_sfc_main$e, {
2081
+ createVNode(_sfc_main$f, {
2026
2082
  content: getMessageText(message),
2027
2083
  classes: __props.agentMarkdownClasses
2028
2084
  }, createSlots({ _: 2 }, [
@@ -2148,7 +2204,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2148
2204
  }
2149
2205
  return (_ctx, _cache) => {
2150
2206
  return openBlock(), createElementBlock("div", null, [
2151
- createVNode(_sfc_main$9, {
2207
+ createVNode(_sfc_main$a, {
2152
2208
  class: normalizeClass(isExpanded.value && props.maxHeight ? "overflow-y-auto" : void 0),
2153
2209
  style: normalizeStyle(
2154
2210
  isExpanded.value && props.maxHeight ? { maxHeight: props.maxHeight } : void 0
@@ -2167,7 +2223,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2167
2223
  edit: () => emit("edit", conversation),
2168
2224
  delete: () => emit("delete", conversation)
2169
2225
  }, () => [
2170
- createVNode(_sfc_main$a, {
2226
+ createVNode(_sfc_main$b, {
2171
2227
  as: "a",
2172
2228
  href: hrefFor(conversation),
2173
2229
  "is-active": conversation.id === props.activeId,
@@ -2241,7 +2297,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2241
2297
  placeholder: { default: "Ask me anything" },
2242
2298
  disabled: { type: Boolean, default: false },
2243
2299
  loading: { type: Boolean, default: false },
2244
- maxHeight: { default: 200 },
2245
2300
  ariaLabel: { default: "Chat message input" },
2246
2301
  stopAriaLabel: { default: "Stop generating" },
2247
2302
  disclaimer: { default: void 0 }
@@ -2269,13 +2324,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2269
2324
  }
2270
2325
  __expose({ focus, submit });
2271
2326
  return (_ctx, _cache) => {
2272
- return openBlock(), createBlock(_sfc_main$5, {
2327
+ return openBlock(), createBlock(CkPromptInput, {
2273
2328
  ref_key: "promptInputRef",
2274
2329
  ref: promptInputRef,
2275
2330
  "model-value": __props.modelValue,
2276
2331
  placeholder: __props.placeholder,
2277
2332
  disabled: isDisabled.value,
2278
- "max-height": __props.maxHeight,
2279
2333
  "aria-label": __props.ariaLabel,
2280
2334
  "onUpdate:modelValue": onUpdateModelValue,
2281
2335
  onSubmit
@@ -2290,17 +2344,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2290
2344
  }, {
2291
2345
  default: withCtx(() => [
2292
2346
  renderSlot(_ctx.$slots, "stop-icon", {}, () => [
2293
- createVNode(_sfc_main$m)
2347
+ createVNode(_sfc_main$n)
2294
2348
  ])
2295
2349
  ]),
2296
2350
  _: 3
2297
- }, 8, ["aria-label", "disabled"])) : (openBlock(), createBlock(_sfc_main$7, mergeProps({ key: 1 }, { ariaLabel: "Send message" }, {
2351
+ }, 8, ["aria-label", "disabled"])) : (openBlock(), createBlock(_sfc_main$8, mergeProps({ key: 1 }, { ariaLabel: "Send message" }, {
2298
2352
  type: "submit",
2299
2353
  disabled: scope.disabled
2300
2354
  }), {
2301
2355
  default: withCtx(() => [
2302
2356
  renderSlot(_ctx.$slots, "send-icon", {}, () => [
2303
- createVNode(_sfc_main$n)
2357
+ createVNode(_sfc_main$o)
2304
2358
  ])
2305
2359
  ]),
2306
2360
  _: 3
@@ -2317,39 +2371,47 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2317
2371
  ]),
2318
2372
  _: 2
2319
2373
  }, [
2374
+ _ctx.$slots["toolbar-top"] ? {
2375
+ name: "toolbar-top",
2376
+ fn: withCtx(() => [
2377
+ renderSlot(_ctx.$slots, "toolbar-top")
2378
+ ]),
2379
+ key: "0"
2380
+ } : void 0,
2320
2381
  _ctx.$slots["toolbar-left"] ? {
2321
2382
  name: "toolbar-left",
2322
2383
  fn: withCtx(() => [
2323
2384
  renderSlot(_ctx.$slots, "toolbar-left")
2324
2385
  ]),
2325
- key: "0"
2386
+ key: "1"
2326
2387
  } : void 0
2327
- ]), 1032, ["model-value", "placeholder", "disabled", "max-height", "aria-label"]);
2388
+ ]), 1032, ["model-value", "placeholder", "disabled", "aria-label"]);
2328
2389
  };
2329
2390
  }
2330
2391
  });
2331
2392
  export {
2332
2393
  CkCopyMessageActionButton as C,
2333
- _sfc_main$l as _,
2394
+ _sfc_main$m as _,
2334
2395
  _sfc_main$2 as a,
2335
- _sfc_main$k as b,
2396
+ _sfc_main$l as b,
2336
2397
  CkDropZoneOverlay as c,
2337
2398
  CkFeedbackButton as d,
2338
2399
  CkFeedbackDialog as e,
2339
- _sfc_main$b as f,
2400
+ _sfc_main$c as f,
2340
2401
  _sfc_main$1 as g,
2341
- _sfc_main$a as h,
2342
- _sfc_main$9 as i,
2402
+ _sfc_main$b as h,
2403
+ _sfc_main$a as i,
2343
2404
  _sfc_main as j,
2344
- _sfc_main$e as k,
2345
- _sfc_main$j as l,
2346
- _sfc_main$8 as m,
2347
- _sfc_main$7 as n,
2348
- _sfc_main$5 as o,
2349
- _sfc_main$4 as p,
2350
- _sfc_main$6 as q,
2351
- _sfc_main$n as r,
2352
- _sfc_main$m as s,
2353
- CkUserMessage as t,
2354
- formatRelativeTime as u
2405
+ _sfc_main$f as k,
2406
+ _sfc_main$k as l,
2407
+ _sfc_main$9 as m,
2408
+ CkPromptInput as n,
2409
+ _sfc_main$4 as o,
2410
+ _sfc_main$7 as p,
2411
+ _sfc_main$8 as q,
2412
+ _sfc_main$6 as r,
2413
+ _sfc_main$o as s,
2414
+ _sfc_main$n as t,
2415
+ CkUserMessage as u,
2416
+ formatRelativeTime as v
2355
2417
  };