@aleph-alpha/chat-kit 0.1.0 → 0.3.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 (55) hide show
  1. package/dist/{ChatInput.vue_vue_type_script_setup_true_lang-DVCUwptr.js → ChatInput.vue_vue_type_script_setup_true_lang-BCa2ePSm.js} +160 -34
  2. package/dist/components/base/ChatConversationLayout/ChatConversationLayout.vue.d.ts +1 -0
  3. package/dist/components/base/ChatConversationLayout/ChatConversationLayout.vue.d.ts.map +1 -1
  4. package/dist/components/base/MarkdownRenderer/MarkdownRenderer.stories.d.ts +13 -0
  5. package/dist/components/base/MarkdownRenderer/MarkdownRenderer.stories.d.ts.map +1 -0
  6. package/dist/components/base/MarkdownRenderer/MarkdownRenderer.vue.d.ts +38 -0
  7. package/dist/components/base/MarkdownRenderer/MarkdownRenderer.vue.d.ts.map +1 -0
  8. package/dist/components/base/MarkdownRenderer/index.d.ts +3 -0
  9. package/dist/components/base/MarkdownRenderer/index.d.ts.map +1 -0
  10. package/dist/components/base/MarkdownRenderer/types.d.ts +36 -0
  11. package/dist/components/base/MarkdownRenderer/types.d.ts.map +1 -0
  12. package/dist/components/base/PromptActionButton/PromptActionButton.vue.d.ts +1 -1
  13. package/dist/components/base/PromptActionButton/PromptActionButton.vue.d.ts.map +1 -1
  14. package/dist/components/base/UserMessage/UserMessage.vue.d.ts.map +1 -1
  15. package/dist/components/base/index.d.ts +2 -0
  16. package/dist/components/base/index.d.ts.map +1 -1
  17. package/dist/components/composed/ChatConversation/ChatConversation.stories.d.ts +2 -0
  18. package/dist/components/composed/ChatConversation/ChatConversation.stories.d.ts.map +1 -1
  19. package/dist/components/composed/ChatConversation/ChatConversation.vue.d.ts +10 -0
  20. package/dist/components/composed/ChatConversation/ChatConversation.vue.d.ts.map +1 -1
  21. package/dist/components/composed/ChatConversation/defaultAgentMarkdownClasses.d.ts +3 -0
  22. package/dist/components/composed/ChatConversation/defaultAgentMarkdownClasses.d.ts.map +1 -0
  23. package/dist/components/composed/ChatConversation/index.d.ts +1 -0
  24. package/dist/components/composed/ChatConversation/index.d.ts.map +1 -1
  25. package/dist/components/composed/ChatConversation/types.d.ts +5 -0
  26. package/dist/components/composed/ChatConversation/types.d.ts.map +1 -1
  27. package/dist/components/composed/index.d.ts +1 -1
  28. package/dist/components/composed/index.d.ts.map +1 -1
  29. package/dist/components/index.d.ts +3 -3
  30. package/dist/components/index.d.ts.map +1 -1
  31. package/dist/components/index.js +7 -5
  32. package/dist/composables/index.d.ts +1 -0
  33. package/dist/composables/index.d.ts.map +1 -1
  34. package/dist/composables/index.js +3 -2
  35. package/dist/composables/useChatKitLabels.d.ts +20 -8
  36. package/dist/composables/useChatKitLabels.d.ts.map +1 -1
  37. package/dist/composables/useMarkdownParser.d.ts +6 -0
  38. package/dist/composables/useMarkdownParser.d.ts.map +1 -0
  39. package/dist/handlers/conversationTree.d.ts +16 -0
  40. package/dist/handlers/conversationTree.d.ts.map +1 -0
  41. package/dist/handlers/index.js +1 -1
  42. package/dist/handlers/useMessageHandler.d.ts +23 -11
  43. package/dist/handlers/useMessageHandler.d.ts.map +1 -1
  44. package/dist/index.d.ts +4 -4
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +11 -8
  47. package/dist/test-utils/createTextPlugin.d.ts +2 -0
  48. package/dist/test-utils/createTextPlugin.d.ts.map +1 -0
  49. package/dist/types.d.ts +16 -9
  50. package/dist/types.d.ts.map +1 -1
  51. package/dist/useChatKitLabels-xZXcnxZZ.js +13740 -0
  52. package/dist/useMessageHandler-Day_sdpQ.js +193 -0
  53. package/package.json +19 -9
  54. package/dist/useChatKitLabels-Bi0szl2l.js +0 -18
  55. package/dist/useMessageHandler-BdcOcw0w.js +0 -73
