@8wave/ai-elements 0.121.0-beta.22 → 0.121.0-beta.24

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 (25) hide show
  1. package/dist/ai-elements.es.js +1301 -1225
  2. package/dist/ai-elements.es.js.map +1 -1
  3. package/dist-vue/PkChatbot.js +1 -1
  4. package/dist-vue/PkChatbotViewChat.js +1 -1
  5. package/dist-vue/PkChatbotViewConversations.js +1 -1
  6. package/dist-vue/PkChatbotViewFiles.js +1 -1
  7. package/dist-vue/PkChatbotViewProfile.js +1 -1
  8. package/dist-vue/_chunks/{PkChatbot-BFjoa5Wf.js → PkChatbot-BF4OzQEE.js} +6 -6
  9. package/dist-vue/_chunks/{PkChatbot-BFjoa5Wf.js.map → PkChatbot-BF4OzQEE.js.map} +1 -1
  10. package/dist-vue/_chunks/{PkChatbotViewChat-BgQ5OhkA.js → PkChatbotViewChat-CZBRaIn-.js} +2 -2
  11. package/dist-vue/_chunks/{PkChatbotViewChat-BgQ5OhkA.js.map → PkChatbotViewChat-CZBRaIn-.js.map} +1 -1
  12. package/dist-vue/_chunks/{PkChatbotViewConversations-dKZScKD9.js → PkChatbotViewConversations-DSSWFPod.js} +2 -2
  13. package/dist-vue/_chunks/{PkChatbotViewConversations-dKZScKD9.js.map → PkChatbotViewConversations-DSSWFPod.js.map} +1 -1
  14. package/dist-vue/_chunks/{PkChatbotViewFiles-CQC3rInD.js → PkChatbotViewFiles-CnAKz2X8.js} +2 -2
  15. package/dist-vue/_chunks/{PkChatbotViewFiles-CQC3rInD.js.map → PkChatbotViewFiles-CnAKz2X8.js.map} +1 -1
  16. package/dist-vue/_chunks/{PkChatbotViewProfile-CkZyWh4V.js → PkChatbotViewProfile-42pXpWbn.js} +2 -2
  17. package/dist-vue/_chunks/{PkChatbotViewProfile-CkZyWh4V.js.map → PkChatbotViewProfile-42pXpWbn.js.map} +1 -1
  18. package/dist-vue/_chunks/{useChatbotStore-CBjfSN69.js → useChatbotStore-CnCoo6j3.js} +1164 -1085
  19. package/dist-vue/_chunks/useChatbotStore-CnCoo6j3.js.map +1 -0
  20. package/dist-vue/composables.js +1 -1
  21. package/dist-vue/index.js +36 -36
  22. package/dist-vue/index.js.map +1 -1
  23. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +102 -7
  24. package/package.json +1 -1
  25. package/dist-vue/_chunks/useChatbotStore-CBjfSN69.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { h as e, m as t } from "./_chunks/Agent-DcoF75y8.js";
2
2
  import { t as n } from "./_chunks/createChatbotApiClient-qHjpFqPL.js";
3
- import { n as r } from "./_chunks/useChatbotStore-CBjfSN69.js";
3
+ import { n as r } from "./_chunks/useChatbotStore-CnCoo6j3.js";
4
4
  import { n as i } from "./_chunks/src-BZRiAJsH.js";
5
5
  import { A as a, i as o } from "./_chunks/utils-BCGK2AFl.js";
6
6
  import { t as s } from "./_chunks/useLocalizedString-PfaKjIQY.js";
package/dist-vue/index.js CHANGED
@@ -9,14 +9,14 @@ import { a as ze, i as Be, n as Ve } from "./_chunks/createChatbotApiClient-qHjp
9
9
  import { t as He } from "./_chunks/PkChatbotAuth-BsxfxDgR.js";
10
10
  import { t as Ue } from "./_chunks/VvButtonLocalized-BuzLsXp3.js";
11
11
  import { n as We, t as Ge } from "./_chunks/PkStreamingMarkdown-BYV68skc.js";
12
- import { a as Ke, i as qe, n as Je, r as Ye } from "./_chunks/useChatbotStore-CBjfSN69.js";
12
+ import { a as Ke, i as qe, n as Je, r as Ye } from "./_chunks/useChatbotStore-CnCoo6j3.js";
13
13
  import "./_chunks/src-BZRiAJsH.js";
14
14
  import { a as Xe, l as Ze, u as Qe } from "./_chunks/message-DZvfzt9j.js";
15
15
  import { C as $e, E as et, F as tt, M as nt, N as rt, P as it, d as at, h as ot, k as st, p as ct } from "./_chunks/utils-BCGK2AFl.js";
16
16
  import { t as lt } from "./_chunks/useSafeLocalStorage-C1BlCeKw.js";
17
17
  import { t as ut } from "./_chunks/useDialogConfirm-BxhvsnRr.js";
