@aleph-alpha/chat-kit 6.6.0 → 6.7.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 (65) hide show
  1. package/dist/{CkHistory.vue_vue_type_script_setup_true_lang-BnUMeeto.js → CkHistory.vue_vue_type_script_setup_true_lang-DF5yUf7K.js} +605 -145
  2. package/dist/chat-kit.css +1 -1
  3. package/dist/components/base/CkCodeEditor/CkCodeEditor.vue.d.ts +4 -4
  4. package/dist/components/base/CkMilkdownEditor/CkMilkdownEditor.vue.d.ts +1 -1
  5. package/dist/components/base/CkToolApproval/ApprovalCard.vue.d.ts +21 -0
  6. package/dist/components/base/CkToolApproval/ApprovalCard.vue.d.ts.map +1 -0
  7. package/dist/components/base/CkToolApproval/ArgumentsJson.vue.d.ts +10 -0
  8. package/dist/components/base/CkToolApproval/ArgumentsJson.vue.d.ts.map +1 -0
  9. package/dist/components/base/CkToolApproval/BodyBoundary.vue.d.ts +15 -0
  10. package/dist/components/base/CkToolApproval/BodyBoundary.vue.d.ts.map +1 -0
  11. package/dist/components/base/CkToolApproval/CardHeading.vue.d.ts +22 -0
  12. package/dist/components/base/CkToolApproval/CardHeading.vue.d.ts.map +1 -0
  13. package/dist/components/base/CkToolApproval/CkToolApproval.stories.d.ts +80 -0
  14. package/dist/components/base/CkToolApproval/CkToolApproval.stories.d.ts.map +1 -0
  15. package/dist/components/base/CkToolApproval/CkToolApproval.vue.d.ts +18 -0
  16. package/dist/components/base/CkToolApproval/CkToolApproval.vue.d.ts.map +1 -0
  17. package/dist/components/base/CkToolApproval/ResultRow.vue.d.ts +20 -0
  18. package/dist/components/base/CkToolApproval/ResultRow.vue.d.ts.map +1 -0
  19. package/dist/components/base/CkToolApproval/badge.d.ts +3 -0
  20. package/dist/components/base/CkToolApproval/badge.d.ts.map +1 -0
  21. package/dist/components/base/CkToolApproval/index.d.ts +3 -0
  22. package/dist/components/base/CkToolApproval/index.d.ts.map +1 -0
  23. package/dist/components/base/CkToolApproval/outcomes.d.ts +28 -0
  24. package/dist/components/base/CkToolApproval/outcomes.d.ts.map +1 -0
  25. package/dist/components/base/CkToolApproval/serializeArguments.d.ts +13 -0
  26. package/dist/components/base/CkToolApproval/serializeArguments.d.ts.map +1 -0
  27. package/dist/components/base/CkToolApproval/toolTitle.d.ts +7 -0
  28. package/dist/components/base/CkToolApproval/toolTitle.d.ts.map +1 -0
  29. package/dist/components/base/CkToolApproval/types.d.ts +102 -0
  30. package/dist/components/base/CkToolApproval/types.d.ts.map +1 -0
  31. package/dist/components/base/index.d.ts +2 -0
  32. package/dist/components/base/index.d.ts.map +1 -1
  33. package/dist/components/index.d.ts +2 -2
  34. package/dist/components/index.d.ts.map +1 -1
  35. package/dist/components/index.js +4 -3
  36. package/dist/{createCrepeEditor-BGSlwmKn.js → createCrepeEditor-DSfByw4o.js} +1 -1
  37. package/dist/handlers/index.js +1 -1
  38. package/dist/handlers/useChatKitLabels.d.ts +39 -0
  39. package/dist/handlers/useChatKitLabels.d.ts.map +1 -1
  40. package/dist/index.d.ts +2 -2
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +6 -5
  43. package/dist/{useChatKitLabels-DxW0N5U-.js → useChatKitLabels-ky3JI9gf.js} +13 -0
  44. package/package.json +2 -2
  45. package/src/components/base/CkToolApproval/ApprovalCard.vue +30 -0
  46. package/src/components/base/CkToolApproval/ArgumentsJson.vue +48 -0
  47. package/src/components/base/CkToolApproval/BodyBoundary.vue +26 -0
  48. package/src/components/base/CkToolApproval/CardHeading.vue +47 -0
  49. package/src/components/base/CkToolApproval/CkToolApproval.spec.ts +680 -0
  50. package/src/components/base/CkToolApproval/CkToolApproval.stories.ts +661 -0
  51. package/src/components/base/CkToolApproval/CkToolApproval.vue +240 -0
  52. package/src/components/base/CkToolApproval/ResultRow.vue +52 -0
  53. package/src/components/base/CkToolApproval/badge.ts +2 -0
  54. package/src/components/base/CkToolApproval/exports.spec.ts +22 -0
  55. package/src/components/base/CkToolApproval/index.ts +2 -0
  56. package/src/components/base/CkToolApproval/outcomes.ts +95 -0
  57. package/src/components/base/CkToolApproval/serializeArguments.ts +18 -0
  58. package/src/components/base/CkToolApproval/toolTitle.spec.ts +23 -0
  59. package/src/components/base/CkToolApproval/toolTitle.ts +19 -0
  60. package/src/components/base/CkToolApproval/types.ts +118 -0
  61. package/src/components/base/index.ts +11 -0
  62. package/src/components/index.ts +9 -0
  63. package/src/handlers/useChatKitLabels.ts +39 -0
  64. package/src/index.ts +9 -0
  65. package/src/test-empty.css +1 -0
@@ -1,6 +1,6 @@
1
- import { defineComponent, openBlock, createBlock, unref, createElementBlock, createElementVNode, normalizeClass, renderSlot, createCommentVNode, mergeProps, withCtx, ref, watch, onScopeDispose, computed, useTemplateRef, createVNode, toDisplayString, resolveDynamicComponent, onBeforeUnmount, useSlots, onMounted, nextTick, onUnmounted, Fragment, renderList, normalizeStyle, Transition, createStaticVNode, Teleport, withModifiers, toValue, h, toRefs, useId, createTextVNode, useAttrs, onUpdated, createSlots, normalizeProps, guardReactiveProps, Comment, Text } from "vue";
2
- import { UiIcon, UiButton, UiFileType, UiTooltip, UiPopover, UiPopoverTrigger, UiPopoverContent, formatFileSize, UiDialog, UiDialogContent, UiDialogDescription, UiFieldLabel, UiToggleGroup, UiToggleGroupItem, UiField, UiTextarea, UiFileItem, UiProgress, Primitive, UiFloatActions, UiFloatActionItems, UiFadeMask, UiCodeBlock, UiAvatar, UiAvatarImage, UiSpinner, UiAvatarFallback, UiSidebarPopoverMenu, UiSidebarPopoverMenuItem } from "@aleph-alpha/ui-library";
3
- import { u as useChatKitLabels, d as defaultChatKitLabels, r as remarkCitations, b as useMarkdownParser } from "./useChatKitLabels-DxW0N5U-.js";
1
+ import { defineComponent, openBlock, createBlock, unref, createElementBlock, createElementVNode, normalizeClass, renderSlot, createCommentVNode, mergeProps, withCtx, ref, watch, onScopeDispose, computed, useTemplateRef, createVNode, toDisplayString, resolveDynamicComponent, onBeforeUnmount, useSlots, onMounted, nextTick, onUnmounted, Fragment, renderList, normalizeStyle, Transition, createStaticVNode, Teleport, withModifiers, toValue, h, toRefs, useId, createTextVNode, useAttrs, onUpdated, onErrorCaptured, toRaw, createSlots, normalizeProps, guardReactiveProps, Comment, Text } from "vue";
2
+ import { UiIcon, UiButton, UiFileType, UiTooltip, UiPopover, UiPopoverTrigger, UiPopoverContent, formatFileSize, UiDialog, UiDialogContent, UiDialogDescription, UiFieldLabel, UiToggleGroup, UiToggleGroupItem, UiField, UiTextarea, UiFileItem, UiProgress, Primitive, UiCodeBlock, UiBadge, UiSeparator, UiFloatActions, UiFloatActionItems, UiFadeMask, UiAvatar, UiAvatarImage, UiSpinner, UiAvatarFallback, UiSidebarPopoverMenu, UiSidebarPopoverMenuItem } from "@aleph-alpha/ui-library";
3
+ import { u as useChatKitLabels, d as defaultChatKitLabels, r as remarkCitations, b as useMarkdownParser } from "./useChatKitLabels-ky3JI9gf.js";
4
4
  import { f as findAndReplace } from "./index-CfVHzirA.js";
5
5
  const MINUTE = 60;
6
6
  const HOUR = 60 * MINUTE;
@@ -37,7 +37,7 @@ function formatRelativeTime(unixSeconds, nowSeconds = Math.floor(Date.now() / 1e
37
37
  const years = Math.floor(delta / YEAR);
38
38
  return years === 1 ? "1 year ago" : `${years} years ago`;
39
39
  }
40
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
40
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
41
41
  ...{ name: "CkSendIcon" },
42
42
  __name: "CkSendIcon",
43
43
  setup(__props) {
@@ -46,19 +46,19 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
46
46
  };
47
47
  }
48
48
  });