@@ -1,6 +1,6 @@
1
- import { createElementBlock, openBlock, createCommentVNode, createElementVNode, renderSlot, defineComponent, ref, onMounted, nextTick, onUnmounted, watch, Fragment, renderList, normalizeStyle, createBlock, unref, mergeProps, withCtx, useId, useTemplateRef, computed, withModifiers, toDisplayString, createTextVNode, useSlots, createVNode, createSlots, normalizeProps, guardReactiveProps } from "vue";
2
- import { u as useChatKitLabels } from "./useChatKitLabels-Bi0szl2l.js";
3
- import { UiIconButton, UiAvatar, UiAvatarImage, UiAvatarFallback } from "@aleph-alpha/ui-library";
1
+ import { openBlock, createElementBlock, renderSlot, createCommentVNode, createElementVNode, defineComponent, ref, onMounted, nextTick, onUnmounted, watch, Fragment, renderList, normalizeStyle, toRefs, computed, h, createBlock, unref, mergeProps, withCtx, useId, useTemplateRef, withModifiers, toDisplayString, createTextVNode, useSlots, createVNode, createSlots, normalizeProps, guardReactiveProps, normalizeClass } from "vue";
2
+ import { a as useMarkdownParser, u as useChatKitLabels } from "./useChatKitLabels-xZXcnxZZ.js";
3
+ import { UiIconButton, UiAvatar, UiAvatarImage, UiSpinner, UiAvatarFallback } from "@aleph-alpha/ui-library";
4
4
  const _export_sfc = (sfc, props) => {
5
5
  const target = sfc.__vccOpts || sfc;
6
6
  for (const [key, val] of props) {
@@ -8,7 +8,7 @@ const _export_sfc = (sfc, props) => {
8
8
  }
9
9
  return target;
10
10
  };
11
- const _sfc_main$8 = {};
11
+ const _sfc_main$9 = {};
12
12
  const _hoisted_1$5 = { class: "flex w-full items-start gap-2" };
13
13
  const _hoisted_2$3 = {
14
14
  key: 0,
@@ -41,7 +41,7 @@ function _sfc_render$1(_ctx, _cache) {
41
41
  ])
42
42
  ]);
43
43
  }
44
- const AgentMessage = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]]);
44
+ const AgentMessage = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$1]]);
45
45
  const _hoisted_1$4 = ["data-message-row"];
46
46
  const _hoisted_2$2 = {
47
47
  key: 0,
@@ -51,7 +51,7 @@ const _hoisted_3$1 = {
51
51
  key: 1,
52
52
  class: "flex justify-start"
53
53
  };
54
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
54
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
55
55
  __name: "ChatConversationLayout",
56
56
  props: {
57
57
  messages: {}
@@ -61,6 +61,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
61
61
  const scrollContainerRef = ref(null);
62
62
  const containerHeight = ref(0);
63
63
  const isAutoScrollEnabled = ref(true);
64
+ const isProgrammaticScroll = ref(false);
64
65
  const hasBottomSpacer = ref(false);
65
66
  const spacerHeight = ref(0);
66
67
  let resizeObserver = null;
@@ -90,9 +91,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
90
91
  if (!lastRow) return true;
91
92
  const lastRowBottom = lastRow.offsetTop + lastRow.offsetHeight;
92
93
  const viewportBottom = container.scrollTop + container.clientHeight;
93
- return viewportBottom >= lastRowBottom - 100;
94
+ return viewportBottom >= lastRowBottom - 5;
94
95
  }
95
96
  function handleScroll() {
97
+ if (isProgrammaticScroll.value) return;
96
98
  isAutoScrollEnabled.value = isFollowingContent();
97
99
  }
98
100
  function updateSpacerHeight() {
@@ -116,7 +118,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
116
118
  const lastUserTop = lastUserRow.offsetTop;
117
119
  const lastRowBottom = lastRow.offsetTop + lastRow.offsetHeight;
118
120
  const contentFromUserToEnd = lastRowBottom - lastUserTop;
119
- spacerHeight.value = Math.max(0, containerHeight.value - contentFromUserToEnd);
121
+ const gap = parseFloat(getComputedStyle(container).rowGap) || 0;
122
+ spacerHeight.value = Math.max(0, containerHeight.value - contentFromUserToEnd - gap);
120
123
  }
121
124
  function scrollUserMessageToTop() {
122
125
  const container = scrollContainerRef.value;
@@ -127,7 +130,15 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
127
130
  const userRows = container.querySelectorAll('[data-message-row="user"]');
128
131
  const lastUserRow = userRows[userRows.length - 1];
129
132
  if (lastUserRow) {
133
+ isProgrammaticScroll.value = true;
130
134
  lastUserRow.scrollIntoView({ behavior: "smooth", block: "start" });
135
+ container.addEventListener(
136
+ "scrollend",
137
+ () => {
138
+ isProgrammaticScroll.value = false;
139
+ },
140
+ { once: true }
141
+ );
131
142
  }
132
143
  isAutoScrollEnabled.value = true;
133
144
  });