18
- import { n as dt, r as ft, t as pt } from "./_chunks/PkChatbotViewConversations-dKZScKD9.js";
19
- import { i as mt, n as ht, r as gt, t as _t } from "./_chunks/PkChatbotViewChat-BgQ5OhkA.js";
18
+ import { n as dt, r as ft, t as pt } from "./_chunks/PkChatbotViewConversations-DSSWFPod.js";
19
+ import { i as mt, n as ht, r as gt, t as _t } from "./_chunks/PkChatbotViewChat-CZBRaIn-.js";
20
20
  import { t as vt } from "./_chunks/PkChatbotError-BV5ga7hk.js";
21
21
  import { t as yt } from "./_chunks/useImageFallback-5vQIO0pC.js";
22
22
  import { t as bt } from "./_chunks/useLocalizedString-PfaKjIQY.js";
@@ -36,8 +36,8 @@ import { t as Gn } from "./_chunks/PkChatbotStepPayload-BOxfKD1b.js";
36
36
  import { t as Kn } from "./_chunks/PkChatbotStepToolDetail-Df6EOYxj.js";
37
37
  import { n as qn, t as Jn } from "./_chunks/PkChatbotInput-C-bMNHC-.js";
38
38
  import { t as Yn } from "./_chunks/PkChatbotEmptyState-h2qZ0JOD.js";
39
- import { t as Xn } from "./_chunks/PkChatbotViewProfile-CkZyWh4V.js";
40
- import { t as Zn } from "./_chunks/PkChatbot-BFjoa5Wf.js";
39
+ import { t as Xn } from "./_chunks/PkChatbotViewProfile-42pXpWbn.js";
40
+ import { t as Zn } from "./_chunks/PkChatbot-BF4OzQEE.js";
41
41
  import { i as Qn, r as $n, t as er } from "./_chunks/PkToolShowSources-DKkIYQ9r.js";
42
42
  import { t as tr } from "./_chunks/mcpOAuthReport-BHCMTtgf.js";
43
43
  import { t as nr } from "./_chunks/PkToolShowEmail-CUgZN0J5.js";
@@ -21643,7 +21643,7 @@ var Nw = { class: "flex items-center gap-xs min-w-0" }, Pw = { class: "truncate"
21643
21643
  },
21644
21644
  emits: ["show-info"],