49
- const _hoisted_1$i = {
49
+ const _hoisted_1$n = {
50
50
  xmlns: "http://www.w3.org/2000/svg",
51
51
  width: "16",
52
52
  height: "16",
53
53
  viewBox: "0 0 16 16",
54
54
  fill: "none"
55
55
  };
56
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
56
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
57
57
  ...{ name: "CkStopIcon" },
58
58
  __name: "CkStopIcon",
59
59
  setup(__props) {
60
60
  return (_ctx, _cache) => {
61
- return openBlock(), createElementBlock("svg", _hoisted_1$i, [..._cache[0] || (_cache[0] = [
61
+ return openBlock(), createElementBlock("svg", _hoisted_1$n, [..._cache[0] || (_cache[0] = [
62
62
  createElementVNode("path", {
63
63
  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",
64
64
  fill: "currentColor"
@@ -67,17 +67,17 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
67
67
  };
68
68
  }
69
69
  });
70
- const _hoisted_1$h = {
70
+ const _hoisted_1$m = {
71
71
  key: 0,
72
72
  "data-testid": "ck-agent-message-header",
73
73
  class: "w-full min-w-0"
74
74
  };
75
- const _hoisted_2$b = { class: "text-content-on-surface-primary min-w-0 text-base leading-7" };
76
- const _hoisted_3$a = {
75
+ const _hoisted_2$f = { class: "text-content-on-surface-primary min-w-0 text-base leading-7" };
76
+ const _hoisted_3$c = {
77
77
  key: 1,
78
78
  class: "flex items-center gap-4"
79
79
  };
80
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
80
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
81
81
  ...{ name: "CkAgentMessage" },
82
82
  __name: "CkAgentMessage",
83
83
  props: {
@@ -91,31 +91,31 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
91
91
  __props.bottomSeparator && "border-border-surface-default border-b"
92
92
  ])
93
93
  }, [
94
- _ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
94
+ _ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
95
95
  renderSlot(_ctx.$slots, "header")
96
96
  ])) : createCommentVNode("", true),
97
- createElementVNode("div", _hoisted_2$b, [
97
+ createElementVNode("div", _hoisted_2$f, [
98
98
  renderSlot(_ctx.$slots, "default")
99
99
  ]),
100
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_3$a, [
100
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_3$c, [
101
101
  renderSlot(_ctx.$slots, "footer")
102
102
  ])) : createCommentVNode("", true)
103
103
  ], 2);
104
104
  };
105
105
  }
106
106
  });
107
- const _hoisted_1$g = {
107
+ const _hoisted_1$l = {
108
108
  key: 0,
109
109
  "data-testid": "ck-agent-message-header-icon",
110
110
  class: "flex flex-shrink-0 items-center justify-center"
111
111
  };
112
- const _hoisted_2$a = { class: "body-14-regular text-content-on-surface-muted line-clamp-2 min-w-0 flex-1 md:line-clamp-1" };
113
- const _hoisted_3$9 = {
112
+ const _hoisted_2$e = { class: "body-14-regular text-content-on-surface-muted line-clamp-2 min-w-0 flex-1 md:line-clamp-1" };
113
+ const _hoisted_3$b = {
114
114
  key: 1,
115
115
  "data-testid": "ck-agent-message-header-activity",
116
116
  class: "flex flex-shrink-0 items-center"
117
117
  };
118
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
118
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
119
119
  ...{ name: "CkAgentMessageHeader" },
120
120
  __name: "CkAgentMessageHeader",
121
121
  setup(__props) {
@@ -127,20 +127,20 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
127
127
  _ctx.$slots.activity && "border-border-surface-default border-b py-4"
128
128
  ])
129
129
  }, [
130
- _ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_1$g, [
130
+ _ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_1$l, [
131
131
  renderSlot(_ctx.$slots, "icon")
132
132
  ])) : createCommentVNode("", true),
133
- createElementVNode("span", _hoisted_2$a, [
133
+ createElementVNode("span", _hoisted_2$e, [
134
134
  renderSlot(_ctx.$slots, "default")
135
135
  ]),
136
- _ctx.$slots.activity ? (openBlock(), createElementBlock("div", _hoisted_3$9, [
136
+ _ctx.$slots.activity ? (openBlock(), createElementBlock("div", _hoisted_3$b, [
137
137
  renderSlot(_ctx.$slots, "activity")
138
138
  ])) : createCommentVNode("", true)
139
139
  ], 2);
140
140
  };
141
141
  }
142
142
  });
143
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
143
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
144
144
  ...{
145
145
  name: "CkHeaderActivityButton"
146
146
  },
@@ -220,9 +220,9 @@ function useIsTruncated(elementRef, watchSource) {
220
220
  });
221
221
  return isTruncated;
222
222
  }
223
- const _hoisted_1$f = { class: "ck-citation-card flex w-[22.5rem] max-w-[90vw] flex-col gap-2 rounded-md bg-background-surface-floating px-6 pb-6 pt-4 shadow-md" };
224
- const _hoisted_2$9 = { class: "flex min-w-0 items-center gap-3 py-0.5" };
225
- const _hoisted_3$8 = { class: "line-clamp-6 break-words text-sm leading-5 text-content-on-surface-secondary" };
223
+ const _hoisted_1$k = { class: "ck-citation-card flex w-[22.5rem] max-w-[90vw] flex-col gap-2 rounded-md bg-background-surface-floating px-6 pb-6 pt-4 shadow-md" };
224
+ const _hoisted_2$d = { class: "flex min-w-0 items-center gap-3 py-0.5" };
225
+ const _hoisted_3$a = { class: "line-clamp-6 break-words text-sm leading-5 text-content-on-surface-secondary" };
226
226
  const _hoisted_4$8 = {
227
227
  key: 0,
228
228
  class: "flex items-center gap-1.5 text-sm leading-5 text-content-on-surface-muted"
@@ -236,7 +236,7 @@ const _hoisted_6$4 = {
236
236
  key: 2,
237
237
  class: "shrink-0"
238
238
  };
239
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
239
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
240
240
  ...{
241
241
  name: "CkCitationCard"
242
242
  },
@@ -271,8 +271,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
271
271
  }
272
272
  }
273
273
  return (_ctx, _cache) => {
274
- return openBlock(), createElementBlock("div", _hoisted_1$f, [
275
- createElementVNode("div", _hoisted_2$9, [
274
+ return openBlock(), createElementBlock("div", _hoisted_1$k, [
275
+ createElementVNode("div", _hoisted_2$d, [
276
276
  createVNode(unref(UiFileType), {
277
277
  filename: __props.fileName,
278
278
  icon: __props.icon,
@@ -310,7 +310,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
310
310
  _: 1
311
311
  }, 8, ["aria-label"])) : createCommentVNode("", true)
312
312
  ]),
313
- createElementVNode("p", _hoisted_3$8, toDisplayString(__props.snippet), 1),
313
+ createElementVNode("p", _hoisted_3$a, toDisplayString(__props.snippet), 1),
314
314
  __props.collectionName || __props.locationLabel ? (openBlock(), createElementBlock("p", _hoisted_4$8, [
315
315
  __props.collectionName ? (openBlock(), createBlock(unref(UiTooltip), {
316
316
  key: 0,
@@ -334,7 +334,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
334
334
  };
335
335
  }
336
336
  });
337
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
337
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
338
338
  ...{
339
339
  name: "CkCitationLabel"
340
340
  },
@@ -382,9 +382,9 @@ const _export_sfc = (sfc, props) => {
382
382
  }
383
383
  return target;
384
384
  };
385
- const CkCitationLabel = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-66ed453e"]]);
385
+ const CkCitationLabel = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-66ed453e"]]);
386
386
  const CLOSE_DELAY_MS = 80;
387
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
387
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
388
388
  ...{
389
389
  name: "CkCitation"
390
390
  },
@@ -481,7 +481,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
481
481
  onFocusout: onContentFocusOut
482
482
  }, {
483
483
  default: withCtx(() => [
484
- createVNode(unref(_sfc_main$r), {
484
+ createVNode(unref(_sfc_main$x), {
485
485
  "file-name": __props.fileName,
486
486
  icon: __props.icon,
487
487
  snippet: __props.snippet,
@@ -500,9 +500,9 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
500
500
  };
501
501
  }
502
502
  });
503
- const _hoisted_1$e = { class: "relative flex min-h-0 flex-col overflow-hidden" };
504
- const _hoisted_2$8 = ["data-message-row"];
505
- const _hoisted_3$7 = {
503
+ const _hoisted_1$j = { class: "relative flex min-h-0 flex-col overflow-hidden" };
504
+ const _hoisted_2$c = ["data-message-row"];
505
+ const _hoisted_3$9 = {
506
506
  key: 0,
507
507
  class: "flex min-w-0 justify-end"
508
508
  };
@@ -510,7 +510,7 @@ const _hoisted_4$7 = {
510
510
  key: 1,
511
511
  class: "flex min-w-0 justify-start"
512
512
  };
513
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
513
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
514
514
  ...{ name: "CkConversationLayout" },
515
515
  __name: "CkConversationLayout",
516
516
  props: {
@@ -669,7 +669,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
669
669
  );
670
670
  __expose({ scrollToMessage: scrollMessageToTop });
671
671
  return (_ctx, _cache) => {
672
- return openBlock(), createElementBlock("div", _hoisted_1$e, [
672
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
673
673
  createElementVNode("div", {
674
674
  "aria-hidden": "true",
675
675
  class: normalizeClass(["pointer-events-none absolute inset-x-0 top-0 z-10 h-8 bg-gradient-to-b from-background-surface-secondary to-transparent transition-opacity duration-200", showTopFade.value ? "opacity-100" : "opacity-0"])
@@ -686,12 +686,12 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
686
686
  "data-message-row": message.role,
687
687
  class: normalizeClass(["min-w-0", index === 0 ? "mt-2xl" : "mt-3xl"])
688
688
  }, [
689
- message.role === "user" ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
689
+ message.role === "user" ? (openBlock(), createElementBlock("div", _hoisted_3$9, [
690
690
  renderSlot(_ctx.$slots, "user-message", { message })
691
691
  ])) : (openBlock(), createElementBlock("div", _hoisted_4$7, [
692
692
  renderSlot(_ctx.$slots, "agent-message", { message })
693
693
  ]))
694
- ], 10, _hoisted_2$8);
694
+ ], 10, _hoisted_2$c);
695
695
  }), 128)),
696
696
  _ctx.$slots["thread-footer"] ? (openBlock(), createElementBlock("div", {
697
697
  key: 0,
@@ -714,7 +714,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
714
714
  };
715
715
  }
716
716
  });
717
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
717
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
718
718
  ...{
719
719
  name: "CkMessageButton"
720
720
  },
@@ -738,11 +738,11 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
738
738
  };
739
739
  }
740
740
  });
741
- const _hoisted_1$d = {
741
+ const _hoisted_1$i = {
742
742
  class: "sr-only",
743
743
  "aria-live": "polite"
744
744
  };
745
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
745
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
746
746
  ...{
747
747
  name: "CkCopyMessageButton"
748
748
  },
@@ -799,7 +799,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
799
799
  "delay-duration": 0
800
800
  }, {
801
801
  default: withCtx(() => [
802
- createVNode(unref(_sfc_main$n), mergeProps({ ariaLabel: copied.value ? __props.ariaLabelCopied : __props.ariaLabelCopy }, {
802
+ createVNode(unref(_sfc_main$t), mergeProps({ ariaLabel: copied.value ? __props.ariaLabelCopied : __props.ariaLabelCopy }, {
803
803
  disabled: __props.disabled,
804
804
  onClick: handleClick
805
805
  }), {
@@ -826,15 +826,15 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
826
826
  ]),
827
827
  _: 1
828
828
  }, 16, ["disabled"]),
829
- createElementVNode("span", _hoisted_1$d, toDisplayString(copied.value ? __props.ariaLabelCopied : __props.ariaLabelCopy), 1)
829
+ createElementVNode("span", _hoisted_1$i, toDisplayString(copied.value ? __props.ariaLabelCopied : __props.ariaLabelCopy), 1)
830
830
  ]),
831
831
  _: 1
832
832
  }, 8, ["open", "content"]);
833
833
  };
834
834
  }