@@ -141,7 +152,11 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
141
152
  const lastRowBottom = lastRow.offsetTop + lastRow.offsetHeight;
142
153
  const viewportBottom = container.scrollTop + container.clientHeight;
143
154
  if (lastRowBottom > viewportBottom) {
155
+ isProgrammaticScroll.value = true;
144
156
  container.scrollTop = lastRowBottom - container.clientHeight;
157
+ requestAnimationFrame(() => {
158
+ isProgrammaticScroll.value = false;
159
+ });
145
160
  }
146
161
  }
147
162
  watch(
@@ -177,9 +192,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
177
192
  class: "flex flex-col gap-4 overflow-y-auto",
178
193
  onScroll: handleScroll
179
194
  }, [
180
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.messages, (message, index) => {
195
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.messages, (message) => {
181
196
  return openBlock(), createElementBlock("div", {
182
- key: index,
197
+ key: message.id,
183
198
  "data-message-row": message.role
184
199
  }, [
185
200
  message.role === "user" ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
@@ -198,6 +213,53 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
198
213
  };
199
214
  }
200
215
  });
216
+ function domToVNode(node, slots, classes) {
217
+ if (node.nodeType === Node.TEXT_NODE) return node.textContent;
218
+ if (node.nodeType !== Node.ELEMENT_NODE) return null;
219
+ const el = node;
220
+ if (el.tagName === "PRE" && el.firstElementChild?.tagName === "CODE") {
221
+ const codeEl = el.firstElementChild;
222
+ const language = codeEl.className?.match(/language-(\S+)/)?.[1] ?? "";
223
+ const code = codeEl.textContent ?? "";
224
+ if (slots["code-block"]) {
225
+ return slots["code-block"]({ code, language });
226
+ }
227
+ }
228
+ const children = Array.from(node.childNodes).map((child) => domToVNode(child, slots, classes)).filter((c) => c != null);
229
+ const attrs = {};
230
+ for (const attr of el.attributes) {
231
+ attrs[attr.name] = attr.value;
232
+ }
233
+ const tag = el.tagName.toLowerCase();
234
+ const customClass = classes[tag];
235
+ if (customClass) {
236
+ attrs.class = attrs.class ? `${attrs.class} ${customClass}` : customClass;
237
+ }
238
+ return h(tag, attrs, children);
239
+ }
240
+ const _sfc_main$7 = defineComponent({
241
+ name: "MarkdownRenderer",
242
+ props: {
243
+ content: { type: String, required: true },
244
+ classes: { type: Object, default: () => ({}) },
245
+ plugins: { type: Array, default: void 0 }
246
+ },
247
+ setup(props, { slots }) {
248
+ const { content, plugins } = toRefs(props);
249
+ const { html } = useMarkdownParser(content, plugins);
250
+ const parsedNodes = computed(() => {
251
+ const raw = html.value;
252
+ if (!raw) return [];
253
+ const doc = new DOMParser().parseFromString(raw, "text/html");
254
+ return Array.from(doc.body.childNodes);
255
+ });
256
+ return () => {
257
+ const elementClasses = props.classes ?? {};
258
+ const children = parsedNodes.value.map((node) => domToVNode(node, slots, elementClasses)).filter((c) => c != null);
259
+ return h("div", { class: "markdown-renderer" }, children);
260
+ };
261
+ }
262
+ });
201
263
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
202
264
  __name: "PromptActionButton",
203
265
  props: {
@@ -339,8 +401,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
339
401
  };
340
402
  }
