@blueking/ai-blueking 2.0.0-dev.17 → 2.0.0-dev.19

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.
@@ -630,7 +630,7 @@ var _hoisted_1$43 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
630
630
  }))], 64)) : e.shortcut && !e.shortcut.components?.length ? (openBlock(), createBlock(unref(AgentIcon), {
631
631
  key: 1,
632
632
  class: "ai-shortcut-btn-icon"
633
- })) : createCommentVNode("v-if", !0), createTextVNode(" " + toDisplayString(e.shortcut?.name), 1)]), renderSlot(n.$slots, "append")], 2));
633
+ })) : createCommentVNode("v-if", !0), createTextVNode(" " + toDisplayString(e.shortcut?.alias || e.shortcut?.name), 1)]), renderSlot(n.$slots, "append")], 2));
634
634
  }
635
635
  }), _hoisted_1$42 = { class: "ai-selection-popover-content" }, _hoisted_2$28 = {
636
636
  key: 0,
@@ -897,6 +897,7 @@ var _hoisted_1$41 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
897
897
  }), _hoisted_1$40 = { class: "shortcut-render" }, _hoisted_2$27 = { class: "shortcut-render-header" }, _hoisted_3$20 = { class: "header-name" }, _hoisted_4$17 = { class: "shortcut-render-content" }, _hoisted_5$12 = { class: "shortcut-footer" }, shortcut_render_default = /* @__PURE__ */ defineComponent({
898
898
  __name: "shortcut-render",
899
899
  props: {
900
+ alias: {},
900
901
  components: {},
901
902
  description: {},
902
903
  formModel: {},
@@ -964,7 +965,7 @@ var _hoisted_1$41 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
964
965
  };
965
966
  return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$40, [createElementVNode("div", _hoisted_2$27, [
966
967
  createVNode(unref(ThinkingIcon), { class: "header-icon" }),
967
- createElementVNode("span", _hoisted_3$20, toDisplayString(e.name), 1),
968
+ createElementVNode("span", _hoisted_3$20, toDisplayString(e.alias || e.name), 1),
968
969
  createVNode(unref(CloseIcon), {
969
970
  class: "header-close",
970
971
  onClick: j
@@ -1529,47 +1530,51 @@ const useClipboard = () => ({ copy: async (e) => {
1529
1530
  }
1530
1531
  };
1531
1532
  }, CONTAINER_SCROLL_TOKEN = Symbol("CONTAINER_SCROLL_TOKEN"), useContainerScrollProvider = (e, n) => {
1532
- let r = shallowRef(!1), i = null, a = shallowRef(0);
1533
+ let r = shallowRef(!1), i = null, a = shallowRef(0), o = shallowRef(!0);
1533
1534
  provide(CONTAINER_SCROLL_TOKEN, computed(() => ({
1535
+ autoScrollEnabled: o.value,
1534
1536
  isScrollBottom: r,
1535
1537
  scrollBottomHeight: a,
1536
- toScrollBottom: o,
1537
- toScrollTop: s
1538
+ toScrollBottom: s,
1539
+ toScrollTop: l
1538
1540
  })));
1539
- let o = () => {
1540
- toValue(n)?.scrollIntoView({
1541
+ let s = () => {
1542
+ o.value = !0, toValue(n)?.scrollIntoView({
1541
1543
  behavior: "smooth",
1542
1544
  block: "end"
1543
1545
  });
1544
- }, s = () => {
1546
+ }, l = () => {
1545
1547
  toValue(e)?.scrollTo({
1546
1548
  top: 0,
1547
1549
  behavior: "smooth"
1548
1550
  });
1549
- }, l = () => {
1551
+ }, u = () => {
1550
1552
  let n = toValue(e);
1551
1553
  if (!n) return;
1552
1554
  let { scrollHeight: r, scrollTop: i, clientHeight: o } = n, s = r - i - o;
1553
1555
  a.value = Math.max(0, s);
1556
+ }, m = (e) => {
1557
+ e.deltaY < 0 && (o.value = !1);
1554
1558
  };
1555
1559
  return onMounted(() => {
1556
1560
  watchEffect(() => {
1557
- let o = toValue(e), s = toValue(n);
1558
- !o || !s || (i?.disconnect(), o.removeEventListener("scroll", l), l(), i = new IntersectionObserver((e) => {
1561
+ let s = toValue(e), l = toValue(n);
1562
+ !s || !l || (i?.disconnect(), s.removeEventListener("scroll", u), s.removeEventListener("wheel", m), u(), i = new IntersectionObserver((e) => {
1559
1563
  e.forEach((e) => {
1560
- e.isIntersecting ? (r.value = !0, a.value = 0) : (r.value = !1, l());
1564
+ e.isIntersecting ? (r.value = !0, a.value = 0, o.value = !0) : (r.value = !1, u());
1561
1565
  });
1562
- }), i.observe(s), o.addEventListener("scroll", l, { passive: !0 }));
1566
+ }), i.observe(l), s.addEventListener("scroll", u, { passive: !0 }), s.addEventListener("wheel", m, { passive: !0 }));
1563
1567
  });
1564
1568
  }), onScopeDispose(() => {
1565
1569
  i?.disconnect();
1566
1570
  let n = toValue(e);
1567
- n && n.removeEventListener("scroll", l);
1571
+ n && (n.removeEventListener("scroll", u), n.removeEventListener("wheel", m));
1568
1572
  }), {
1573
+ autoScrollEnabled: o,
1569
1574
  isScrollBottom: r,
1570
1575
  scrollBottomHeight: a,
1571
- toScrollBottom: o,
1572
- toScrollTop: s
1576
+ toScrollBottom: s,
1577
+ toScrollTop: l
1573
1578
  };
1574
1579
  }, useContainerScrollConsumer = () => inject(CONTAINER_SCROLL_TOKEN), useMenuKeydown = (e) => {
1575
1580
  let n = shallowRef(0);
@@ -23410,15 +23415,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
23410
23415
  onClick: o
23411
23416
  }, [e.id in unref(ToolIconsMap) ? (openBlock(), createBlock(resolveDynamicComponent(unref(ToolIconsMap)[e.id]), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$39, toDisplayString(e.name), 1))], 2)), [[unref(directive), a.value]]);
23412
23417
  }
23413
- }), _hoisted_1$38 = { class: "code-content-wrapper" }, _hoisted_2$26 = { class: "code-content-header" }, _hoisted_3$19 = { class: "code-header-language" }, _hoisted_4$16 = { class: "hljs-pre" }, _hoisted_5$11 = ["innerHTML"], _hoisted_6$6 = {
23414
- key: 0,
23415
- class: "code-line current-line"
23416
- }, MAX_CACHE_SIZE = 500, code_content_default = /* @__PURE__ */ defineComponent({
23418
+ }), _hoisted_1$38 = { class: "code-content-wrapper" }, _hoisted_2$26 = { class: "code-content-header" }, _hoisted_3$19 = { class: "code-header-language" }, _hoisted_4$16 = { class: "hljs-pre" }, _hoisted_5$11 = ["innerHTML"], _hoisted_6$6 = ["innerHTML"], MAX_CACHE_SIZE = 500, code_content_default = /* @__PURE__ */ defineComponent({
23417
23419
  __name: "code-content",
23418
23420
  props: { token: {} },
23419
23421
  emits: ["mounted"],
23420
23422
  setup(e, { emit: n }) {
23421
- let r = e, i = n, a = useTemplateRef("codeRef"), s = shallowRef(""), { copy: l } = useClipboard(), u = shallowRef([]), m = shallowRef(""), O = /* @__PURE__ */ new Map(), k = null, j = (e) => {
23423
+ let r = e, i = n, a = useTemplateRef("codeRef"), s = shallowRef(""), { copy: l } = useClipboard(), u = shallowRef([]), m = shallowRef(""), O = shallowRef(""), k = /* @__PURE__ */ new Map(), j = (e) => {
23422
23424
  for (let n of e) if (n.type === "fence" || n.type === "code_block") return {
23423
23425
  content: n.content || "",
23424
23426
  language: n.info?.trim() || ""
@@ -23428,15 +23430,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
23428
23430
  language: ""
23429
23431
  };
23430
23432
  }, I = (e) => {
23431
- let n = MarkdownLanguageMap[e] || e, r = es_default.getLanguage(n);
23432
- if (!r) {
23433
- let n = e.match(/\.\w+$/)?.[0];
23434
- n && (r = es_default.getLanguage(n.slice(1)));
23433
+ let n = MarkdownLanguageMap[e] || e;
23434
+ if (es_default.getLanguage(n)) return n;
23435
+ let r = e.match(/\.\w+$/)?.[0];
23436
+ if (r) {
23437
+ let e = r.slice(1);
23438
+ if (es_default.getLanguage(e)) return e;
23435
23439
  }
23436
- return r?.name || null;
23440
+ return null;
23437
23441
  }, L = (e, n) => {
23438
23442
  if (!e) return "";
23439
- let r = `${n || ""}:${e}`, i = O.get(r);
23443
+ let r = `${n || ""}:${e}`, i = k.get(r);
23440
23444
  if (i !== void 0) return i;
23441
23445
  let a;
23442
23446
  if (n) try {
@@ -23448,11 +23452,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
23448
23452
  a = z(e);
23449
23453
  }
23450
23454
  else a = z(e);
23451
- return O.set(r, a), O.size > MAX_CACHE_SIZE && Array.from(O.keys()).slice(0, Math.floor(MAX_CACHE_SIZE / 2)).forEach((e) => O.delete(e)), a;
23455
+ return k.set(r, a), k.size > MAX_CACHE_SIZE && Array.from(k.keys()).slice(0, Math.floor(MAX_CACHE_SIZE / 2)).forEach((e) => k.delete(e)), a;
23452
23456
  }, z = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"), B = (e, n) => {
23453
23457
  let r = I(n), i = e.split("\n");
23454
23458
  if (i.length === 1) {
23455
- u.value = [], m.value = i[0] ?? "", H();
23459
+ u.value = [];
23460
+ let e = i[0] ?? "";
23461
+ m.value = e, O.value = e ? L(e, r) : "";
23456
23462
  return;
23457
23463
  }
23458
23464
  let a = i.slice(0, -1), o = i[i.length - 1] ?? "", s = u.value, l = [];
@@ -23463,14 +23469,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
23463
23469
  html: L(n, r)
23464
23470
  });
23465
23471
  }
23466
- u.value = l, m.value = o, H();
23467
- }, H = () => {
23468
- k !== null && cancelAnimationFrame(k), k = requestAnimationFrame(() => {
23469
- k = requestAnimationFrame(() => {
23470
- k = null;
23471
- });
23472
- });
23473
- }, Dg = computed(() => {
23472
+ u.value = l, m.value = o, O.value = o ? L(o, r) : "";
23473
+ }, H = computed(() => {
23474
23474
  let { language: e } = j(r.token), n = ["hljs"];
23475
23475
  return e && n.push(`language-${e}`), n.join(" ");
23476
23476
  });
@@ -23485,7 +23485,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
23485
23485
  immediate: !0,
23486
23486
  deep: !0
23487
23487
  });
23488
- let K = () => {
23488
+ let Dg = () => {
23489
23489
  let e = a.value?.innerText;
23490
23490
  e && l(e);
23491
23491
  };
@@ -23493,19 +23493,23 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
23493
23493
  id: "copy",
23494
23494
  description: "复制",
23495
23495
  name: "复制",
23496
- onClick: K
23496
+ onClick: Dg
23497
23497
  })]), createElementVNode("pre", _hoisted_4$16, [createElementVNode("code", {
23498
23498
  ref_key: "codeRef",
23499
23499
  ref: a,
23500
- class: normalizeClass(Dg.value)
23500
+ class: normalizeClass(H.value)
23501
23501
  }, [
23502
23502
  createCommentVNode(" 已完成的行(高亮显示) "),
23503
23503
  (openBlock(!0), createElementBlock(Fragment, null, renderList(u.value, (e, r) => (openBlock(), createElementBlock(Fragment, { key: `completed-${r}` }, [createElementVNode("span", {
23504
23504
  class: "code-line",
23505
23505
  innerHTML: e.html
23506
23506
  }, null, 8, _hoisted_5$11), n[0] ||= createTextVNode(toDisplayString("\n"), -1)], 64))), 128)),
23507
- createCommentVNode(" 当前正在输入的行(打字效果,不高亮) "),
23508
- m.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(m.value), 1)) : createCommentVNode("v-if", !0)
23507
+ createCommentVNode(" 当前正在输入的行 "),
23508
+ m.value ? (openBlock(), createElementBlock("span", {
23509
+ key: 0,
23510
+ class: "code-line current-line",
23511
+ innerHTML: O.value
23512
+ }, null, 8, _hoisted_6$6)) : createCommentVNode("v-if", !0)
23509
23513
  ], 2)])]));