835
835
  });
836
- const CkCopyMessageButton = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-ba2e5f32"]]);
837
- const _hoisted_1$c = {
836
+ const CkCopyMessageButton = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-ba2e5f32"]]);
837
+ const _hoisted_1$h = {
838
838
  width: "208",
839
839
  height: "144",
840
840
  viewBox: "0 0 208 144",
@@ -843,20 +843,20 @@ const _hoisted_1$c = {
843
843
  "aria-hidden": "true",
844
844
  focusable: "false"
845
845
  };
846
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
846
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
847
847
  ...{ name: "CkDropZoneIllustration" },
848
848
  __name: "CkDropZoneIllustration",
849
849
  setup(__props) {
850
850
  return (_ctx, _cache) => {
851
- return openBlock(), createElementBlock("svg", _hoisted_1$c, [..._cache[0] || (_cache[0] = [
851
+ return openBlock(), createElementBlock("svg", _hoisted_1$h, [..._cache[0] || (_cache[0] = [
852
852
  createStaticVNode('<g clip-path="url(#ck-drop-zone-clip)"><path d="M0 71.5391C0 32.0292 32.0292 0 71.5391 0H135.739C175.249 0 207.278 32.0292 207.278 71.5391C207.278 111.049 175.249 143.078 135.739 143.078H71.5392C32.0292 143.078 0 111.049 0 71.5391Z" fill="#F2EBE8"></path><path d="M120.899 98.2608L134.973 45.7385C135.223 44.805 136.182 44.251 137.116 44.5011L172.976 54.1098C173.909 54.3599 174.463 55.3195 174.213 56.2531L160.14 108.775C159.89 109.709 158.93 110.263 157.997 110.013L122.137 100.404C121.203 100.154 120.649 99.1943 120.899 98.2608Z" fill="#FFCCBB" stroke="#333333"></path><g><path d="M153.839 69.86L144.18 67.2718C143.118 66.9871 142.015 67.6235 141.731 68.686L137.589 84.1409C137.305 85.2034 137.941 86.3056 139.004 86.5904L150.595 89.6962C151.657 89.9809 152.76 89.3445 153.044 88.282L156.668 74.759L153.839 69.86Z" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M153.839 69.86L153.063 72.7578C152.921 73.2891 153.239 73.8402 153.77 73.9825L156.668 74.759" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M143.783 76.4828L151.51 78.5534" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M143.006 79.3806L150.733 81.4511" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M142.23 82.2784L147.059 83.5725" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path></g><path d="M86.3795 98.2608L72.3062 45.7385C72.0561 44.805 71.0965 44.251 70.1629 44.5011L34.3029 54.1098C33.3694 54.3599 32.8153 55.3195 33.0655 56.2531L47.1388 108.775C47.3889 109.709 48.3485 110.263 49.2821 110.013L85.1421 100.404C86.0756 100.154 86.6297 99.1943 86.3795 98.2608Z" fill="#FFE9B5" stroke="#333333"></path><g><path d="M60.3294 76.0227L58.0001 67.3293C60.3057 66.7116 62.7623 67.035 64.8294 68.2284C66.8966 69.4219 68.405 71.3877 69.0228 73.6933L60.3294 76.0227Z" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M55.3303 68.8899C54.4077 69.3934 53.5755 70.0573 52.8752 70.8559C51.7015 72.1942 50.9511 73.8504 50.7187 75.6152C50.4864 77.38 50.7826 79.1741 51.5699 80.7706C52.3572 82.367 53.6002 83.6942 55.1417 84.5842C56.6833 85.4742 58.4541 85.8871 60.2304 85.7707C62.0066 85.6543 63.7084 85.0138 65.1206 83.9302C66.5328 82.8465 67.5919 81.3685 68.1641 79.6829C68.5135 78.6536 68.6717 77.5751 68.6371 76.4998" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path></g><path d="M76.5186 107.5L76.5185 35C76.5185 33.6193 77.6378 32.5 79.0185 32.5H128.519C129.899 32.5 131.019 33.6193 131.019 35V107.5C131.019 108.881 129.899 110 128.519 110H79.0186C77.6378 110 76.5186 108.881 76.5186 107.5Z" fill="#FFB3DD" stroke="#333333"></path><g><path d="M107.519 56.8335H95.519C94.419 56.8335 93.519 57.7335 93.519 58.8335V82.1665C93.519 83.2675 94.419 84.1665 95.519 84.1665H111.519C112.619 84.1665 113.519 83.2675 113.519 82.1665V64.8335L107.519 56.8335Z" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M107.519 56.8335V62.8335C107.519 63.9335 108.419 64.8335 109.519 64.8335H113.519" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M103.519 78.8335V70.8335" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path><path d="M99.519 74.8335L103.519 70.8335L107.519 74.8335" stroke="#1D1D1B" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"></path></g></g><defs><clipPath id="ck-drop-zone-clip"><rect width="208" height="144" fill="white"></rect></clipPath></defs>', 2)
853
853
  ])]);
854
854
  };
855
855
  }
856
856
  });
857
- const _hoisted_1$b = ["aria-label"];
858
- const _hoisted_2$7 = { class: "pointer-events-none flex h-full w-full flex-col items-center justify-center gap-4 text-content-on-surface-primary" };
859
- const _hoisted_3$6 = { class: "flex flex-col items-center gap-1 text-center" };
857
+ const _hoisted_1$g = ["aria-label"];
858
+ const _hoisted_2$b = { class: "pointer-events-none flex h-full w-full flex-col items-center justify-center gap-4 text-content-on-surface-primary" };
859
+ const _hoisted_3$8 = { class: "flex flex-col items-center gap-1 text-center" };
860
860
  const _hoisted_4$6 = { class: "body-16-bold" };
861
861
  const _hoisted_5$4 = {
862
862
  key: 0,
@@ -868,7 +868,7 @@ const _hoisted_6$3 = {
868
868
  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",
869
869
  role: "alert"
870
870
  };
871
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
871
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
872
872
  ...{
873
873
  name: "CkDropZoneOverlay"
874
874
  },
@@ -1029,16 +1029,16 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1029
1029
  }, ["prevent"])),
1030
1030
  onDrop: onOverlayDrop
1031
1031
  }, [
1032
- createElementVNode("div", _hoisted_2$7, [
1032
+ createElementVNode("div", _hoisted_2$b, [
1033
1033
  renderSlot(_ctx.$slots, "default", {}, () => [
1034
- createVNode(_sfc_main$l, { class: "h-36 w-52" }),
1035
- createElementVNode("div", _hoisted_3$6, [
1034
+ createVNode(_sfc_main$r, { class: "h-36 w-52" }),
1035
+ createElementVNode("div", _hoisted_3$8, [
1036
1036
  createElementVNode("p", _hoisted_4$6, toDisplayString(resolvedHeading.value), 1),
1037
1037
  __props.hint ? (openBlock(), createElementBlock("p", _hoisted_5$4, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
1038
1038
  ])
1039
1039
  ], true)
1040
1040
  ])
1041
- ], 40, _hoisted_1$b)) : createCommentVNode("", true)
1041
+ ], 40, _hoisted_1$g)) : createCommentVNode("", true)
1042
1042
  ]),