341
403
  });
342
- const _hoisted_1$1 = { class: "bg-background-surface-secondary inline-flex max-w-[600px] flex-col items-end justify-start gap-4 rounded-tl-xl rounded-br-xl rounded-bl-xl px-6 py-3" };
343
- const _hoisted_2 = { class: "text-core-content-primary justify-start self-stretch font-['Inter'] text-base leading-6 font-normal" };
404
+ const _hoisted_1$1 = { class: "bg-background-surface-primary inline-flex max-w-[600px] flex-col items-end justify-start gap-4 rounded-xl p-6" };
405
+ const _hoisted_2 = { class: "text-content-on-surface-primary justify-start self-stretch text-base leading-6 font-normal" };
344
406
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
345
407
  __name: "UserMessage",
346
408
  props: {
@@ -358,42 +420,81 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
358
420
  };
359
421
  }
360
422
  });
423
+ const defaultAgentMarkdownClasses = {
424
+ p: "my-1 leading-7",
425
+ a: "underline underline-offset-4",
426
+ h1: "mt-4 mb-2 text-2xl font-bold",
427
+ h2: "mt-3 mb-2 text-xl font-semibold",
428
+ h3: "mt-3 mb-1 text-lg font-semibold",
429
+ ul: "my-1 ml-6 list-disc",
430
+ ol: "my-1 ml-6 list-decimal",
431
+ li: "my-0.5",
432
+ pre: "my-2 overflow-x-auto rounded-lg p-4",
433
+ code: "rounded px-1.5 py-0.5",
434
+ blockquote: "my-2 border-l-2 pl-4 italic",
435
+ table: "my-2 w-full border-collapse",
436
+ th: "border p-2 text-left font-semibold",
437
+ td: "border p-2",
438
+ hr: "my-4"
439
+ };
361
440
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
362
441
  __name: "ChatConversation",
363
442
  props: {
364
443
  messages: {},
365
444
  agentAvatarImage: { default: "" },
366
- agentAvatarFallback: { default: "" }
445
+ agentAvatarFallback: { default: "" },
446
+ agentLoadingImage: { default: "" },
447
+ agentMarkdownClasses: {}
367
448
  },