23510
23514
  }
23511
23515
  }), import_debounce = /* @__PURE__ */ __toESM(require_debounce()), _hoisted_1$37 = { class: "md-image-wrapper" }, _hoisted_2$25 = {
@@ -24097,7 +24101,7 @@ var vnode_renderer_default = defineComponent({
24097
24101
  trailing: !0
24098
24102
  }), { immediate: !0 });
24099
24103
  let E = (0, import_throttle.default)(() => {
24100
- a?.value?.toScrollBottom?.();
24104
+ a?.value?.autoScrollEnabled !== !1 && a?.value?.toScrollBottom?.();
24101
24105
  }, 100, {
24102
24106
  leading: !0,
24103
24107
  trailing: !0
@@ -25538,9 +25542,11 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
25538
25542
  class: "ai-activity-message-title",
25539
25543
  onClick: o[0] ||= (e) => a.value = !a.value
25540
25544
  }, [
25541
- createElementVNode("span", _hoisted_2$14, [r.value || e.status === unref(MessageStatus).Pending || e.status === unref(MessageStatus).Streaming ? (openBlock(), createBlock(ai_loading_default, { key: 0 })) : (openBlock(), createBlock(unref(DocumentIcon), { key: 1 }))]),
25545
+ createElementVNode("span", _hoisted_2$14, [r.value && (e.status === unref(MessageStatus).Pending || e.status === unref(MessageStatus).Streaming) ? (openBlock(), createBlock(ai_loading_default, { key: 0 })) : (openBlock(), createBlock(unref(DocumentIcon), {
25546
+ key: 1,
25547
+ style: { "font-size": "12px" }
25548
+ }))]),
25542
25549
  createElementVNode("span", _hoisted_3$11, toDisplayString(i.value), 1),
25543
- createCommentVNode(" <template v-if=\"status === MessageStatus.Pending || status === MessageStatus.Streaming\">\n <ContentLoadingIcon\n v-for=\"i in 3\"\n :key=\"i\"\n :class=\"`loading-status-${i}`\"\n />\n </template> "),
25544
25550
  createElementVNode("span", { class: normalizeClass(["ai-activity-message-title-icon collapsed-icon", { "is-collapsed": a.value }]) }, [createVNode(unref(CollapsedIcon))], 2)
25545
25551
  ]), withDirectives(createElementVNode("div", _hoisted_4$8, [r.value ? (openBlock(), createElementBlock("div", _hoisted_5$5, [createVNode(markdown_content_default, { content: Array.isArray(e.content) ? e.content.join("\n") : e.content?.content || "" }, null, 8, ["content"])])) : createCommentVNode("v-if", !0), createVNode(reference_content_default, { content: Array.isArray(e.content) ? e.content : e.content?.referenceDocument || [] }, null, 8, ["content"])], 512), [[vShow, !a.value]])]));