1043
1043
  _: 3
1044
1044
  }),
@@ -1056,9 +1056,9 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1056
1056
  };
1057
1057
  }
1058
1058
  });
1059
- const CkDropZoneOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-54119668"]]);
1060
- const _hoisted_1$a = ["aria-label"];
1061
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
1059
+ const CkDropZoneOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-54119668"]]);
1060
+ const _hoisted_1$f = ["aria-label"];
1061
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1062
1062
  ...{
1063
1063
  name: "CkFeedbackButton"
1064
1064
  },
@@ -1113,7 +1113,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1113
1113
  "delay-duration": 0
1114
1114
  }, {
1115
1115
  default: withCtx(() => [
1116
- createVNode(unref(_sfc_main$n), mergeProps({ ariaLabel: thumbsUpLabel.value }, {
1116
+ createVNode(unref(_sfc_main$t), mergeProps({ ariaLabel: thumbsUpLabel.value }, {
1117
1117
  "aria-pressed": isUpSelected.value,
1118
1118
  "aria-disabled": __props.locked || void 0,
1119
1119
  disabled: isUpDisabled.value,
@@ -1140,7 +1140,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1140
1140
  "delay-duration": 0
1141
1141
  }, {
1142
1142
  default: withCtx(() => [
1143
- createVNode(unref(_sfc_main$n), mergeProps({ ariaLabel: thumbsDownLabel.value }, {
1143
+ createVNode(unref(_sfc_main$t), mergeProps({ ariaLabel: thumbsDownLabel.value }, {
1144
1144
  "aria-pressed": isDownSelected.value,
1145
1145
  "aria-disabled": __props.locked || void 0,
1146
1146
  disabled: isDownDisabled.value,
@@ -1160,11 +1160,11 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1160
1160
  ]),
1161
1161
  _: 1
1162
1162
  }, 8, ["content"])
1163
- ], 8, _hoisted_1$a);
1163
+ ], 8, _hoisted_1$f);
1164
1164
  };
1165
1165
  }
1166
1166
  });
1167
- const CkFeedbackButton = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-c4c638c3"]]);
1167
+ const CkFeedbackButton = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-c4c638c3"]]);
1168
1168
  const SOFT_BREAK_RE = /\r?\n/g;
1169
1169
  const remarkBreaks = () => {
1170
1170
  return (tree) => {
@@ -1192,7 +1192,7 @@ function useCitationRendering(citations, onOpenSource) {
1192
1192
  const source = sourcesByIndex.value.get(index);
1193
1193
  if (!source) return null;
1194
1194
  if (slot) return slot({ source, openSource: onOpenSource });
1195
- return h(_sfc_main$p, { ...source, onOpenSource });
1195
+ return h(_sfc_main$v, { ...source, onOpenSource });
1196
1196
  }
1197
1197
  return { citationPlugins, renderCitationNode };
1198
1198
  }
@@ -1256,7 +1256,7 @@ function domToVNode(node, ctx) {
1256
1256
  }
1257
1257
  return vnode;
1258
1258
  }
1259
- const _sfc_main$i = defineComponent({
1259
+ const _sfc_main$o = defineComponent({
1260
1260
  name: "CkMarkdownRenderer",
1261
1261
  props: {
1262
1262
  content: { type: String, required: true },
@@ -1316,12 +1316,12 @@ const _sfc_main$i = defineComponent({
1316
1316
  };
1317
1317
  }
1318
1318
  });
1319
- const _hoisted_1$9 = {
1319
+ const _hoisted_1$e = {
1320
1320
  key: 0,
1321
1321
  class: "flex min-h-0 flex-col gap-2"
1322
1322
  };
1323
- const _hoisted_2$6 = { class: "ck-feedback-dialog__response min-h-0 flex-1 overflow-y-auto rounded-md border border-input bg-background-input-default px-3 py-2 shadow-xs" };
1324
- const _hoisted_3$5 = { class: "flex min-h-0 flex-col gap-4" };
1323
+ const _hoisted_2$a = { class: "ck-feedback-dialog__response min-h-0 flex-1 overflow-y-auto rounded-md border border-input bg-background-input-default px-3 py-2 shadow-xs" };
1324
+ const _hoisted_3$7 = { class: "flex min-h-0 flex-col gap-4" };
1325
1325
  const _hoisted_4$5 = {
1326
1326
  class: "self-end text-sm text-content-on-surface-muted tabular-nums",
1327
1327
  "aria-live": "polite"
@@ -1330,7 +1330,7 @@ const _hoisted_5$3 = {
1330
1330
  key: 0,
1331
1331
  class: "ck-feedback-dialog__footer flex items-center gap-2 text-sm text-content-on-surface-muted"
1332
1332
  };
1333
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
1333
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1334
1334
  ...{
1335
1335
  name: "CkFeedbackDialog"
1336
1336
  },
@@ -1488,15 +1488,15 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1488
1488
  showResponseColumn.value ? "grid-cols-2" : "grid-cols-1"
1489
1489
  ])
1490
1490
  }, [
1491
- showResponseColumn.value ? (openBlock(), createElementBlock("section", _hoisted_1$9, [
1491
+ showResponseColumn.value ? (openBlock(), createElementBlock("section", _hoisted_1$e, [
1492
1492
  createVNode(unref(UiFieldLabel), null, {
1493
1493
  default: withCtx(() => [
1494
1494
  createTextVNode(toDisplayString(responseHeading.value), 1)
1495
1495
  ]),
1496
1496
  _: 1
1497
1497
  }),
1498
- createElementVNode("div", _hoisted_2$6, [
1499
- createVNode(unref(_sfc_main$i), {
1498
+ createElementVNode("div", _hoisted_2$a, [
1499
+ createVNode(unref(_sfc_main$o), {
1500
1500
  content: __props.responseText,
1501
1501
  citations: __props.citations
1502
1502
  }, {
@@ -1509,7 +1509,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1509
1509
  }, 8, ["content", "citations"])
1510
1510
  ])
1511
1511
  ])) : createCommentVNode("", true),
1512
- createElementVNode("section", _hoisted_3$5, [
1512
+ createElementVNode("section", _hoisted_3$7, [
1513
1513
  createVNode(unref(UiToggleGroup), {
1514
1514
  modelValue: selectedReasons.value,
1515
1515
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedReasons.value = $event),
@@ -1575,8 +1575,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1575
1575
  };
1576
1576
  }
1577
1577
  });
1578
- const CkFeedbackDialog = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-8d78ea5d"]]);
1579
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
1578
+ const CkFeedbackDialog = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-8d78ea5d"]]);
1579
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1580
1580
  ...{
1581
1581
  name: "CkFileItemRow",
1582
1582
  inheritAttrs: false
@@ -1619,9 +1619,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1619
1619
  };
1620
1620
  }
1621
1621
  });
1622
- const _hoisted_1$8 = ["aria-label"];
1623
- const _hoisted_2$5 = ["onClick"];
1624
- const _hoisted_3$4 = ["disabled", "aria-label"];
1622
+ const _hoisted_1$d = ["aria-label"];
1623
+ const _hoisted_2$9 = ["onClick"];
1624
+ const _hoisted_3$6 = ["disabled", "aria-label"];
1625
1625
  const _hoisted_4$4 = {
1626
1626
  key: 3,
1627
1627
  class: "flex min-w-0 flex-1 flex-col items-start gap-0.5"
@@ -1637,7 +1637,7 @@ const _hoisted_6$2 = {
1637
1637
  const _hoisted_7$2 = ["aria-label"];
1638
1638
  const _hoisted_8$1 = ["onClick"];
1639
1639
  const ITEM_GAP = 8;
1640
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
1640
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
1641
1641
  ...{
1642
1642
  name: "CkFileItemsList"
1643
1643
  },
@@ -1759,7 +1759,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
1759
1759
  }),
1760
1760
  onClick: ($event) => handleRowClick(file, $event)
1761
1761
  }, [
1762
- createVNode(_sfc_main$g, {
1762
+ createVNode(_sfc_main$m, {
1763
1763
  file,
1764
1764
  size: __props.size,
1765
1765
  "is-removable": __props.isRemovable,
@@ -1772,9 +1772,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
1772
1772
  ]),
1773
1773
  _: 3
1774
1774
  }, 8, ["file", "size", "is-removable", "remove-label", "disabled", "onRemove"])
1775
- ], 12, _hoisted_2$5);
1775
+ ], 12, _hoisted_2$9);
1776
1776
  }), 128))
1777
- ], 8, _hoisted_1$8)) : (openBlock(), createBlock(unref(UiPopover), {
1777
+ ], 8, _hoisted_1$d)) : (openBlock(), createBlock(unref(UiPopover), {
1778
1778
  key: 1,
1779
1779
  open: isOpen.value,
1780
1780
  "onUpdate:open": _cache[0] || (_cache[0] = ($event) => isOpen.value = $event)
@@ -1817,7 +1817,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
1817
1817
  "aria-hidden": "true",
1818
1818
  class: normalizeClass(["shrink-0 text-content-on-surface-muted transition-transform", isOpen.value && "rotate-180"])
1819
1819
  }, null, 8, ["class"])
1820
- ], 10, _hoisted_3$4)
1820
+ ], 10, _hoisted_3$6)
1821
1821
  ]),