21645
21645
  setup(e, { emit: t }) {
21646
- let { t: n } = J({ useScope: "global" }), r = e, i = t, a = V(""), o = j(() => new Ye({
21646
+ let { t: n } = J({ useScope: "global" }), r = e, i = t, a = V(""), { messages: o, status: s, error: c, sendMessage: l, clearError: u } = Ye(() => ({
21647
21647
  id: Ke(),
21648
21648
  transport: new qe({
21649
21649
  api: `${r.baseUrl}/agents/${r.agentId}/reasoning-chat`,
@@ -21655,18 +21655,18 @@ var Nw = { class: "flex items-center gap-xs min-w-0" }, Pw = { class: "truncate"
21655
21655
  credentials: "include",
21656
21656
  headers: r.headers
21657
21657
  })
21658
- })), s = () => {
21659
- a.value.trim() && !u.value && (o.value.sendMessage({ text: a.value }), a.value = "");
21660
- }, c = (e) => {
21661
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), s());
21662
- }, l = () => {
21663
- o.value.messages = [], o.value.clearError(), a.value = "";
21664
- }, u = j(() => o.value.status === "submitted" || o.value.status === "streaming"), d = j(() => o.value.messages.some((e) => e.role === "assistant")), f = j(() => {
21665
- let e = o.value.messages;
21658
+ })), d = () => {
21659
+ a.value.trim() && !m.value && (l({ text: a.value }), a.value = "");
21660
+ }, f = (e) => {
21661
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), d());
21662
+ }, p = () => {
21663
+ o.value = [], u(), a.value = "";
21664
+ }, m = j(() => s.value === "submitted" || s.value === "streaming"), h = j(() => o.value.some((e) => e.role === "assistant")), g = j(() => {
21665
+ let e = o.value;
21666
21666
  for (let t = e.length - 1; t >= 0; t--) if (e[t].role === "assistant") return e[t];
21667
- }), p = j(() => f.value?.parts.find((e) => e.type === "text")?.text || "");
21667
+ }), _ = j(() => g.value?.parts.find((e) => e.type === "text")?.text || "");
21668
21668
  return (t, r) => {
21669
- let m = Ue, h = hr, g = wr;
21669
+ let o = Ue, s = hr, l = wr;
21670
21670
  return B(), P("div", GO, [F("div", KO, [F("div", qO, [L(Vn, {
21671
21671
  modifiers: "surface ring shrink-0",
21672
21672
  class: "w-24 h-24",
@@ -21675,65 +21675,65 @@ var Nw = { class: "flex items-center gap-xs min-w-0" }, Pw = { class: "truncate"
21675
21675
  key: 0,
21676
21676
  class: "text-14 font-bold truncate",
21677
21677
  title: e.name
21678
- }, U(e.name), 9, JO)) : (B(), P("strong", YO, U(W(n)("label.reasoningAgentTester")), 1))]), d.value ? (B(), M(m, {
21678
+ }, U(e.name), 9, JO)) : (B(), P("strong", YO, U(W(n)("label.reasoningAgentTester")), 1))]), h.value ? (B(), M(o, {
21679
21679
  key: 0,
21680
21680
  icon: "ri:reset-right-line",
21681
21681
  modifiers: "action-quiet",
21682
21682
  title: W(n)("action.clear"),
21683
- disabled: u.value,
21684
- onClick: l
21683
+ disabled: m.value,
21684
+ onClick: p
21685
21685
  }, null, 8, ["title", "disabled"])) : N("", !0)]), F("div", XO, [
21686
21686
  F("div", ZO, [
21687
21687
  F("label", QO, U(W(n)("label.question")), 1),
21688
21688
  ui(F("textarea", {
21689
21689
  "onUpdate:modelValue": r[0] ||= (e) => a.value = e,
21690
21690
  placeholder: W(n)("placeholder.enterYourQuestion"),
21691
- disabled: u.value,
21691
+ disabled: m.value,
21692
21692
  class: "pk-reasoning-chat__input u-field w-full p-sm text-14 min-h-64",
21693
21693
  rows: "3",
21694
- onKeydown: c
21694
+ onKeydown: f
21695
21695
  }, null, 40, $O), [[li, a.value]]),
21696
- F("div", ek, [L(m, {
21696
+ F("div", ek, [L(o, {
21697
21697
  label: W(n)("action.submit"),
21698
- loading: u.value,
21699
- disabled: !a.value.trim() || u.value,
21700
- onClick: s
21698
+ loading: m.value,
21699
+ disabled: !a.value.trim() || m.value,
21700
+ onClick: d
21701
21701
  }, null, 8, [
21702
21702
  "label",
21703
21703
  "loading",
21704
21704
  "disabled"
21705
21705
  ])])
21706
21706
  ]),
21707
- o.value.error ? (B(), M(h, {
21707
+ W(c) ? (B(), M(s, {
21708
21708
  key: 0,
21709
21709
  modifiers: "danger",
21710
21710
  title: W(n)("label.error"),
21711
- content: o.value.error.message
21711
+ content: W(c).message
21712
21712
  }, null, 8, ["title", "content"])) : N("", !0),
21713
- u.value && !f.value ? (B(), P("div", tk, [F("div", nk, [L(g, {
21713
+ m.value && !g.value ? (B(), P("div", tk, [F("div", nk, [L(l, {
21714
21714
  name: "loading-loop",
21715
21715
  class: "w-16 h-16"
21716
21716
  }), F("span", rk, U(W(n)("label.processing")), 1)]), r[2] ||= F("div", { class: "vv-skeleton flex flex-col gap-8" }, [F("div", { class: "vv-skeleton__item h-12 rounded" }), F("div", { class: "vv-skeleton__item h-12 rounded w-192" })], -1)])) : N("", !0),
21717
- f.value ? (B(), P("div", ik, [F("div", ak, [
21718
- L(g, {
21717
+ g.value ? (B(), P("div", ik, [F("div", ak, [
21718
+ L(l, {
21719
21719
  name: "ri:robot-2-line",
21720
21720
  class: "w-16 h-16"
21721
21721
  }),
21722
21722
  F("span", ok, U(W(n)("label.answer")), 1),
21723
- F("div", sk, [u.value ? (B(), M(g, {
21723
+ F("div", sk, [m.value ? (B(), M(l, {
21724
21724
  key: 0,
21725
21725
  name: "loading-loop",
21726
21726
  class: "w-14 h-14"
21727
- })) : N("", !0), f.value.parts.length > 0 ? (B(), M(m, {
21727
+ })) : N("", !0), g.value.parts.length > 0 ? (B(), M(o, {
21728
21728
  key: 1,
21729
21729
  icon: "ri:information-line",
21730
21730
  title: W(n)("label.reasoningDetails"),
21731
21731
  modifiers: "action-quiet-small",
21732
- onClick: r[1] ||= fi((e) => i("show-info", f.value), ["stop"])
21732
+ onClick: r[1] ||= fi((e) => i("show-info", g.value), ["stop"])
21733
21733
  }, null, 8, ["title"])) : N("", !0)])
21734
- ]), p.value ? (B(), P("div", ck, [L(Ge, {
21735
- markdown: p.value,
21736
- loading: u.value,
21734
+ ]), _.value ? (B(), P("div", ck, [L(Ge, {
21735
+ markdown: _.value,
21736
+ loading: m.value,
21737
21737
  class: "wysiwyg text-14"
21738
21738
  }, null, 8, ["markdown", "loading"])])) : N("", !0)])) : N("", !0)
21739
21739
  ])]);