368
449
  setup(__props) {
369
450
  const props = __props;
451
+ const mergedMarkdownClasses = computed(() => ({
452
+ ...defaultAgentMarkdownClasses,
453
+ ...props.agentMarkdownClasses
454
+ }));
370
455
  const slots = useSlots();
371
456
  const labels = useChatKitLabels();
372
457
  const hasIcon = computed(
373
458
  () => Boolean(props.agentAvatarImage) || Boolean(props.agentAvatarFallback) || Boolean(slots["agent-message-icon"])
374
459
  );
460
+ const isLoading = (message) => message.status === "started" || message.status === "sending";
375
461
  return (_ctx, _cache) => {
376
- return openBlock(), createBlock(_sfc_main$7, { messages: __props.messages }, {
462
+ return openBlock(), createBlock(_sfc_main$8, { messages: __props.messages }, {
377
463
  "user-message": withCtx(({ message }) => [
378
- renderSlot(_ctx.$slots, "user-message", { message }, () => [
379
- createVNode(_sfc_main$3, {
380
- message: message.content
381
- }, {
382
- default: withCtx(() => [
383
- renderSlot(_ctx.$slots, "user-message-content", { message }, () => [
384
- createTextVNode(toDisplayString(message.content), 1)
385
- ])
386
- ]),
387
- _: 2
388
- }, 1032, ["message"])
389
- ])
464
+ createElementVNode("div", {
465
+ class: normalizeClass({ "ml-8": hasIcon.value })
466
+ }, [
467
+ renderSlot(_ctx.$slots, "user-message", { message }, () => [
468
+ createVNode(_sfc_main$3, {
469
+ message: message.content
470
+ }, {
471
+ default: withCtx(() => [
472
+ renderSlot(_ctx.$slots, "user-message-content", { message }, () => [
473
+ createTextVNode(toDisplayString(message.content), 1)
474
+ ])
475
+ ]),
476
+ _: 2
477
+ }, 1032, ["message"])
478
+ ])
479
+ ], 2)
390
480
  ]),
391
481
  "agent-message": withCtx(({ message }) => [
392
482
  renderSlot(_ctx.$slots, "agent-message", { message }, () => [
393
483
  createVNode(AgentMessage, null, createSlots({
394
484
  default: withCtx(() => [
395
485
  renderSlot(_ctx.$slots, "agent-message-content", { message }, () => [
396
- createTextVNode(toDisplayString(message.content), 1)
486
+ createVNode(_sfc_main$7, {
487
+ content: message.content,
488
+ classes: mergedMarkdownClasses.value
489
+ }, createSlots({ _: 2 }, [
490
+ _ctx.$slots["agent-message-code-block"] ? {
491
+ name: "code-block",
492
+ fn: withCtx((codeBlockProps) => [
493
+ renderSlot(_ctx.$slots, "agent-message-code-block", normalizeProps(guardReactiveProps(codeBlockProps)))
494
+ ]),
495
+ key: "0"
496
+ } : void 0
497
+ ]), 1032, ["content", "classes"])
397
498
  ])
398
499
  ]),
399
500
  _: 2
@@ -401,8 +502,31 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
401
502
  hasIcon.value ? {
402
503
  name: "icon",
403
504
  fn: withCtx(() => [
404
- renderSlot(_ctx.$slots, "agent-message-icon", { message }, () => [
405
- createVNode(unref(UiAvatar), null, {
505
+ isLoading(message) ? renderSlot(_ctx.$slots, "agent-message-loading-icon", {
506
+ key: 0,
507
+ message
508
+ }, () => [
509
+ __props.agentLoadingImage ? (openBlock(), createBlock(unref(UiAvatar), {
510
+ key: 0,
511
+ class: "size-6"
512
+ }, {
513
+ default: withCtx(() => [
514
+ createVNode(unref(UiAvatarImage), {
515
+ src: __props.agentLoadingImage,
516
+ alt: unref(labels).agentLoadingAvatarAlt
517
+ }, null, 8, ["src", "alt"])
518
+ ]),
519
+ _: 1
520
+ })) : (openBlock(), createBlock(unref(UiSpinner), {
521
+ key: 1,
522
+ class: "size-6",
523
+ "aria-label": unref(labels).agentLoadingAvatarAlt
524
+ }, null, 8, ["aria-label"]))
525
+ ]) : renderSlot(_ctx.$slots, "agent-message-icon", {
526
+ key: 1,
527
+ message
528
+ }, () => [
529
+ createVNode(unref(UiAvatar), { class: "size-6" }, {
406
530
  default: withCtx(() => [
407
531
  __props.agentAvatarImage ? (openBlock(), createBlock(unref(UiAvatarImage), {
408
532
  key: 0,
@@ -545,10 +669,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
545
669
  export {
546
670
  AgentMessage as A,
547
671
  _sfc_main$2 as _,
548
- _sfc_main$7 as a,
672
+ _sfc_main$8 as a,
549
673
  _sfc_main as b,
550
- _sfc_main$6 as c,
551
- _sfc_main$5 as d,
552
- _sfc_main$4 as e,
553
- _sfc_main$3 as f
674
+ _sfc_main$7 as c,
675
+ _sfc_main$6 as d,
676
+ _sfc_main$5 as e,
677
+ _sfc_main$4 as f,
678
+ _sfc_main$3 as g,
679
+ defaultAgentMarkdownClasses as h
554
680
  };
@@ -1,4 +1,5 @@
1
1
  declare const __VLS_export: <T extends {
2
+ id: string;
2
3
  role: string;
3
4
  }>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
5
  props: import("vue").PublicProps & __VLS_PrettifyLocal<{
@@ -1 +1 @@
1
- {"version":3,"file":"ChatConversationLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/ChatConversationLayout/ChatConversationLayout.vue"],"names":[],"mappings":"AA6LE,QAAA,MAAM,YAAY,GAAK,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAClD,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,gBAAgB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAClE;WA8OO,OAAO,KAAK,EAAE,WAAW,GAAG,mBAAmB;kBA5OzC,CAAC,EAAE;MA4OyD,GAAG,CAAC,OAAO,UAAU,SAAS;QAAE,oBAAoB,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YAC1I,CAAC,OAAO,EAAE,EAAE,KAAK,IAAI;WACtB,GAAG;;wBAzOS,CAAC,KAAK,EAAE;YAAE,OAAO,EAAE,CAAC,CAAA;SAAE,KAAK,IAAI;yBAC9B,CAAC,KAAK,EAAE;YAAE,OAAO,EAAE,CAAC,CAAA;SAAE,KAAK,IAAI;;UA0O7C,EAAE;EAEL,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAI,CAAC;wBACvD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"ChatConversationLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/ChatConversationLayout/ChatConversationLayout.vue"],"names":[],"mappings":"AA4ME,QAAA,MAAM,YAAY,GAAK,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAC9D,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,gBAAgB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAClE;WA6PO,OAAO,KAAK,EAAE,WAAW,GAAG,mBAAmB;kBA3PzC,CAAC,EAAE;MA2PyD,GAAG,CAAC,OAAO,UAAU,SAAS;QAAE,oBAAoB,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YAC1I,CAAC,OAAO,EAAE,EAAE,KAAK,IAAI;WACtB,GAAG;;wBAxPS,CAAC,KAAK,EAAE;YAAE,OAAO,EAAE,CAAC,CAAA;SAAE,KAAK,IAAI;yBAC9B,CAAC,KAAK,EAAE;YAAE,OAAO,EAAE,CAAC,CAAA;SAAE,KAAK,IAAI;;UAyP7C,EAAE;EAEL,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAI,CAAC;wBACvD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import MarkdownRenderer from './MarkdownRenderer.vue';
2
+ import type { Meta, StoryObj } from '@storybook/vue3-vite';
3
+ declare const meta: Meta<typeof MarkdownRenderer>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const WithCodeBlocks: Story;
8
+ export declare const WithCustomCodeBlockSlot: Story;
9
+ export declare const ComplexMarkdown: Story;
10
+ export declare const WithCustomClasses: Story;
11
+ export declare const GfmFeatures: Story;
12
+ export declare const WithCustomPlugin: Story;
13
+ //# sourceMappingURL=MarkdownRenderer.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownRenderer.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/MarkdownRenderer/MarkdownRenderer.stories.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAUvC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAqB5B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KA4BrC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAuC7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAyC/B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA2BzB,CAAC;AAeF,eAAO,MAAM,gBAAgB,EAAE,KAiB9B,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { type PropType, type VNode } from 'vue';
2
+ import type { PluggableList } from 'unified';
3
+ import type { MarkdownElementClasses } from './types';
4
+ declare const _default: typeof __VLS_export;
5
+ export default _default;
6
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7
+ content: {
8
+ type: StringConstructor;
9
+ required: true;
10
+ };
11
+ classes: {
12
+ type: PropType<MarkdownElementClasses>;
13
+ default: () => {};
14
+ };
15
+ plugins: {
16
+ type: PropType<PluggableList>;
17
+ default: undefined;
18
+ };
19
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
20
+ [key: string]: any;
21
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
+ content: {
23
+ type: StringConstructor;
24
+ required: true;
25
+ };
26
+ classes: {
27
+ type: PropType<MarkdownElementClasses>;
28
+ default: () => {};
29
+ };
30
+ plugins: {
31
+ type: PropType<PluggableList>;
32
+ default: undefined;
33
+ };
34
+ }>> & Readonly<{}>, {
35
+ classes: MarkdownElementClasses;
36
+ plugins: PluggableList;
37
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
38
+ //# sourceMappingURL=MarkdownRenderer.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownRenderer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/MarkdownRenderer/MarkdownRenderer.vue"],"names":[],"mappings":"AA2EE,OAAO,EAAwC,KAAK,QAAQ,EAAc,KAAK,KAAK,EAAE,MAAM,KAAK,CAAC;AAClG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;wBAwCjC,OAAO,YAAY;AAAxC,wBAAyC;AAQ3C,QAAA,MAAM,YAAY;;;;;;cAIe,QAAQ,CAAC,sBAAsB,CAAC;;;;cACjC,QAAQ,CAAC,aAAa,CAAC;;;;;;;;;;;cADtB,QAAQ,CAAC,sBAAsB,CAAC;;;;cACjC,QAAQ,CAAC,aAAa,CAAC;;;;;;4EAqBnD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as MarkdownRenderer } from './MarkdownRenderer.vue';
2
+ export type { MarkdownRendererProps, MarkdownElementClasses } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/base/MarkdownRenderer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACrE,YAAY,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,36 @@
1
+ import type { PluggableList } from 'unified';
2
+ export interface MarkdownElementClasses {
3
+ h1?: string;
4
+ h2?: string;
5
+ h3?: string;
6
+ h4?: string;
7
+ h5?: string;
8
+ h6?: string;
9
+ p?: string;
10
+ a?: string;
11
+ img?: string;
12
+ strong?: string;
13
+ em?: string;
14
+ del?: string;
15
+ blockquote?: string;
16
+ ul?: string;
17
+ ol?: string;
18
+ li?: string;
19
+ pre?: string;
20
+ code?: string;
21
+ hr?: string;
22
+ br?: string;
23
+ table?: string;
24
+ thead?: string;
25
+ tbody?: string;
26
+ tr?: string;
27
+ th?: string;
28
+ td?: string;
29
+ input?: string;
30
+ }
31
+ export interface MarkdownRendererProps {
32
+ content: string;
33
+ classes?: MarkdownElementClasses;
34
+ plugins?: PluggableList;
35
+ }
36
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/MarkdownRenderer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EA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
11
11
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
+ type: "button" | "submit";
12
13
  disabled: boolean;
13
14
  loading: boolean;
14
- type: "button" | "submit";
15
15
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
16
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
17
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- {"version":3,"file":"PromptActionButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/PromptActionButton/PromptActionButton.vue"],"names":[],"mappings":"AAkCE,KAAK,WAAW,GAAG;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC5B,CAAC;AA8DN,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;cAxEC,OAAO;aACR,OAAO;UACV,QAAQ,GAAG,QAAQ;6EAyE9B,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"PromptActionButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/PromptActionButton/PromptActionButton.vue"],"names":[],"mappings":"AAkCE,KAAK,WAAW,GAAG;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC5B,CAAC;AA8DN,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;UAtEH,QAAQ,GAAG,QAAQ;cAFf,OAAO;aACR,OAAO;6EA0ErB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserMessage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/UserMessage/UserMessage.vue"],"names":[],"mappings":"AAoBE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA+ClD,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU,4SAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"UserMessage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/UserMessage/UserMessage.vue"],"names":[],"mappings":"AAoBE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA2ClD,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU,4SAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,6 +1,8 @@
1
1
  export { AgentMessage } from './AgentMessage';
2
2
  export { ChatConversationLayout } from './ChatConversationLayout';
3
3
  export type { ChatConversationLayoutProps } from './ChatConversationLayout';
4
+ export { MarkdownRenderer } from './MarkdownRenderer';
5
+ export type { MarkdownRendererProps, MarkdownElementClasses } from './MarkdownRenderer';
4
6
  export { PromptActionButton } from './PromptActionButton';
5
7
  export { PromptInput } from './PromptInput';
6
8
  export { PromptInputDisclaimer } from './PromptInputDisclaimer';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
@@ -12,5 +12,7 @@ export declare const WithFooterActions: Story;
12
12
  export declare const WithCustomUserContent: Story;
13
13
  export declare const WithCustomAgentContent: Story;
14
14
  export declare const StreamingSimulation: Story;
15
+ export declare const WithCustomMarkdownClasses: Story;
16
+ export declare const WithCustomCodeBlock: Story;
15
17
  export declare const Empty: Story;
16
18
  //# sourceMappingURL=ChatConversation.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatConversation.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/ChatConversation/ChatConversation.stories.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAsC3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAUvC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAStB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAStC,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAc5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAiB/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAcnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAcpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KA2EjC,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC"}
1
+ {"version":3,"file":"ChatConversation.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/ChatConversation/ChatConversation.stories.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AA8D3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAUvC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAStB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAStC,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAc5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAiB/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAcnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAcpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAkEjC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAgBvC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KA+CjC,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC"}
@@ -17,6 +17,10 @@ type __VLS_Slots = {
17
17
  'agent-message-icon': (props: {
18
18
  message: BaseMessage;
19
19
  }) => void;
20
+ /** Replace the agent loading icon shown while a message is being generated */
21
+ 'agent-message-loading-icon': (props: {
22
+ message: BaseMessage;
23
+ }) => void;
20
24
  /** Replace the agent message header */
21
25
  'agent-message-header': (props: {
22
26
  message: BaseMessage;
@@ -29,10 +33,16 @@ type __VLS_Slots = {
29
33
  'agent-message-footer': (props: {
30
34
  message: BaseMessage;
31
35
  }) => void;
36
+ /** Replace the default code block rendering inside agent markdown */
37
+ 'agent-message-code-block': (props: {
38
+ code: string;
39
+ language: string;
40
+ }) => void;
32
41
  };
33
42
  declare const __VLS_base: import("vue").DefineComponent<ChatConversationProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ChatConversationProps> & Readonly<{}>, {
34
43
  agentAvatarImage: string;
35
44
  agentAvatarFallback: string;
45
+ agentLoadingImage: string;
36
46
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
37
47
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
38
48
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- {"version":3,"file":"ChatConversation.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/ChatConversation/ChatConversation.vue"],"names":[],"mappings":"A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AAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { MarkdownElementClasses } from '../../base/MarkdownRenderer';
2
+ export declare const defaultAgentMarkdownClasses: MarkdownElementClasses;
3
+ //# sourceMappingURL=defaultAgentMarkdownClasses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultAgentMarkdownClasses.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/ChatConversation/defaultAgentMarkdownClasses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,eAAO,MAAM,2BAA2B,EAAE,sBAgBzC,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { default as ChatConversation } from './ChatConversation.vue';
2
+ export { defaultAgentMarkdownClasses } from './defaultAgentMarkdownClasses';
2
3
  export type { ChatConversationProps } from './types';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/ChatConversation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACrE,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/ChatConversation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { BaseMessage } from '../../../types';
2
+ import type { MarkdownElementClasses } from '../../base/MarkdownRenderer';
2
3
  /**
3
4
  * Props for the ChatConversation component
4
5
  */
@@ -9,5 +10,9 @@ export interface ChatConversationProps {
9
10
  agentAvatarImage?: string;
10
11
  /** Fallback text shown inside the default agent avatar when no image is available */
11
12
  agentAvatarFallback?: string;
13
+ /** URL of the loading avatar image shown while a message is being generated */
14
+ agentLoadingImage?: string;
15
+ /** Override default CSS classes applied to markdown elements in agent messages */
16
+ agentMarkdownClasses?: MarkdownElementClasses;
12
17
  }
13
18
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/ChatConversation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,kCAAkC;IAClC,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qFAAqF;IACrF,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/composed/ChatConversation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,kCAAkC;IAClC,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qFAAqF;IACrF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kFAAkF;IAClF,oBAAoB,CAAC,EAAE,sBAAsB,CAAC;CAC/C"}
@@ -1,4 +1,4 @@
1
- export { ChatConversation } from './ChatConversation';
1
+ export { ChatConversation, defaultAgentMarkdownClasses } from './ChatConversation';
2
2
  export type { ChatConversationProps } from './ChatConversation';
3
3
  export { ChatInput } from './ChatInput';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/composed/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/composed/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACnF,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -1,5 +1,5 @@
1
- export { AgentMessage, ChatConversationLayout, PromptActionButton, PromptInput, PromptInputDisclaimer, UserMessage, } from './base';
2
- export type { ChatConversationLayoutProps, UserMessageProps } from './base';
3
- export { ChatConversation, ChatInput } from './composed';
1
+ export { AgentMessage, ChatConversationLayout, MarkdownRenderer, PromptActionButton, PromptInput, PromptInputDisclaimer, UserMessage, } from './base';
2
+ export type { ChatConversationLayoutProps, MarkdownElementClasses, MarkdownRendererProps, UserMessageProps, } from './base';
3
+ export { ChatConversation, ChatInput, defaultAgentMarkdownClasses } from './composed';
4
4
  export type { ChatConversationProps } from './composed';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAClB,WAAW,EACX,qBAAqB,EACrB,WAAW,GACZ,MAAM,QAAQ,CAAC;AAChB,YAAY,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAG5E,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACzD,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,qBAAqB,EACrB,WAAW,GACZ,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,2BAA2B,EAC3B,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACtF,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC"}