1822
1822
  _: 1
1823
1823
  }),
@@ -1839,7 +1839,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
1839
1839
  style: normalizeStyle({ maxWidth: `${__props.maxItemWidth}px` }),
1840
1840
  onClick: ($event) => handleRowClick(file, $event)
1841
1841
  }, [
1842
- createVNode(_sfc_main$g, {
1842
+ createVNode(_sfc_main$m, {
1843
1843
  file,
1844
1844
  size: __props.size,
1845
1845
  "is-removable": __props.isRemovable,
@@ -1866,9 +1866,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
1866
1866
  }
1867
1867
  });
1868
1868
  const CHAT_HISTORY_ACTIVE_INDICATOR_CLASS = "ui-active-indicator";
1869
- const _hoisted_1$7 = ["data-active"];
1870
- const _hoisted_2$4 = { class: "min-w-0 flex-1" };
1871
- const _hoisted_3$3 = { class: "truncate body-14-regular text-content-on-surface-primary" };
1869
+ const _hoisted_1$c = ["data-active"];
1870
+ const _hoisted_2$8 = { class: "min-w-0 flex-1" };
1871
+ const _hoisted_3$5 = { class: "truncate body-14-regular text-content-on-surface-primary" };
1872
1872
  const _hoisted_4$3 = {
1873
1873
  key: 0,
1874
1874
  class: "mt-0.5 flex min-w-0 items-center gap-1 label-12-medium text-content-on-surface-muted"
@@ -1888,7 +1888,7 @@ const _hoisted_7$1 = {
1888
1888
  const _hoisted_8 = ["aria-label"];
1889
1889
  const _hoisted_9 = ["aria-label"];
1890
1890
  const _hoisted_10 = ["aria-label"];
1891
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
1891
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1892
1892
  ...{
1893
1893
  name: "CkHistoryItem",
1894
1894
  inheritAttrs: false
@@ -2015,8 +2015,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2015
2015
  class: itemClass.value
2016
2016
  }), {
2017
2017
  default: withCtx(() => [
2018
- createElementVNode("div", _hoisted_2$4, [
2019
- createElementVNode("div", _hoisted_3$3, toDisplayString(props.title), 1),
2018
+ createElementVNode("div", _hoisted_2$8, [
2019
+ createElementVNode("div", _hoisted_3$5, toDisplayString(props.title), 1),
2020
2020
  props.metaStart || props.metaEnd || _ctx.$slots.meta ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
2021
2021
  renderSlot(_ctx.$slots, "meta", {}, () => [
2022
2022
  props.metaStart ? (openBlock(), createElementBlock("span", _hoisted_5$1, toDisplayString(props.metaStart), 1)) : createCommentVNode("", true),
@@ -2122,12 +2122,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2122
2122
  }))
2123
2123
  ], 42, _hoisted_10))
2124
2124
  ], 34)) : createCommentVNode("", true)
2125
- ], 10, _hoisted_1$7);
2125
+ ], 10, _hoisted_1$c);
2126
2126
  };
2127
2127
  }
2128
2128
  });
2129
2129
  const baseClass = "flex w-full min-w-0 flex-col py-2";
2130
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
2130
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
2131
2131
  ...{
2132
2132
  name: "CkHistoryWrapper",
2133
2133
  inheritAttrs: false
@@ -2158,9 +2158,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2158
2158
  };
2159
2159
  }
2160
2160
  });
2161
- const _hoisted_1$6 = ["disabled", "aria-expanded", "aria-label"];
2162
- const _hoisted_2$3 = { class: "min-w-0 max-w-[10rem] truncate" };
2163
- const _hoisted_3$2 = ["aria-label"];
2161
+ const _hoisted_1$b = ["disabled", "aria-expanded", "aria-label"];
2162
+ const _hoisted_2$7 = { class: "min-w-0 max-w-[10rem] truncate" };
2163
+ const _hoisted_3$4 = ["aria-label"];
2164
2164
  const _hoisted_4$2 = ["aria-selected", "onClick"];
2165
2165
  const _hoisted_5 = { class: "flex min-w-0 flex-1 flex-col" };
2166
2166
  const _hoisted_6 = { class: "min-w-0 truncate" };
@@ -2168,7 +2168,7 @@ const _hoisted_7 = {
2168
2168
  key: 0,
2169
2169
  class: "min-w-0 truncate text-xs text-content-on-surface-muted"
2170
2170
  };
2171
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
2171
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2172
2172
  ...{ name: "CkModelSelector" },
2173
2173
  __name: "CkModelSelector",
2174
2174
  props: {
@@ -2218,14 +2218,14 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2218
2218
  "aria-expanded": open.value,
2219
2219
  "aria-label": triggerAriaLabel.value
2220
2220
  }, [
2221
- createElementVNode("span", _hoisted_2$3, toDisplayString(selectedLabel.value), 1),
2221
+ createElementVNode("span", _hoisted_2$7, toDisplayString(selectedLabel.value), 1),
2222
2222
  createVNode(unref(UiIcon), {
2223
2223
  name: "chevron-down",
2224
2224
  size: 16,
2225
2225
  class: "shrink-0",
2226
2226
  "aria-hidden": "true"
2227
2227
  })
2228
- ], 8, _hoisted_1$6)
2228
+ ], 8, _hoisted_1$b)
2229
2229
  ]),
2230
2230
  _: 1
2231
2231
  }),
@@ -2269,7 +2269,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2269
2269
  ], 8, _hoisted_4$2)
2270
2270
  ]);
2271
2271
  }), 128))
2272
- ], 8, _hoisted_3$2)
2272
+ ], 8, _hoisted_3$4)
2273
2273
  ]),
2274
2274
  _: 1
2275
2275
  }, 8, ["side", "align", "side-offset"])
@@ -2279,7 +2279,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2279
2279
  };
2280
2280
  }
2281
2281
  });
2282
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
2282
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
2283
2283
  ...{ name: "CkPromptSendButton" },
2284
2284
  __name: "CkPromptSendButton",
2285
2285
  props: {
@@ -2305,7 +2305,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2305
2305
  };
2306
2306
  }
2307
2307
  });
2308
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
2308
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
2309
2309
  ...{ name: "CkPromptMenuButton" },
2310
2310
  __name: "CkPromptMenuButton",
2311
2311
  props: {
@@ -2335,7 +2335,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2335
2335
  };
2336
2336
  }
2337
2337
  });
2338
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2338
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2339
2339
  ...{ name: "CkPromptStopButton" },
2340
2340
  __name: "CkPromptStopButton",
2341
2341
  props: {
@@ -2361,15 +2361,15 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2361
2361
  };
2362
2362
  }
2363
2363
  });