25546
25552
  }
@@ -25943,7 +25949,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
25943
25949
  props: /* @__PURE__ */ mergeModels({
25944
25950
  enableSelection: {
25945
25951
  type: Boolean,
25946
- default: !0
25952
+ default: !1
25947
25953
  },
25948
25954
  messages: {},
25949
25955
  messageStatus: {},
@@ -27609,15 +27615,15 @@ var UIStateManager = class {
27609
27615
  "stop"
27610
27616
  ],
27611
27617
  setup(e, { expose: n, emit: r }) {
27612
- let i = e, a = r, s = ref(), l = ref(), u = ref(null), T = shallowRef([]), O = ref(!1), k = ref(null), j = () => i.chatHelper ? !i.chatHelper.agent || !i.chatHelper.session || !i.chatHelper.message ? {
27618
+ let i = e, a = r, s = ref(), l = ref(), u = ref(null), T = shallowRef([]), O = ref(!1), k = ref(!1), j = ref(!1), I = ref(null), L = () => i.chatHelper ? !i.chatHelper.agent || !i.chatHelper.session || !i.chatHelper.message ? {
27613
27619
  valid: !1,
27614
27620
  error: "[ChatBot] Invalid chatHelper: missing required modules (agent, session, message)"
27615
27621
  } : { valid: !0 } : i.url ? { valid: !0 } : {
27616
27622
  valid: !1,
27617
27623
  error: "[ChatBot] Neither chatHelper nor url provided. Component requires at least one."
27618
- }, I = (() => {
27619
- let e = j();
27620
- if (!e.valid) return console.error(e.error), k.value = Error(e.error), null;
27624
+ }, z = (() => {
27625
+ let e = L();
27626
+ if (!e.valid) return console.error(e.error), I.value = Error(e.error), null;
27621
27627
  if (i.chatHelper) return i.chatHelper;
27622
27628
  let n = new AGUIProtocol$1({
27623
27629
  onStart: () => {
@@ -27627,7 +27633,7 @@ var UIStateManager = class {
27627
27633
  a("receive-text");
27628
27634
  },
27629
27635
  onDone: () => {
27630
- a("receive-end"), c_();
27636
+ a("receive-end"), m_();
27631
27637
  },
27632
27638
  onError: (e) => {
27633
27639
  a("error", e);
@@ -27641,50 +27647,50 @@ var UIStateManager = class {
27641
27647
  protocol: n
27642
27648
  });
27643
27649
  return n.injectMessageModule(r.message), r;
27644
- })(), L = computed(() => ((i.chatHelper || I)?.agent)?.isChatting?.value ? MessageStatus.Streaming : MessageStatus.Complete), z = computed(() => L.value === MessageStatus.Streaming ? MessageToolsStatus.Disabled : void 0), B = async (e, n) => {
27650
+ })(), B = computed(() => ((i.chatHelper || z)?.agent)?.isChatting?.value ? MessageStatus.Streaming : MessageStatus.Complete), H = computed(() => B.value === MessageStatus.Streaming ? MessageToolsStatus.Disabled : void 0), K = async (e, n) => {
27645
27651
  if (e.id === "cite") {
27646
- Gg.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), T_();
27652
+ Xg.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), j_();
27647
27653
  return;
27648
27654
  }
27649
27655
  if (e.id === "rebuild") {
27650
- await kg(n);
27656
+ await $(n);
27651
27657
  return;
27652
27658
  }
27653
27659
  if (e.id === "delete") {
27654
- await K(n);
27660
+ await Q(n);
27655
27661
  return;
27656
27662
  }
27657
27663
  if (e.id === "share") {
27658
- a("request-share");
27664
+ Hg && (O.value = !0), a("request-share");
27659
27665
  return;
27660
27666
  }
27661
27667
  if (e.id === "like" || e.id === "unlike") {
27662
27668
  let n = e.id === "like" ? 5 : 0;
27663
27669
  try {
27664
- return await I?.session.getSessionFeedbackReasons(n) || [];
27670
+ return await z?.session.getSessionFeedbackReasons(n) || [];
27665
27671
  } catch (e) {
27666
27672
  return console.error("[ChatBot] Failed to get feedback reasons:", e), [];
27667
27673
  }
27668
27674
  }
27669
27675
  console.log("handleAgentAction", e, n);
27670
- }, H = async (e, n, r, i) => {
27671
- if (!I) {
27676
+ }, kg = async (e, n, r, i) => {
27677
+ if (!z) {
27672
27678
  console.error("[ChatBot] Cannot submit feedback: chatHelper not initialized");
27673
27679
  return;
27674
27680
  }
27675
- let o = I.session.current?.value?.sessionCode;
27681
+ let o = z.session.current?.value?.sessionCode;
27676
27682
  if (!o) {
27677
27683
  console.error("[ChatBot] Cannot submit feedback: no active session");
27678
27684
  return;
27679
27685
  }
27680
- let s = findLastUserMessageIdBefore(Hg?.messages.value || [], n[0]);
27686
+ let s = findLastUserMessageIdBefore(qg?.messages.value || [], n[0]);
27681
27687
  if (s === void 0) {
27682
27688
  console.error("[ChatBot] Cannot submit feedback: no user message found");
27683
27689
  return;
27684
27690
  }
27685
27691
  let l = e.id === "like" ? 5 : 0;
27686
27692
  try {
27687
- await I.session.postSessionFeedback({
27693
+ await z.session.postSessionFeedback({
27688
27694
  sessionCode: o,
27689
27695
  sessionContentIds: [s],
27690
27696
  rate: l,
@@ -27694,53 +27700,53 @@ var UIStateManager = class {
27694
27700
  } catch (e) {
27695
27701
  console.error("[ChatBot] Failed to submit feedback:", e), a("error", e);
27696
27702
  }
27697
- }, K = async (e) => {
27698
- if (!Hg || !I) {
27703
+ }, Q = async (e) => {
27704
+ if (!qg || !z) {
27699
27705
  console.error("[ChatBot] Cannot delete messages: chatBusinessManager not initialized");
27700
27706
  return;
27701
27707
  }
27702
27708
  try {
27703
- let n = Hg.messages.value, r = findLastUserMessageBefore(n, e[0]);
27709
+ let n = qg.messages.value, r = findLastUserMessageBefore(n, e[0]);
27704
27710
  if (!r) {
27705
27711
  console.error("[ChatBot] No user message found before AI messages");
27706
27712
  return;
27707
27713
  }
27708
27714
  let i = [r, ...e];
27709
- await I.message.deleteMessages(i);
27715
+ await z.message.deleteMessages(i);
27710
27716
  } catch (e) {
27711
27717
  console.error("[ChatBot] Failed to delete messages:", e), a("error", e);
27712
27718
  }
27713
- }, kg = async (e) => {
27714
- if (!Hg || !I) {
27719
+ }, $ = async (e) => {
27720
+ if (!qg || !z) {
27715
27721
  console.error("[ChatBot] Cannot regenerate: chatBusinessManager not initialized");
27716
27722
  return;
27717
27723
  }
27718
- let n = I.session.current?.value?.sessionCode;
27724
+ let n = z.session.current?.value?.sessionCode;
27719
27725
  if (!n) {
27720
27726
  console.error("[ChatBot] Cannot regenerate: no active session");
27721
27727
  return;
27722
27728
  }
27723
27729
  try {
27724
- await Hg.regenerateFromAIMessages(e, n), c_();
27730
+ await qg.regenerateFromAIMessages(e, n), m_();
27725
27731
  } catch (e) {
27726
27732
  console.error("[ChatBot] Failed to regenerate:", e), a("error", e);
27727
27733
  }
27728
- }, Q = async (e, n) => {
27734
+ }, jg = async (e, n) => {
27729
27735
  if (e.id === "delete") {
27730
- await Pg(n);
27736
+ await zg(n);
27731
27737
  return;
27732
27738
  }
27733
27739
  if (e.id === "cite") {
27734
- Gg.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), T_();
27740
+ Xg.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), j_();
27735
27741
  return;
27736
27742
  }
27737
27743
  console.log("handleUserAction", e, n);
27738
- }, $ = async (e, n, r) => {
27739
- if (!I) {
27744
+ }, Ng = async (e, n, r) => {
27745
+ if (!z) {
27740
27746
  console.error("[ChatBot] Cannot edit message: chatHelper not initialized");
27741
27747
  return;
27742
27748
  }
27743
- let i = I.session.current?.value?.sessionCode;
27749
+ let i = z.session.current?.value?.sessionCode;
27744
27750
  if (!i) {
27745
27751
  console.error("[ChatBot] Cannot edit message: no active session");
27746
27752
  return;
@@ -27751,16 +27757,16 @@ var UIStateManager = class {
27751
27757
  return;
27752
27758
  }
27753
27759
  try {
27754
- console.log("handleUserInputConfirm", o, i, n), await I.agent.resendMessage(String(o), i, n), c_();
27760
+ console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n), m_();
27755
27761
  } catch (e) {
27756
27762
  console.error("[ChatBot] Failed to edit and resend message:", e), a("error", e);
27757
27763
  }
27758
- }, jg = async (e, n) => {
27759
- if (!Hg || !I) {
27764
+ }, Pg = async (e, n) => {
27765
+ if (!qg || !z) {
27760
27766
  console.error("[ChatBot] Cannot edit shortcut message: chatHelper not initialized");
27761
27767
  return;
27762
27768
  }
27763
- let r = I.session.current?.value?.sessionCode;
27769
+ let r = z.session.current?.value?.sessionCode;
27764
27770
  if (!r) {
27765
27771
  console.error("[ChatBot] Cannot edit shortcut message: no active session");
27766
27772
  return;
@@ -27771,26 +27777,26 @@ var UIStateManager = class {
27771
27777
  return;
27772
27778
  }
27773
27779
  try {
27774
- let a = Ng(e);
27780
+ let a = Ig(e);
27775
27781
  if (!a) {
27776
27782
  console.error("[ChatBot] Cannot edit shortcut message: shortcut not found");
27777
27783
  return;
27778
27784
  }
27779
- let o = g_(a, n), s = String(n.input ?? "");
27780
- await Hg.resendMessageWithProperty(String(i), r, s, o), c_();
27785
+ let o = E_(a, n), s = String(n.input ?? "");
27786
+ await qg.resendMessageWithProperty(String(i), r, s, o), m_();
27781
27787
  } catch (e) {
27782
27788
  console.error("[ChatBot] Failed to edit shortcut message:", e), a("error", e);
27783
27789
  }
27784
- }, Ng = (e) => {
27790
+ }, Ig = (e) => {
27785
27791
  let n = e.property?.extra;
27786
- return n?.shortcut ? n.shortcut : n?.command ? s_.value.find((e) => e.id === n.command) ?? null : null;
27787
- }, Pg = async (e) => {
27788
- if (!Hg || !I) {
27792
+ return n?.shortcut ? n.shortcut : n?.command ? p_.value.find((e) => e.id === n.command) ?? null : null;
27793
+ }, zg = async (e) => {
27794
+ if (!qg || !z) {
27789
27795
  console.error("[ChatBot] Cannot delete message: chatHelper not initialized");
27790
27796
  return;
27791
27797
  }
27792
27798
  try {
27793
- let n = Hg.messages.value, r = n.findIndex((n) => n === e);
27799
+ let n = qg.messages.value, r = n.findIndex((n) => n === e);
27794
27800
  if (r === -1) {
27795
27801
  console.error("[ChatBot] User message not found in messages list");
27796
27802
  return;
@@ -27802,66 +27808,89 @@ var UIStateManager = class {
27802
27808
  i.push(r);
27803
27809
  }
27804
27810
  let a = [e, ...i];
27805
- await I.message.deleteMessages(a);
27811
+ await z.message.deleteMessages(a);
27806
27812
  } catch (e) {
27807
27813
  console.error("[ChatBot] Failed to delete user message:", e), a("error", e);
27808
27814
  }
27809
- }, Ig = async () => {
27810
- ((i.chatHelper || I)?.agent)?.stopChat?.(I?.session.current?.value?.sessionCode ?? "");
27811
- }, zg = !i.chatHelper, Vg = I ? new SessionBusinessManager(I.session, I.message, null, {
27815
+ }, Vg = async () => {
27816
+ ((i.chatHelper || z)?.agent)?.stopChat?.(z?.session.current?.value?.sessionCode ?? "");
27817
+ }, Hg = !i.chatHelper, Ug = computed(() => Hg ? O.value : i.enableSelection), Wg = computed(() => Hg ? k.value : i.shareLoading), Gg = z ? new SessionBusinessManager(z.session, z.message, null, {
27812
27818
  enableChatSession: !0,
27813
27819
  autoSwitchToInitialSession: !!i.sessionCode,
27814
27820
  loadRecentSessionOnMount: i.autoLoad,
27815
27821
  initialSessionCode: i.sessionCode
27816
- }) : null, Hg = I ? new ChatBusinessManager(I.agent, I.message, I.session, null, {
27822
+ }) : null, qg = z ? new ChatBusinessManager(z.agent, z.message, z.session, null, {
27817
27823
  openingRemark: i.helloText,
27818
27824
  predefinedQuestions: i.prompts,
27819
27825
  placeholder: i.placeholder
27820
- }) : null, Ug = new ShortcutManager(null, i.shortcuts || []), Wg = shallowRef([[]]), Gg = ref(""), qg = computed(() => Hg?.messages.value ?? []), Jg = computed(() => Hg?.isMessagesLoading.value ?? !1), Yg = computed(() => Hg?.isGenerating.value ?? !1), Xg = computed(() => Vg?.currentSession.value ?? null), Zg = computed(() => zg && !O.value ? !1 : !Jg.value && qg.value.length === 0), Qg = computed(() => I?.agent.info.value?.conversationSettings?.openingRemark || ""), $g = computed(() => i.resources?.length ? i.resources : flattenResources(I?.agent.info.value?.resources)), e_ = computed(() => i.prompts?.length ? i.prompts : I?.agent.info.value?.conversationSettings?.predefinedQuestions ?? []), t_ = computed(() => ({
27826
+ }) : null, Jg = new ShortcutManager(null, i.shortcuts || []), Yg = shallowRef([[]]), Xg = ref(""), Zg = computed(() => qg?.messages.value ?? []), Qg = computed(() => qg?.isMessagesLoading.value ?? !1), $g = computed(() => qg?.isGenerating.value ?? !1), e_ = computed(() => Gg?.currentSession.value ?? null), t_ = computed(() => Hg && !j.value ? !1 : !Qg.value && Zg.value.length === 0), n_ = computed(() => z?.agent.info.value?.conversationSettings?.openingRemark || ""), r_ = computed(() => i.resources?.length ? i.resources : flattenResources(z?.agent.info.value?.resources)), i_ = computed(() => i.prompts?.length ? i.prompts : z?.agent.info.value?.conversationSettings?.predefinedQuestions ?? []), a_ = computed(() => ({
27821
27827
  height: typeof i.height == "number" ? `${i.height}px` : i.height,
27822
27828
  maxWidth: typeof i.maxWidth == "number" ? `${i.maxWidth}px` : i.maxWidth
27823
- })), n_ = computed(() => {
27824
- let e = Ug.shortcuts.value;
27829
+ })), c_ = computed(() => {
27830
+ let e = Jg.shortcuts.value;
27825
27831
  return i.shortcutLimit && e.length > i.shortcutLimit ? e.slice(0, i.shortcutLimit) : e;
27826
- }), r_ = () => {
27827
- T.value = [], a("cancel-share");
27828
- }, i_ = () => {
27829
- a("confirm-share", T.value);
27830
- }, a_ = (e) => {
27831
- e ? T.value = qg.value : T.value = [];
27832
- }, s_ = Ug.effectiveShortcuts;
27832
+ }), l_ = () => {
27833
+ T.value = [], Hg && (O.value = !1), a("cancel-share");
27834
+ }, u_ = async () => {
27835
+ let e = T.value;
27836
+ Hg && await d_(e), a("confirm-share", e);
27837
+ }, d_ = async (e) => {
27838
+ if (!z || e.length === 0) return;
27839
+ let n = z.session.current?.value?.sessionCode;
27840
+ if (!n) {
27841
+ console.error("[ChatBot] Cannot share: no active session");
27842
+ return;
27843
+ }
27844
+ k.value = !0;
27845
+ try {
27846
+ let r = await z.message.shareMessages(n, e);
27847
+ r && (await copyToClipboard(`${r.share_page}share-page/${r.share_token}`), Message({
27848
+ message: "分享链接已复制到剪贴板",
27849
+ theme: "success"
27850
+ }));
27851
+ } catch (e) {
27852
+ console.error("[ChatBot] Failed to share messages:", e), Message({
27853
+ message: "分享失败,请重试",
27854
+ theme: "error"
27855
+ });
27856
+ } finally {
27857
+ k.value = !1, O.value = !1, T.value = [];
27858
+ }
27859
+ }, f_ = (e) => {
27860
+ e ? T.value = Zg.value : T.value = [];
27861
+ }, p_ = Jg.effectiveShortcuts;
27833
27862
  watch(() => i.shortcuts, (e) => {
27834
- Ug.setShortcuts(e || []);
27835
- }, { immediate: !0 }), watch(() => I?.agent.info.value?.conversationSettings?.commands, (e) => {
27836
- e && Ug.setAgentShortcuts(e);
27863
+ Jg.setShortcuts(e || []);
27864
+ }, { immediate: !0 }), watch(() => z?.agent.info.value?.conversationSettings?.commands, (e) => {
27865
+ e && Jg.setAgentShortcuts(e);
27837
27866
  }, { immediate: !0 });
27838
- let c_ = async () => {
27867
+ let m_ = async () => {
27839
27868
  await nextTick(), s.value && (s.value.scrollTop = s.value.scrollHeight);
27840
- }, l_ = async (e, n = {}) => {
27841
- if (!Hg || !I) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
27842
- let r = I.session.current?.value?.sessionCode;
27869
+ }, h_ = async (e, n = {}) => {
27870
+ if (!qg || !z) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
27871
+ let r = z.session.current?.value?.sessionCode;
27843
27872
  if (!r) throw Error("[ChatBot] Cannot send message: no active session");
27844
- Wg.value = [[]], Gg.value = "", a("send-message", typeof e == "string" ? e : ""), await Hg.sendMessage(e, r, n);
27845
- }, u_ = async (e) => {
27846
- let n = I?.session.current?.value?.sessionCode;
27873
+ Yg.value = [[]], Xg.value = "", a("send-message", typeof e == "string" ? e : ""), await qg.sendMessage(e, r, n);
27874
+ }, g_ = async (e) => {
27875
+ let n = z?.session.current?.value?.sessionCode;
27847
27876
  if (!n) throw Error("[ChatBot] Cannot upload: no active session");
27848
- let r = await I.session.uploadFile(n, e);
27877
+ let r = await z.session.uploadFile(n, e);
27849
27878
  if (!r?.download_url) throw Error("[ChatBot] Upload failed: no download URL returned");
27850
27879
  return r;
27851
- }, d_ = async (e, n) => {
27880
+ }, v_ = async (e, n) => {
27852
27881
  try {
27853
- await l_(e, Gg.value ? { property: { extra: { cite: Gg.value } } } : {});
27882
+ await h_(e, Xg.value ? { property: { extra: { cite: Xg.value } } } : {});
27854
27883
  } catch (e) {
27855
27884
  console.error("Failed to send message:", e), a("error", e);
27856
27885
  }
27857
- }, f_ = async () => {
27858
- y_();
27859
- }, p_ = (e, n) => {
27860
- m_(e, n), a("shortcut-click", {
27886
+ }, y_ = async () => {
27887
+ O_();
27888
+ }, x_ = (e, n) => {
27889
+ w_(e, n), a("shortcut-click", {
27861
27890
  shortcut: e,
27862
27891
  source: "main"
27863
27892
  });
27864
- }, m_ = (e, n) => {
27893
+ }, w_ = (e, n) => {
27865
27894
  let r = e, i = r.components?.find((e) => e.fillBack)?.key || "input";
27866
27895
  u.value = {
27867
27896
  ...r,
@@ -27870,14 +27899,14 @@ var UIStateManager = class {
27870
27899
  [i]: n || ""
27871
27900
  }
27872
27901
  };
27873
- }, h_ = () => {
27902
+ }, T_ = () => {
27874
27903
  u.value = null;
27875
- }, g_ = (e, n) => {
27904
+ }, E_ = (e, n) => {
27876
27905
  let r = e.components || [];
27877
27906
  return { extra: {
27878
27907
  cite: {
27879
27908
  type: "structured",
27880
- title: e.name,
27909
+ title: e.alias || e.name,
27881
27910
  data: r.map((e) => ({
27882
27911
  key: e.name || e.key,
27883
27912
  value: String(n[e.key] ?? "")
@@ -27892,86 +27921,86 @@ var UIStateManager = class {
27892
27921
  __value: n[e.key]
27893
27922
  }))
27894
27923
  } };
27895
- }, v_ = async (e) => {
27924
+ }, D_ = async (e) => {
27896
27925
  if (!u.value) {
27897
27926
  console.error("[ChatBot] No selected shortcut");
27898
27927
  return;
27899
27928
  }
27900
- let n = g_(u.value, e), r = u.value.name, i = u.value;
27901
- h_();
27929
+ let n = E_(u.value, e), r = u.value.name, i = u.value;
27930
+ T_();
27902
27931
  try {
27903
- await l_(r, { property: n });
27932
+ await h_(r, { property: n });
27904
27933
  } catch (e) {
27905
27934
  u.value = i, console.error("[ChatBot] Failed to submit shortcut:", e), a("error", e);
27906
27935
  }
27907
- }, y_ = () => {
27908
- if (!Hg) {
27936
+ }, O_ = () => {
27937
+ if (!qg) {
27909
27938
  console.error("[ChatBot] Cannot stop generation: chatBusinessManager not initialized");
27910
27939
  return;
27911
27940
  }
27912
- Hg.stopGeneration(), a("stop");
27913
- }, x_ = async (e) => {
27914
- if (!Vg) {
27941
+ qg.stopGeneration(), a("stop");
27942
+ }, k_ = async (e) => {
27943
+ if (!Gg) {
27915
27944
  console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
27916
27945
  return;
27917
27946
  }
27918
27947
  try {
27919
- await Vg.switchSession(e), a("session-switched", Vg.currentSession.value);
27948
+ await Gg.switchSession(e), a("session-switched", Gg.currentSession.value);
27920
27949
  } catch (e) {
27921
27950
  console.error("Failed to switch session:", e), a("error", e);
27922
27951
  }
27923
- }, w_ = (e) => {
27924
- Gg.value = e;
27925
- }, T_ = () => {
27952
+ }, A_ = (e) => {
27953
+ Xg.value = e;
27954
+ }, j_ = () => {
27926
27955
  l.value?.focus?.();
27927
27956
  };
27928
27957
  return onMounted(async () => {
27929
- if (!(!I || k.value)) try {
27930
- if (zg) {
27931
- if (await I.agent.getAgentInfo(), await I.session.getSessions(), i.sessionCode) await I.session.chooseSession(i.sessionCode);
27932
- else if (I.session.list.value.length > 0) {
27933
- let e = I.session.list.value[0];
27934
- await I.session.chooseSession(e.sessionCode);
27958
+ if (!(!z || I.value)) try {
27959
+ if (Hg) {
27960
+ if (await z.agent.getAgentInfo(), await z.session.getSessions(), i.sessionCode) await z.session.chooseSession(i.sessionCode);
27961
+ else if (z.session.list.value.length > 0) {
27962
+ let e = z.session.list.value[0];
27963
+ await z.session.chooseSession(e.sessionCode);
27935
27964
  }
27936
- O.value = !0;
27937
- } else O.value = !0;
27938
- a("agent-info-loaded", I);
27965
+ j.value = !0;
27966
+ } else j.value = !0;
27967
+ a("agent-info-loaded", z);
27939
27968
  } catch (e) {
27940
- console.error("Failed to initialize ChatBot:", e), k.value = e, a("error", e);
27969
+ console.error("Failed to initialize ChatBot:", e), I.value = e, a("error", e);
27941
27970
  }
27942
27971
  }), onBeforeUnmount(() => {
27943
- zg && I && I.agent.stopChat(I.session.current?.value?.sessionCode ?? "");
27972
+ Hg && z && z.agent.stopChat(z.session.current?.value?.sessionCode ?? "");
27944
27973
  }), n({
27945
- sendMessage: (e) => d_(e, [[]]),
27946
- stopGeneration: y_,
27947
- switchSession: x_,
27948
- messages: qg,
27949
- currentSession: Xg,
27950
- isGenerating: Yg,
27951
- getChatHelper: () => I,
27952
- setCiteText: w_,
27953
- focusInput: T_,
27974
+ sendMessage: (e) => v_(e, [[]]),
27975
+ stopGeneration: O_,
27976
+ switchSession: k_,
27977
+ messages: Zg,
27978
+ currentSession: e_,
27979
+ isGenerating: $g,
27980
+ getChatHelper: () => z,
27981
+ setCiteText: A_,
27982
+ focusInput: j_,
27954
27983
  selectShortcut: (e, n) => {
27955
- m_(e, n);
27984
+ w_(e, n);
27956
27985
  }
27957
27986
  }), (e, n) => (openBlock(), createElementBlock("div", {
27958
27987
  class: normalizeClass([
27959
27988
  "ai-chatbot",
27960
27989
  i.extCls,
27961
- { "welcome-state": Zg.value }
27990
+ { "welcome-state": t_.value }
27962
27991
  ]),
27963
- style: normalizeStyle(t_.value)
27964
- }, [createCommentVNode(" 初始化错误提示 "), k.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("span", null, toDisplayString(k.value.message), 1)])) : zg && !O.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 独立模式:初始化中(getAgentInfo → getSessions → chooseSession)统一展示 Loading "), createElementVNode("div", _hoisted_2$1, [createVNode(unref(Loading), {
27992
+ style: normalizeStyle(a_.value)
27993
+ }, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("span", null, toDisplayString(I.value.message), 1)])) : Hg && !j.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 独立模式:初始化中(getAgentInfo → getSessions → chooseSession)统一展示 Loading "), createElementVNode("div", _hoisted_2$1, [createVNode(unref(Loading), {
27965
27994
  mode: "spin",
27966
27995
  size: "small",
27967
27996
  theme: "primary"
27968
27997
  })])], 2112)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
27969
27998
  createCommentVNode(" 内容区:欢迎状态 "),
27970
- Zg.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [n[3] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1), Qg.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(unref(content_render_default), { content: Qg.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 内容区:消息列表 "), createElementVNode("div", {
27999
+ t_.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [n[3] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1), n_.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(unref(content_render_default), { content: n_.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 内容区:消息列表 "), createElementVNode("div", {
27971
28000
  ref_key: "messagesContainerRef",
27972
28001
  ref: s,
27973
28002
  class: "chatbot-messages"
27974
- }, [Jg.value ? (openBlock(), createElementBlock("div", _hoisted_6, [createVNode(unref(Loading), {
28003
+ }, [Qg.value ? (openBlock(), createElementBlock("div", _hoisted_6, [createVNode(unref(Loading), {
27975
28004
  mode: "spin",
27976
28005
  size: "small",
27977
28006
  theme: "primary"
@@ -27979,16 +28008,16 @@ var UIStateManager = class {
27979
28008
  key: 1,
27980
28009
  "selected-messages": T.value,
27981
28010
  "onUpdate:selectedMessages": n[0] ||= (e) => T.value = e,
27982
- "enable-selection": i.enableSelection,
27983
- "message-status": L.value,
27984
- "message-tools-status": z.value,
27985
- messages: qg.value,
27986
- "on-agent-action": B,
27987
- "on-agent-feedback": H,
27988
- "on-user-action": Q,
27989
- "on-user-input-confirm": $,
27990
- "on-user-shortcut-confirm": jg,
27991
- onStopStreaming: Ig
28011
+ "enable-selection": Ug.value,
28012
+ "message-status": B.value,
28013
+ "message-tools-status": H.value,
28014
+ messages: Zg.value,
28015
+ "on-agent-action": K,
28016
+ "on-agent-feedback": kg,
28017
+ "on-user-action": jg,
28018
+ "on-user-input-confirm": Ng,
28019
+ "on-user-shortcut-confirm": Pg,
28020
+ onStopStreaming: Vg
27992
28021
  }, null, 8, [
27993
28022
  "selected-messages",
27994
28023
  "enable-selection",
@@ -27997,38 +28026,38 @@ var UIStateManager = class {
27997
28026
  "messages"
27998
28027
  ]))], 512)], 2112)),
27999
28028
  createCommentVNode(" 统一底部区域 "),
28000
- !Zg.value && i.enableSelection ? (openBlock(), createBlock(selection_footer_default, {
28029
+ !t_.value && Ug.value ? (openBlock(), createBlock(selection_footer_default, {
28001
28030
  key: 2,
28002
- "is-all-selected": T.value.length === qg.value.length,
28003
- loading: i.shareLoading,
28031
+ "is-all-selected": T.value.length === Zg.value.length,
28032
+ loading: Wg.value,
28004
28033
  "selected-count": T.value.length,
28005
- onCancel: r_,
28006
- onConfirm: i_,
28007
- onToggleAll: a_
28034
+ onCancel: l_,
28035
+ onConfirm: u_,
28036
+ onToggleAll: f_
28008
28037
  }, null, 8, [
28009
28038
  "is-all-selected",
28010
28039
  "loading",
28011
28040
  "selected-count"
28012
28041
  ])) : (openBlock(), createElementBlock("div", _hoisted_7, [u.value?.components?.length ? (openBlock(), createBlock(unref(shortcut_render_default), mergeProps({ key: 0 }, u.value, {
28013
- onClose: h_,
28014
- onSubmit: v_
28042
+ onClose: T_,
28043
+ onSubmit: D_
28015
28044
  }), null, 16)) : renderSlot(e.$slots, "input", { key: 1 }, () => [createVNode(unref(chat_input_default), {
28016
28045
  ref_key: "chatInputRef",
28017
28046
  ref: l,
28018
- modelValue: Wg.value,
28019
- "onUpdate:modelValue": n[1] ||= (e) => Wg.value = e,
28020
- cite: Gg.value,
28021
- "onUpdate:cite": n[2] ||= (e) => Gg.value = e,
28022
- "message-status": L.value,
28023
- "on-send-message": d_,
28024
- "on-stop-sending": f_,
28025
- "on-upload": u_,
28047
+ modelValue: Yg.value,
28048
+ "onUpdate:modelValue": n[1] ||= (e) => Yg.value = e,
28049
+ cite: Xg.value,
28050
+ "onUpdate:cite": n[2] ||= (e) => Xg.value = e,
28051
+ "message-status": B.value,
28052
+ "on-send-message": v_,
28053
+ "on-stop-sending": y_,
28054
+ "on-upload": g_,
28026
28055
  placeholder: i.placeholder,
28027
- prompts: e_.value,
28028
- resources: $g.value,
28056
+ prompts: i_.value,
28057
+ resources: r_.value,
28029
28058
  "shortcut-id": u.value?.id,
28030
- shortcuts: n_.value,
28031
- onSelectShortcut: p_
28059
+ shortcuts: c_.value,
28060
+ onSelectShortcut: x_
28032
28061
  }, null, 8, [
28033
28062
  "modelValue",
28034
28063
  "cite",
@@ -29523,7 +29552,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29523
29552
  onRequestShare: m_,
29524
29553
  onSendMessage: n[2] ||= (e) => v_(e),
29525
29554
  onSessionSwitched: n[3] ||= (e) => D_(e),
29526
- onShortcutClick: n[4] ||= (e) => Qg(e),
29555
+ onShortcutClick: Qg,
29527
29556
  onStop: S_
29528
29557
  }, null, 8, [
29529
29558
  "auto-load",
@@ -29556,9 +29585,9 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29556
29585
  i.hideNimbus ? createCommentVNode("v-if", !0) : (openBlock(), createBlock(nimbus_default, {
29557
29586
  key: 0,
29558
29587
  "is-minimize": unref(O),
29559
- "onUpdate:isMinimize": n[5] ||= (e) => isRef(O) ? O.value = e : null,
29588
+ "onUpdate:isMinimize": n[4] ||= (e) => isRef(O) ? O.value = e : null,
29560
29589
  "is-panel-show": unref(T),
29561
- "onUpdate:isPanelShow": n[6] ||= (e) => isRef(T) ? T.value = e : null,
29590
+ "onUpdate:isPanelShow": n[5] ||= (e) => isRef(T) ? T.value = e : null,
29562
29591
  "default-minimize": i.defaultMinimize,
29563
29592
  size: i.nimbusSize,
29564
29593
  onClick: Jg
@@ -29572,7 +29601,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29572
29601
  i.enablePopup ? (openBlock(), createBlock(unref(ai_selection_default), {
29573
29602
  key: 1,
29574
29603
  visible: Ng.value,
29575
- "onUpdate:visible": n[7] ||= (e) => Ng.value = e,
29604
+ "onUpdate:visible": n[6] ||= (e) => Ng.value = e,
29576
29605
  "max-shortcut-count": i.shortcutLimit,
29577
29606
  shortcuts: Ug.value,
29578
29607
  onSelectShortcut: Zg,
@@ -29584,5 +29613,5 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
29584
29613
  ])) : createCommentVNode("v-if", !0)
29585
29614
  ], 2)], 8, ["to"]));
29586
29615
  }
29587
- }), [["__scopeId", "data-v-390ddb5e"]]);
29616
+ }), [["__scopeId", "data-v-1e6f3686"]]);
29588
29617
  export { AGUIProtocol, ai_blueking_default as AIBlueking, ai_blueking_default as default, BluekingProtocol, BootstrapPhase, chat_bot_default as ChatBot, ChatBusinessManager, ComponentManager, draggable_container_default as DraggableContainer, MessageContentType, SessionBusinessManager, ShortcutManager, UIStateManager, createBluekingProtocol, createComponentManager, defaultProps, useChatBootstrap, useChatHelper, useDraggable };