2364
- const _hoisted_1$5 = { class: "ck-prompt-root flex flex-col gap-2" };
2365
- const _hoisted_2$2 = {
2364
+ const _hoisted_1$a = { class: "ck-prompt-root flex flex-col gap-2" };
2365
+ const _hoisted_2$6 = {
2366
2366
  key: 0,
2367
2367
  style: { "grid-area": "top" }
2368
2368
  };
2369
- const _hoisted_3$1 = ["for"];
2369
+ const _hoisted_3$3 = ["for"];
2370
2370
  const _hoisted_4$1 = ["id", "value", "placeholder", "disabled"];
2371
2371
  const MAX_LINES = 6;
2372
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2372
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
2373
2373
  ...{ name: "CkPromptInput" },
2374
2374
  __name: "CkPromptInput",
2375
2375
  props: {
@@ -2458,7 +2458,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2458
2458
  onMounted(adjustHeight);
2459
2459
  __expose({ focus, submit });
2460
2460
  return (_ctx, _cache) => {
2461
- return openBlock(), createElementBlock("div", _hoisted_1$5, [
2461
+ return openBlock(), createElementBlock("div", _hoisted_1$a, [
2462
2462
  createElementVNode("form", {
2463
2463
  class: normalizeClass([
2464
2464
  "ck-prompt-form border-border-surface-default bg-background-input-strong grid items-center gap-x-0 gap-y-5 border transition-[border-radius] duration-250 ease-[cubic-bezier(0.22,1,0.36,1)] ",
@@ -2471,14 +2471,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2471
2471
  }),
2472
2472
  onSubmit: withModifiers(submit, ["prevent"])
2473
2473
  }, [
2474
- hasToolbarTop.value ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
2474
+ hasToolbarTop.value ? (openBlock(), createElementBlock("div", _hoisted_2$6, [
2475
2475
  renderSlot(_ctx.$slots, "toolbar-top", {}, void 0, true)
2476
2476
  ])) : createCommentVNode("", true),
2477
2477
  __props.ariaLabel ? (openBlock(), createElementBlock("label", {
2478
2478
  key: 1,
2479
2479
  for: unref(textareaId),
2480
2480
  class: "sr-only"
2481
- }, toDisplayString(__props.ariaLabel), 9, _hoisted_3$1)) : createCommentVNode("", true),
2481
+ }, toDisplayString(__props.ariaLabel), 9, _hoisted_3$3)) : createCommentVNode("", true),
2482
2482
  createElementVNode("div", {
2483
2483
  class: normalizeClass([!isMultiLine.value && "pr-2"]),
2484
2484
  style: { "grid-area": "left" }
@@ -2520,12 +2520,12 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2520
2520
  };
2521
2521
  }
2522
2522
  });
2523
- const CkPromptInput = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-c6b78cec"]]);
2524
- const _hoisted_1$4 = {
2523
+ const CkPromptInput = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-c6b78cec"]]);
2524
+ const _hoisted_1$9 = {
2525
2525
  key: 0,
2526
2526
  class: "text-center text-content-on-surface-muted text-xs font-normal leading-4"
2527
2527
  };
2528
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2528
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
2529
2529
  ...{ name: "CkPromptInputDisclaimer" },
2530
2530
  __name: "CkPromptInputDisclaimer",
2531
2531
  props: {
@@ -2533,7 +2533,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2533
2533
  },
2534
2534
  setup(__props) {
2535
2535
  return (_ctx, _cache) => {
2536
- return _ctx.$slots.default || __props.text ? (openBlock(), createElementBlock("p", _hoisted_1$4, [
2536
+ return _ctx.$slots.default || __props.text ? (openBlock(), createElementBlock("p", _hoisted_1$9, [
2537
2537
  renderSlot(_ctx.$slots, "default", {}, () => [
2538
2538
  createTextVNode(toDisplayString(__props.text), 1)
2539
2539
  ])
@@ -2541,7 +2541,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2541
2541
  };
2542
2542
  }
2543
2543
  });
2544
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2544
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
2545
2545
  ...{
2546
2546
  name: "CkRegenerateMessageButton"
2547
2547
  },
@@ -2568,7 +2568,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2568
2568
  "delay-duration": 0
2569
2569
  }, {
2570
2570
  default: withCtx(() => [
2571
- createVNode(unref(_sfc_main$n), mergeProps({ ariaLabel: __props.ariaLabel }, {
2571
+ createVNode(unref(_sfc_main$t), mergeProps({ ariaLabel: __props.ariaLabel }, {
2572
2572
  disabled: __props.disabled,
2573
2573
  onClick: handleClick
2574
2574
  }), {
@@ -2587,6 +2587,465 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2587
2587
  };
2588
2588
  }
2589
2589
  });
2590
+ const _hoisted_1$8 = ["aria-labelledby", "aria-describedby"];
2591
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2592
+ __name: "ApprovalCard",
2593
+ props: {
2594
+ headingId: {},
2595
+ descriptionId: {}
2596
+ },
2597
+ setup(__props, { expose: __expose }) {
2598
+ const root = useTemplateRef("root");
2599
+ __expose({
2600
+ focus: () => root.value?.focus(),
2601
+ containsFocus: () => root.value?.contains(document.activeElement) ?? false
2602
+ });
2603
+ return (_ctx, _cache) => {
2604
+ return openBlock(), createElementBlock("div", {
2605
+ ref_key: "root",
2606
+ ref: root,
2607
+ role: "group",
2608
+ tabindex: "-1",
2609
+ "aria-labelledby": __props.headingId,
2610
+ "aria-describedby": __props.descriptionId,
2611
+ class: "ck-tool-approval rounded-xl border border-border-surface-default bg-background-input-default"
2612
+ }, [
2613
+ renderSlot(_ctx.$slots, "default")
2614
+ ], 8, _hoisted_1$8);
2615
+ };
2616
+ }
2617
+ });
2618
+ const _hoisted_1$7 = {
2619
+ key: 0,
2620
+ class: "text-sm leading-5 text-content-on-surface-muted"
2621
+ };
2622
+ const _hoisted_2$5 = {
2623
+ key: 0,
2624
+ class: "mt-2 text-xs leading-[14px] text-content-on-surface-muted"
2625
+ };
2626
+ const MAX_ARGUMENTS_CHARS = 2e4;
2627
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
2628
+ __name: "ArgumentsJson",
2629
+ props: {
2630
+ serialized: {},
2631
+ labels: {}
2632
+ },
2633
+ setup(__props) {
2634
+ const props = __props;
2635
+ const json = computed(
2636
+ () => props.serialized.readable ? props.serialized.json : ""
2637
+ );
2638
+ const truncated = computed(() => json.value.length > MAX_ARGUMENTS_CHARS);
2639
+ const code = computed(
2640
+ () => truncated.value ? `${json.value.slice(0, MAX_ARGUMENTS_CHARS)}
2641
+ …` : json.value
2642
+ );
2643
+ return (_ctx, _cache) => {
2644
+ return !__props.serialized.readable ? (openBlock(), createElementBlock("p", _hoisted_1$7, toDisplayString(__props.labels.toolApprovalArgumentsUnreadable), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2645
+ createVNode(unref(UiCodeBlock), {
2646
+ code: code.value,
2647
+ language: "json",
2648
+ "max-height": "14rem",
2649
+ "copy-label": __props.labels.codeEditorCopy,
2650
+ "copied-label": __props.labels.codeEditorCopied
2651
+ }, null, 8, ["code", "copy-label", "copied-label"]),
2652
+ truncated.value ? (openBlock(), createElementBlock("p", _hoisted_2$5, toDisplayString(__props.labels.toolApprovalArgumentsTruncated), 1)) : createCommentVNode("", true)
2653
+ ], 64));
2654
+ };
2655
+ }
2656
+ });
2657
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2658
+ __name: "BodyBoundary",
2659
+ setup(__props) {
2660
+ const failed = ref(false);
2661
+ onErrorCaptured((error) => {
2662
+ console.error(
2663
+ "[CkToolApproval] Custom body failed, showing the arguments as JSON:",
2664
+ error
2665
+ );
2666
+ failed.value = true;
2667
+ return false;
2668
+ });
2669
+ return (_ctx, _cache) => {
2670
+ return failed.value ? renderSlot(_ctx.$slots, "fallback", { key: 0 }) : renderSlot(_ctx.$slots, "default", { key: 1 });
2671
+ };
2672
+ }
2673
+ });
2674
+ const BADGE_ICON_SIZE = 12;
2675
+ const _hoisted_1$6 = ["id"];
2676
+ const _hoisted_2$4 = {
2677
+ "aria-hidden": "true",
2678
+ class: "inline-flex shrink-0"
2679
+ };
2680
+ const _hoisted_3$2 = { class: "truncate" };
2681
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2682
+ __name: "CardHeading",
2683
+ props: {
2684
+ id: {},
2685
+ title: {},
2686
+ connectorLabel: {},
2687
+ connectorIcon: {},
2688
+ size: {}
2689
+ },
2690
+ setup(__props) {
2691
+ return (_ctx, _cache) => {
2692
+ return openBlock(), createElementBlock("div", {
2693
+ id: __props.id,
2694
+ class: "flex min-w-0 items-center gap-2"
2695
+ }, [
2696
+ createElementVNode("p", {
2697
+ class: normalizeClass([
2698
+ "text-content-on-surface-primary",
2699
+ __props.size === "card" ? "text-base font-bold leading-[18px]" : "truncate text-sm font-medium leading-5"
2700
+ ])
2701
+ }, toDisplayString(__props.title), 3),
2702
+ __props.connectorLabel ? (openBlock(), createBlock(unref(UiBadge), {
2703
+ key: 0,
2704
+ variant: "outline",
2705
+ size: "small",
2706
+ class: "min-w-0 shrink"
2707
+ }, {
2708
+ default: withCtx(() => [
2709
+ createElementVNode("span", _hoisted_2$4, [
2710
+ renderSlot(_ctx.$slots, "icon", {}, () => [
2711
+ createVNode(unref(UiIcon), {
2712
+ name: __props.connectorIcon,
2713
+ size: unref(BADGE_ICON_SIZE)
2714
+ }, null, 8, ["name", "size"])
2715
+ ])
2716
+ ]),
2717
+ createElementVNode("span", _hoisted_3$2, toDisplayString(__props.connectorLabel), 1)
2718
+ ]),
2719
+ _: 3
2720
+ })) : createCommentVNode("", true)
2721
+ ], 8, _hoisted_1$6);
2722
+ };
2723
+ }
2724
+ });
2725
+ const ckToolApprovalStatuses = [
2726
+ "pending",
2727
+ "allowed",
2728
+ "denied",
2729
+ "failed",
2730
+ "skipped"
2731
+ ];
2732
+ function isDecidedStatus(status) {
2733
+ return status !== "pending" && ckToolApprovalStatuses.some((known) => known === status);
2734
+ }
2735
+ const RESULT_SEPARATOR = " · ";
2736
+ function resultLineOf(outcome) {
2737
+ return [outcome.result, outcome.detail].filter(Boolean).join(RESULT_SEPARATOR);
2738
+ }
2739
+ function toolApprovalOutcome(status, labels, summary) {
2740
+ const notRunDetail = summary ?? labels.toolApprovalNothingChanged;
2741
+ const outcomes = {
2742
+ allowed: {
2743
+ result: labels.toolApprovalAllowedResult,
2744
+ detail: summary ?? "",
2745
+ badge: {
2746
+ variant: "verified",
2747
+ icon: "check",
2748
+ text: labels.toolApprovalAllowedBadge
2749
+ }
2750
+ },
2751
+ denied: {
2752
+ result: labels.toolApprovalDeniedResult,
2753
+ detail: notRunDetail,
2754
+ badge: {
2755
+ variant: "secondary",
2756
+ icon: "ban",
2757
+ text: labels.toolApprovalDeniedBadge
2758
+ }
2759
+ },
2760
+ failed: {
2761
+ result: labels.toolApprovalFailedResult,
2762
+ detail: notRunDetail,
2763
+ badge: {
2764
+ variant: "destructive",
2765
+ icon: "triangle-alert",
2766
+ text: labels.toolApprovalFailedBadge
2767
+ }
2768
+ },
2769
+ skipped: {
2770
+ result: labels.toolApprovalSkippedResult,
2771
+ detail: notRunDetail,
2772
+ badge: {
2773
+ variant: "secondary",
2774
+ icon: "skip-forward",
2775
+ text: labels.toolApprovalSkippedBadge
2776
+ }
2777
+ }
2778
+ };
2779
+ return outcomes[status];
2780
+ }
2781
+ const _hoisted_1$5 = { class: "flex min-w-0 flex-1 flex-col gap-0.5" };
2782
+ const _hoisted_2$3 = ["id"];
2783
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2784
+ __name: "ResultRow",
2785
+ props: {
2786
+ outcome: {},
2787
+ headingId: {}
2788
+ },
2789
+ setup(__props, { expose: __expose }) {
2790
+ const props = __props;
2791
+ const descriptionId = useId();
2792
+ const card = useTemplateRef("card");
2793
+ const resultLine = computed(() => resultLineOf(props.outcome));
2794
+ __expose({
2795
+ focus: () => card.value?.focus()
2796
+ });
2797
+ return (_ctx, _cache) => {
2798
+ return openBlock(), createBlock(_sfc_main$b, {
2799
+ ref_key: "card",
2800
+ ref: card,
2801
+ "heading-id": __props.headingId,
2802
+ "description-id": unref(descriptionId),
2803
+ class: "flex items-center gap-3 px-5 py-4"
2804
+ }, {
2805
+ default: withCtx(() => [
2806
+ createElementVNode("div", _hoisted_1$5, [
2807
+ renderSlot(_ctx.$slots, "heading"),
2808
+ createElementVNode("p", {
2809
+ id: unref(descriptionId),
2810
+ class: "truncate text-xs leading-[14px] text-content-on-surface-muted"
2811
+ }, toDisplayString(resultLine.value), 9, _hoisted_2$3)
2812
+ ]),
2813
+ createVNode(unref(UiBadge), {
2814
+ variant: __props.outcome.badge.variant,
2815
+ size: "small",
2816
+ class: "shrink-0"
2817
+ }, {
2818
+ default: withCtx(() => [
2819
+ createVNode(unref(UiIcon), {
2820
+ name: __props.outcome.badge.icon,
2821
+ size: unref(BADGE_ICON_SIZE),
2822
+ "aria-hidden": "true"
2823
+ }, null, 8, ["name", "size"]),
2824
+ createTextVNode(" " + toDisplayString(__props.outcome.badge.text), 1)
2825
+ ]),
2826
+ _: 1
2827
+ }, 8, ["variant"])
2828
+ ]),
2829
+ _: 3
2830
+ }, 8, ["heading-id", "description-id"]);
2831
+ };
2832
+ }
2833
+ });
2834
+ function serializeArguments(args) {
2835
+ try {
2836
+ return { readable: true, json: JSON.stringify(args, null, 2) };
2837
+ } catch (error) {
2838
+ console.error("[CkToolApproval] Arguments cannot be shown as JSON:", error);
2839
+ return { readable: false };
2840
+ }
2841
+ }
2842
+ function toolTitleFromName(toolName) {
2843
+ const words = toolName.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z])(?=[A-Z][a-z])/g, "$1 ").split(/[\s_.-]+/).filter(Boolean).map((word) => isAcronym(word) ? word : word.toLowerCase());
2844
+ const sentence = words.join(" ");
2845
+ return sentence.charAt(0).toUpperCase() + sentence.slice(1);
2846
+ }
2847
+ function isAcronym(word) {
2848
+ return /^[A-Z]{2,}$/.test(word);
2849
+ }
2850
+ const _hoisted_1$4 = { class: "px-6 py-3" };
2851
+ const _hoisted_2$2 = { class: "flex items-center justify-end gap-2 px-6" };
2852
+ const _hoisted_3$1 = {
2853
+ class: "sr-only",
2854
+ "aria-live": "polite"
2855
+ };
2856
+ const DEFAULT_CONNECTOR_ICON = "app-window";
2857
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2858
+ ...{
2859
+ name: "CkToolApproval",
2860
+ // The root is a fragment (card or row, plus the announcer); attrs go to the card or row.
2861
+ inheritAttrs: false
2862
+ },
2863
+ __name: "CkToolApproval",
2864
+ props: {
2865
+ request: {},
2866
+ status: {},
2867
+ summary: {},
2868
+ bodyComponents: {}
2869
+ },
2870
+ emits: ["allow", "deny"],
2871
+ setup(__props, { expose: __expose, emit: __emit }) {
2872
+ const props = __props;
2873
+ const emit = __emit;
2874
+ const providedLabels = useChatKitLabels();
2875
+ const labels = computed(() => ({
2876
+ ...defaultChatKitLabels,
2877
+ ...definedOnly(providedLabels.value)
2878
+ }));
2879
+ function definedOnly(provided) {
2880
+ return Object.fromEntries(
2881
+ Object.entries(provided).filter(([, text]) => text !== void 0)
2882
+ );
2883
+ }
2884
+ const headingId = useId();
2885
+ const pendingCard = useTemplateRef("pendingCard");
2886
+ const resultRow = useTemplateRef("resultRow");
2887
+ const locked = ref(false);
2888
+ function unlock() {
2889
+ locked.value = false;
2890
+ }
2891
+ watch([() => props.request.id, () => props.status], unlock);
2892
+ function allow() {
2893
+ lock();
2894
+ emit("allow", props.request.id);
2895
+ }
2896
+ function deny() {
2897
+ lock();
2898
+ emit("deny", props.request.id);
2899
+ }
2900
+ function lock() {
2901
+ if (pendingCard.value?.containsFocus()) pendingCard.value.focus();
2902
+ locked.value = true;
2903
+ }
2904
+ const announcement = ref("");
2905
+ watch(
2906
+ () => props.request.id,
2907
+ () => {
2908
+ announcement.value = "";
2909
+ }
2910
+ );
2911
+ watch(
2912
+ () => props.status,
2913
+ (status, previous) => {
2914
+ if (previous !== "pending" || status === "pending") return;
2915
+ if (pendingCard.value?.containsFocus()) {
2916
+ void nextTick(() => resultRow.value?.focus());
2917
+ } else {
2918
+ announcement.value = resultLineOf(outcome.value);
2919
+ }
2920
+ }
2921
+ );
2922
+ __expose({ unlock });
2923
+ const title = computed(
2924
+ () => props.request.toolTitle ?? toolTitleFromName(props.request.toolName)
2925
+ );
2926
+ const connectorIcon = computed(
2927
+ () => props.request.connectorIcon ?? DEFAULT_CONNECTOR_ICON
2928
+ );
2929
+ const customBody = computed(() => {
2930
+ const toolBodies = ownEntry(props.bodyComponents, props.request.connector);
2931
+ const body = ownEntry(toolBodies, props.request.toolName);
2932
+ return body && toRaw(body);
2933
+ });
2934
+ function ownEntry(record, key) {
2935
+ return record && Object.hasOwn(record, key) ? record[key] : void 0;
2936
+ }
2937
+ const serializedArguments = computed(
2938
+ () => serializeArguments(props.request.arguments)
2939
+ );
2940
+ const outcome = computed(() => {
2941
+ if (isDecidedStatus(props.status)) {
2942
+ return toolApprovalOutcome(props.status, labels.value, props.summary);
2943
+ }
2944
+ console.warn(
2945
+ `[CkToolApproval] Unknown status "${props.status}", showing it as failed.`
2946
+ );
2947
+ return toolApprovalOutcome("failed", labels.value, props.summary);
2948
+ });
2949
+ return (_ctx, _cache) => {
2950
+ return openBlock(), createElementBlock(Fragment, null, [
2951
+ __props.status === "pending" ? (openBlock(), createBlock(_sfc_main$b, mergeProps({ key: 0 }, _ctx.$attrs, {
2952
+ ref_key: "pendingCard",
2953
+ ref: pendingCard,
2954
+ "heading-id": unref(headingId),
2955
+ class: "flex flex-col gap-3 py-4"
2956
+ }), {
2957
+ default: withCtx(() => [
2958
+ createVNode(_sfc_main$8, {
2959
+ id: unref(headingId),
2960
+ class: "px-6",
2961
+ size: "card",
2962
+ title: title.value,
2963
+ "connector-label": __props.request.connectorLabel,
2964
+ "connector-icon": connectorIcon.value
2965
+ }, createSlots({ _: 2 }, [
2966
+ _ctx.$slots["connector-icon"] ? {
2967
+ name: "icon",
2968
+ fn: withCtx(() => [
2969
+ renderSlot(_ctx.$slots, "connector-icon")
2970
+ ]),
2971
+ key: "0"
2972
+ } : void 0
2973
+ ]), 1032, ["id", "title", "connector-label", "connector-icon"]),
2974
+ createVNode(unref(UiSeparator)),
2975
+ createElementVNode("div", _hoisted_1$4, [
2976
+ customBody.value ? (openBlock(), createBlock(_sfc_main$9, {
2977
+ key: __props.request.id
2978
+ }, {
2979
+ fallback: withCtx(() => [
2980
+ createVNode(_sfc_main$a, {
2981
+ serialized: serializedArguments.value,
2982
+ labels: labels.value
2983
+ }, null, 8, ["serialized", "labels"])
2984
+ ]),
2985
+ default: withCtx(() => [
2986
+ (openBlock(), createBlock(resolveDynamicComponent(customBody.value), { request: __props.request }, null, 8, ["request"]))
2987
+ ]),
2988
+ _: 1
2989
+ })) : (openBlock(), createBlock(_sfc_main$a, {
2990
+ key: 1,
2991
+ serialized: serializedArguments.value,
2992
+ labels: labels.value
2993
+ }, null, 8, ["serialized", "labels"]))
2994
+ ]),
2995
+ createVNode(unref(UiSeparator)),
2996
+ createElementVNode("div", _hoisted_2$2, [
2997
+ createVNode(unref(UiButton), {
2998
+ variant: "secondary",
2999
+ disabled: locked.value,
3000
+ onClick: deny
3001
+ }, {
3002
+ default: withCtx(() => [
3003
+ createTextVNode(toDisplayString(labels.value.toolApprovalDeny), 1)
3004
+ ]),
3005
+ _: 1
3006
+ }, 8, ["disabled"]),
3007
+ createVNode(unref(UiButton), {
3008
+ disabled: locked.value || !serializedArguments.value.readable,
3009
+ onClick: allow
3010
+ }, {
3011
+ default: withCtx(() => [
3012
+ createTextVNode(toDisplayString(labels.value.toolApprovalAllow), 1)
3013
+ ]),
3014
+ _: 1
3015
+ }, 8, ["disabled"])
3016
+ ])
3017
+ ]),
3018
+ _: 3
3019
+ }, 16, ["heading-id"])) : (openBlock(), createBlock(_sfc_main$7, mergeProps({ key: 1 }, _ctx.$attrs, {
3020
+ ref_key: "resultRow",
3021
+ ref: resultRow,
3022
+ outcome: outcome.value,
3023
+ "heading-id": unref(headingId)
3024
+ }), {
3025
+ heading: withCtx(() => [
3026
+ createVNode(_sfc_main$8, {
3027
+ id: unref(headingId),
3028
+ size: "row",
3029
+ title: title.value,
3030
+ "connector-label": __props.request.connectorLabel,
3031
+ "connector-icon": connectorIcon.value
3032
+ }, createSlots({ _: 2 }, [
3033
+ _ctx.$slots["connector-icon"] ? {
3034
+ name: "icon",
3035
+ fn: withCtx(() => [
3036
+ renderSlot(_ctx.$slots, "connector-icon")
3037
+ ]),
3038
+ key: "0"
3039
+ } : void 0
3040
+ ]), 1032, ["id", "title", "connector-label", "connector-icon"])
3041
+ ]),
3042
+ _: 3
3043
+ }, 16, ["outcome", "heading-id"])),
3044
+ createElementVNode("span", _hoisted_3$1, toDisplayString(announcement.value), 1)
3045
+ ], 64);
3046
+ };
3047
+ }
3048
+ });
2590
3049
  const _hoisted_1$3 = { class: "inline-flex max-w-[536px] flex-col items-end justify-start gap-1" };
2591
3050
  const _hoisted_2$1 = ["aria-expanded"];
2592
3051
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
@@ -2756,7 +3215,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2756
3215
  onMounted(async () => {
2757
3216
  const root = rootRef.value;
2758
3217
  if (!root) return;
2759
- const { createCrepeEditor } = await import("./createCrepeEditor-BGSlwmKn.js");
3218
+ const { createCrepeEditor } = await import("./createCrepeEditor-DSfByw4o.js");
2760
3219
  if (destroyed) return;
2761
3220
  const initialMarkdown = props.modelValue;
2762
3221
  lastKnownMarkdown = initialMarkdown;
@@ -3159,7 +3618,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3159
3618
  }
3160
3619
  __expose({ scrollToMessage });
3161
3620
  return (_ctx, _cache) => {
3162
- return openBlock(), createBlock(_sfc_main$o, {
3621
+ return openBlock(), createBlock(_sfc_main$u, {
3163
3622
  ref_key: "layoutRef",
3164
3623
  ref: layoutRef,
3165
3624
  messages: __props.messages
@@ -3182,7 +3641,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3182
3641
  ]),
3183
3642
  "agent-message": withCtx(({ message }) => [
3184
3643
  renderSlot(_ctx.$slots, "agent-message", { message }, () => [
3185
- createVNode(_sfc_main$u, {
3644
+ createVNode(_sfc_main$A, {
3186
3645
  "bottom-separator": message.id !== lastAgentMessageId.value
3187
3646
  }, createSlots({
3188
3647
  footer: withCtx(() => [
@@ -3197,7 +3656,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3197
3656
  ]),
3198
3657
  default: withCtx(() => [
3199
3658
  renderSlot(_ctx.$slots, "agent-message-content", { message }, () => [
3200
- createVNode(_sfc_main$i, {
3659
+ createVNode(_sfc_main$o, {
3201
3660
  content: getMessageText(message),
3202
3661
  classes: __props.agentMarkdownClasses
3203
3662
  }, {
@@ -3219,7 +3678,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3219
3678
  name: "header",
3220
3679
  fn: withCtx(() => [
3221
3680
  renderSlot(_ctx.$slots, "agent-message-header", { message }, () => [
3222
- createVNode(_sfc_main$t, null, createSlots({
3681
+ createVNode(_sfc_main$z, null, createSlots({
3223
3682
  default: withCtx(() => [
3224
3683
  renderSlot(_ctx.$slots, "agent-message-header-content", { message })
3225
3684
  ]),
@@ -3353,7 +3812,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3353
3812
  }
3354
3813
  return (_ctx, _cache) => {
3355
3814
  return openBlock(), createElementBlock("div", null, [
3356
- createVNode(_sfc_main$d, {
3815
+ createVNode(_sfc_main$j, {
3357
3816
  class: normalizeClass([
3358
3817
  isExpanded.value && props.maxHeight ? "overflow-y-auto" : void 0,
3359
3818
  props.contentClass
@@ -3375,7 +3834,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3375
3834
  edit: () => emit("edit", conversation),
3376
3835
  delete: () => emit("delete", conversation)
3377
3836
  }, () => [
3378
- createVNode(_sfc_main$e, {
3837
+ createVNode(_sfc_main$k, {
3379
3838
  as: "a",
3380
3839
  href: hrefFor(conversation),
3381
3840
  "is-active": conversation.id === props.activeId,
@@ -3442,37 +3901,38 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3442
3901
  }
3443
3902
  });
3444
3903
  export {
3445
- _sfc_main$w as A,
3446
- _sfc_main$v as B,
3904
+ _sfc_main$C as A,
3905
+ _sfc_main$B as B,
3447
3906
  CkCitationLabel as C,
3448
- CkUserMessage as D,
3449
- preloadCkCodeEditor as E,
3450
- formatRelativeTime as F,
3451
- _sfc_main$u as _,
3452
- _sfc_main$t as a,
3453
- _sfc_main$p as b,
3454
- _sfc_main$r as c,
3907
+ _sfc_main$6 as D,
3908
+ CkUserMessage as E,
3909
+ preloadCkCodeEditor as F,
3910
+ formatRelativeTime as G,
3911
+ _sfc_main$A as _,
3912
+ _sfc_main$z as a,
3913
+ _sfc_main$v as b,
3914
+ _sfc_main$x as c,
3455
3915
  CkCodeEditor as d,
3456
3916
  _sfc_main$1 as e,
3457
- _sfc_main$o as f,
3917
+ _sfc_main$u as f,
3458
3918
  CkCopyMessageButton as g,
3459
3919
  CkDropZoneOverlay as h,
3460
3920
  _sfc_main$4 as i,
3461
3921
  CkFeedbackButton as j,
3462
3922
  CkFeedbackDialog as k,
3463
- _sfc_main$f as l,
3464
- _sfc_main$s as m,
3923
+ _sfc_main$l as l,
3924
+ _sfc_main$y as m,
3465
3925
  _sfc_main as n,
3466
- _sfc_main$e as o,
3467
- _sfc_main$d as p,
3468
- _sfc_main$i as q,
3469
- _sfc_main$n as r,
3926
+ _sfc_main$k as o,
3927
+ _sfc_main$j as p,
3928
+ _sfc_main$o as q,
3929
+ _sfc_main$t as r,
3470
3930
  CkMilkdownEditor as s,
3471
- _sfc_main$c as t,
3931
+ _sfc_main$i as t,
3472
3932
  CkPromptInput as u,
3473
- _sfc_main$7 as v,
3474
- _sfc_main$a as w,
3475
- _sfc_main$b as x,
3476
- _sfc_main$9 as y,
3477
- _sfc_main$6 as z
3933
+ _sfc_main$d as v,
3934
+ _sfc_main$g as w,
3935
+ _sfc_main$h as x,
3936
+ _sfc_main$f as y,
3937
+ _sfc_main$c as z
3478
3938
  };