@opentiny/tiny-robot 0.4.2-alpha.5 → 0.4.2-alpha.7
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.
- package/dist/action-group/index.js +4 -4
- package/dist/anchor/index.js +44 -44
- package/dist/drag-overlay/index.js +1 -1
- package/dist/dropdown-menu/index.js +1 -1
- package/dist/index.d.ts +5018 -49
- package/dist/index.js +3 -3
- package/dist/index2.js +2 -2
- package/dist/index4.js +20 -20
- package/dist/index6.js +142 -143
- package/dist/index7.js +28 -28
- package/dist/index8.js +8 -8
- package/dist/sender/index.js +2 -2
- package/dist/sender-actions/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +1 -1
- package/dist/suggestion-popover/index.js +1 -1
- package/dist/theme-provider/index.js +41 -32
- package/dist/useSlotRefs.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +3 -22
- package/dist/action-group/ActionGroup.vue.d.ts +0 -26
- package/dist/action-group/ActionGroupItem.vue.d.ts +0 -18
- package/dist/action-group/index.d.ts +0 -12
- package/dist/action-group/index.type.d.ts +0 -17
- package/dist/anchor/components/AnchorItem.vue.d.ts +0 -24
- package/dist/anchor/components/AnchorList.vue.d.ts +0 -20
- package/dist/anchor/components/AnchorOverlay.vue.d.ts +0 -33
- package/dist/anchor/components/AnchorSearch.vue.d.ts +0 -7
- package/dist/anchor/composables/index.d.ts +0 -5
- package/dist/anchor/composables/useActiveSync.d.ts +0 -10
- package/dist/anchor/composables/useFloatingOffset.d.ts +0 -6
- package/dist/anchor/composables/useNavController.d.ts +0 -12
- package/dist/anchor/composables/useOverlayInteractions.d.ts +0 -6
- package/dist/anchor/composables/useTargetFeedback.d.ts +0 -5
- package/dist/anchor/defaults.d.ts +0 -16
- package/dist/anchor/index.d.ts +0 -7
- package/dist/anchor/index.type.d.ts +0 -60
- package/dist/anchor/index.vue.d.ts +0 -159
- package/dist/anchor/internal.type.d.ts +0 -103
- package/dist/anchor/utils/scroll.d.ts +0 -7
- package/dist/anchor/utils/target.d.ts +0 -6
- package/dist/attachments/components/FileCard.vue.d.ts +0 -18
- package/dist/attachments/components/ImagePreview.vue.d.ts +0 -17
- package/dist/attachments/components/index.d.ts +0 -2
- package/dist/attachments/composables/index.d.ts +0 -5
- package/dist/attachments/composables/useFileCard.d.ts +0 -15
- package/dist/attachments/composables/useFileType.d.ts +0 -20
- package/dist/attachments/composables/useImagePreview.d.ts +0 -18
- package/dist/attachments/composables/useListType.d.ts +0 -11
- package/dist/attachments/index.d.ts +0 -7
- package/dist/attachments/index.type.d.ts +0 -70
- package/dist/attachments/index.vue.d.ts +0 -27
- package/dist/attachments/utils.d.ts +0 -3
- package/dist/base-popper/components/Popper.vue.d.ts +0 -28
- package/dist/base-popper/index.d.ts +0 -2
- package/dist/base-popper/index.vue.d.ts +0 -41
- package/dist/bubble/Bubble.vue.d.ts +0 -39
- package/dist/bubble/BubbleBoxWrapper.vue.d.ts +0 -22
- package/dist/bubble/BubbleContentWrapper.vue.d.ts +0 -16
- package/dist/bubble/BubbleItem.vue.d.ts +0 -36
- package/dist/bubble/BubbleList.vue.d.ts +0 -41
- package/dist/bubble/BubbleProvider.vue.d.ts +0 -18
- package/dist/bubble/composables/index.d.ts +0 -10
- package/dist/bubble/composables/useBubbleBoxRenderer.d.ts +0 -18
- package/dist/bubble/composables/useBubbleContentRenderer.d.ts +0 -18
- package/dist/bubble/composables/useBubbleStateChange.d.ts +0 -2
- package/dist/bubble/composables/useBubbleStore.d.ts +0 -16
- package/dist/bubble/composables/useContentResolver.d.ts +0 -5
- package/dist/bubble/composables/useCopyCleanup.d.ts +0 -6
- package/dist/bubble/composables/useMessageContent.d.ts +0 -5
- package/dist/bubble/composables/useMessageGroup.d.ts +0 -4
- package/dist/bubble/composables/useOmitMessageFields.d.ts +0 -12
- package/dist/bubble/composables/useToolCall.d.ts +0 -25
- package/dist/bubble/constants.d.ts +0 -42
- package/dist/bubble/index.d.ts +0 -19
- package/dist/bubble/index.type.d.ts +0 -171
- package/dist/bubble/renderers/Box.vue.d.ts +0 -18
- package/dist/bubble/renderers/Image.vue.d.ts +0 -4
- package/dist/bubble/renderers/Loading.vue.d.ts +0 -4
- package/dist/bubble/renderers/Markdown.vue.d.ts +0 -4
- package/dist/bubble/renderers/Reasoning.vue.d.ts +0 -9
- package/dist/bubble/renderers/Text.vue.d.ts +0 -4
- package/dist/bubble/renderers/Tool.vue.d.ts +0 -14
- package/dist/bubble/renderers/ToolRole.vue.d.ts +0 -4
- package/dist/bubble/renderers/Tools.vue.d.ts +0 -4
- package/dist/bubble/renderers/allRenderers.d.ts +0 -93
- package/dist/bubble/renderers/defaultRenderers.d.ts +0 -27
- package/dist/bubble/utils.d.ts +0 -7
- package/dist/chat/components/ChatConversation.vue.d.ts +0 -70
- package/dist/chat/components/ChatLauncherButton.vue.d.ts +0 -12
- package/dist/chat/components/ChatMcpTrigger.vue.d.ts +0 -30
- package/dist/chat/components/ChatThemeToggleButton.vue.d.ts +0 -2
- package/dist/chat/components/ChatWelcome.vue.d.ts +0 -13
- package/dist/chat/composables/useChatConversation.d.ts +0 -37
- package/dist/chat/composables/useChatMcp.d.ts +0 -29
- package/dist/chat/composables/useChatModel.d.ts +0 -27
- package/dist/chat/index.d.ts +0 -9
- package/dist/chat/index.js +0 -13701
- package/dist/chat/index.type.d.ts +0 -88
- package/dist/chat/index.vue.d.ts +0 -58
- package/dist/container/index.d.ts +0 -7
- package/dist/container/index.type.d.ts +0 -20
- package/dist/container/index.vue.d.ts +0 -32
- package/dist/conversations/index.d.ts +0 -7
- package/dist/conversations/index.vue.d.ts +0 -2
- package/dist/drag-overlay/constants.d.ts +0 -17
- package/dist/drag-overlay/directives/vDropzone.d.ts +0 -14
- package/dist/drag-overlay/index.d.ts +0 -7
- package/dist/drag-overlay/index.type.d.ts +0 -105
- package/dist/drag-overlay/index.vue.d.ts +0 -20
- package/dist/dropdown-menu/composables/usePopperHover.d.ts +0 -6
- package/dist/dropdown-menu/index.d.ts +0 -7
- package/dist/dropdown-menu/index.type.d.ts +0 -42
- package/dist/dropdown-menu/index.vue.d.ts +0 -217
- package/dist/feedback/components/SourceList.vue.d.ts +0 -11
- package/dist/feedback/components/index.d.ts +0 -1
- package/dist/feedback/index.d.ts +0 -7
- package/dist/feedback/index.type.d.ts +0 -25
- package/dist/feedback/index.vue.d.ts +0 -13
- package/dist/flow-layout-buttons/index.d.ts +0 -7
- package/dist/flow-layout-buttons/index.type.d.ts +0 -35
- package/dist/flow-layout-buttons/index.vue.d.ts +0 -22
- package/dist/history/components/Empty.vue.d.ts +0 -7
- package/dist/history/components/MenuList.vue.d.ts +0 -24
- package/dist/history/composables/useRenameEditor.d.ts +0 -22
- package/dist/history/constants.d.ts +0 -1
- package/dist/history/index.d.ts +0 -7
- package/dist/history/index.type.d.ts +0 -33
- package/dist/history/index.vue.d.ts +0 -18
- package/dist/icon-button/index.d.ts +0 -7
- package/dist/icon-button/index.type.d.ts +0 -7
- package/dist/icon-button/index.vue.d.ts +0 -6
- package/dist/mcp-add-form/components/CodeEditor.vue.d.ts +0 -9
- package/dist/mcp-add-form/components/FormEditor.vue.d.ts +0 -10
- package/dist/mcp-add-form/components/index.d.ts +0 -2
- package/dist/mcp-add-form/index.d.ts +0 -7
- package/dist/mcp-add-form/index.type.d.ts +0 -19
- package/dist/mcp-add-form/index.vue.d.ts +0 -13
- package/dist/mcp-server-picker/components/NoData.vue.d.ts +0 -7
- package/dist/mcp-server-picker/components/PluginCard.vue.d.ts +0 -40
- package/dist/mcp-server-picker/components/PluginModal.vue.d.ts +0 -15
- package/dist/mcp-server-picker/components/index.d.ts +0 -3
- package/dist/mcp-server-picker/index.d.ts +0 -7
- package/dist/mcp-server-picker/index.type.d.ts +0 -99
- package/dist/mcp-server-picker/index.vue.d.ts +0 -71
- package/dist/prompts/index.d.ts +0 -12
- package/dist/prompts/index.type.d.ts +0 -59
- package/dist/prompts/prompt.vue.d.ts +0 -5
- package/dist/prompts/prompts.vue.d.ts +0 -20
- package/dist/sender/components/editor-content/index.vue.d.ts +0 -4
- package/dist/sender/components/footer/index.vue.d.ts +0 -38
- package/dist/sender/components/layouts/MultiLineLayout.vue.d.ts +0 -43
- package/dist/sender/components/layouts/SingleLineLayout.vue.d.ts +0 -32
- package/dist/sender/composables/index.d.ts +0 -7
- package/dist/sender/composables/useAutoSize.d.ts +0 -5
- package/dist/sender/composables/useEditor.d.ts +0 -13
- package/dist/sender/composables/useKeyboardShortcuts.d.ts +0 -7
- package/dist/sender/composables/useModeSwitch.d.ts +0 -4
- package/dist/sender/composables/useSenderCore.d.ts +0 -31
- package/dist/sender/composables/useSlotScope.d.ts +0 -10
- package/dist/sender/context/index.d.ts +0 -6
- package/dist/sender/context/types.d.ts +0 -7
- package/dist/sender/extensions/constants.d.ts +0 -94
- package/dist/sender/extensions/index.d.ts +0 -12
- package/dist/sender/extensions/mention/commands.d.ts +0 -20
- package/dist/sender/extensions/mention/components/mention-list.vue.d.ts +0 -18
- package/dist/sender/extensions/mention/components/mention-view.vue.d.ts +0 -19
- package/dist/sender/extensions/mention/extension.d.ts +0 -6
- package/dist/sender/extensions/mention/index.d.ts +0 -22
- package/dist/sender/extensions/mention/plugin.d.ts +0 -16
- package/dist/sender/extensions/mention/types.d.ts +0 -126
- package/dist/sender/extensions/mention/utils.d.ts +0 -34
- package/dist/sender/extensions/suggestion/extension.d.ts +0 -8
- package/dist/sender/extensions/suggestion/index.d.ts +0 -20
- package/dist/sender/extensions/suggestion/plugin.d.ts +0 -21
- package/dist/sender/extensions/suggestion/suggestion-list.vue.d.ts +0 -46
- package/dist/sender/extensions/suggestion/types.d.ts +0 -254
- package/dist/sender/extensions/suggestion/utils/filter.d.ts +0 -29
- package/dist/sender/extensions/suggestion/utils/highlight.d.ts +0 -73
- package/dist/sender/extensions/template/block/extension.d.ts +0 -6
- package/dist/sender/extensions/template/block/plugins.d.ts +0 -13
- package/dist/sender/extensions/template/block/template-block-view.vue.d.ts +0 -14
- package/dist/sender/extensions/template/commands.d.ts +0 -31
- package/dist/sender/extensions/template/extension.d.ts +0 -6
- package/dist/sender/extensions/template/index.d.ts +0 -21
- package/dist/sender/extensions/template/select/dropdown-manager.d.ts +0 -23
- package/dist/sender/extensions/template/select/extension.d.ts +0 -5
- package/dist/sender/extensions/template/select/plugins.d.ts +0 -34
- package/dist/sender/extensions/template/select/template-select-view.vue.d.ts +0 -20
- package/dist/sender/extensions/template/types.d.ts +0 -100
- package/dist/sender/extensions/template/utils.d.ts +0 -20
- package/dist/sender/extensions/utils/id-generator.d.ts +0 -16
- package/dist/sender/extensions/utils/index.d.ts +0 -7
- package/dist/sender/extensions/utils/keyboard.d.ts +0 -49
- package/dist/sender/extensions/utils/position.d.ts +0 -25
- package/dist/sender/index.d.ts +0 -136
- package/dist/sender/index.type.d.ts +0 -302
- package/dist/sender/index.vue.d.ts +0 -90
- package/dist/sender/types/base.d.ts +0 -239
- package/dist/sender/types/components.d.ts +0 -68
- package/dist/sender/types/composables.d.ts +0 -122
- package/dist/sender/types/context.d.ts +0 -132
- package/dist/sender/types/slots.d.ts +0 -67
- package/dist/sender/utils/countGraphemes.d.ts +0 -1
- package/dist/sender-actions/action-button/index.vue.d.ts +0 -23
- package/dist/sender-actions/clear-button/index.vue.d.ts +0 -2
- package/dist/sender-actions/clear-button/useClearButtonState.d.ts +0 -6
- package/dist/sender-actions/default-actions/index.vue.d.ts +0 -17
- package/dist/sender-actions/index.d.ts +0 -21
- package/dist/sender-actions/index.type.d.ts +0 -7
- package/dist/sender-actions/submit-button/index.vue.d.ts +0 -2
- package/dist/sender-actions/types/common.d.ts +0 -40
- package/dist/sender-actions/types/index.d.ts +0 -5
- package/dist/sender-actions/types/tooltip.d.ts +0 -7
- package/dist/sender-actions/upload-button/index.type.d.ts +0 -57
- package/dist/sender-actions/upload-button/index.vue.d.ts +0 -16
- package/dist/sender-actions/utils/tooltip.d.ts +0 -8
- package/dist/sender-actions/voice-button/index.type.d.ts +0 -78
- package/dist/sender-actions/voice-button/index.vue.d.ts +0 -43
- package/dist/sender-actions/voice-button/speech.types.d.ts +0 -40
- package/dist/sender-actions/voice-button/useSpeechHandler.d.ts +0 -10
- package/dist/sender-actions/voice-button/webSpeechHandler.d.ts +0 -40
- package/dist/sender-actions/word-counter/index.vue.d.ts +0 -2
- package/dist/sender-compat/index.d.ts +0 -7
- package/dist/sender-compat/index.type.d.ts +0 -91
- package/dist/sender-compat/index.vue.d.ts +0 -532
- package/dist/shared/composables/createTeleport.d.ts +0 -2
- package/dist/shared/composables/index.d.ts +0 -5
- package/dist/shared/composables/useAutoScroll.d.ts +0 -25
- package/dist/shared/composables/useSlotRefs.d.ts +0 -12
- package/dist/shared/composables/useTeleportTarget.d.ts +0 -11
- package/dist/shared/composables/useTouchDevice.d.ts +0 -3
- package/dist/shared/utils.d.ts +0 -7
- package/dist/suggestion-pills/components/PillButton.vue.d.ts +0 -16
- package/dist/suggestion-pills/components/index.d.ts +0 -1
- package/dist/suggestion-pills/index.d.ts +0 -13
- package/dist/suggestion-pills/index.type.d.ts +0 -45
- package/dist/suggestion-pills/index.vue.d.ts +0 -44
- package/dist/suggestion-popover/components/Backdrop.vue.d.ts +0 -5
- package/dist/suggestion-popover/components/Header.vue.d.ts +0 -4
- package/dist/suggestion-popover/components/Loading.vue.d.ts +0 -17
- package/dist/suggestion-popover/components/NoData.vue.d.ts +0 -17
- package/dist/suggestion-popover/components/Tooltip.vue.d.ts +0 -19
- package/dist/suggestion-popover/index.d.ts +0 -7
- package/dist/suggestion-popover/index.type.d.ts +0 -80
- package/dist/suggestion-popover/index.vue.d.ts +0 -262
- package/dist/theme-provider/constants.d.ts +0 -6
- package/dist/theme-provider/index.d.ts +0 -9
- package/dist/theme-provider/index.type.d.ts +0 -18
- package/dist/theme-provider/index.vue.d.ts +0 -32
- package/dist/theme-provider/useTheme.d.ts +0 -11
- package/dist/useTheme.js +0 -22
- package/dist/welcome/index.d.ts +0 -7
- package/dist/welcome/index.type.d.ts +0 -10
- package/dist/welcome/index.vue.d.ts +0 -18
package/dist/index6.js
CHANGED
|
@@ -1,7 +1,60 @@
|
|
|
1
|
-
import { defineComponent as S, openBlock as g, createElementBlock as C, renderSlot as E,
|
|
1
|
+
import { ref as L, watch as U, toValue as k, onMounted as ve, onUnmounted as We, nextTick as ee, defineComponent as S, openBlock as g, createElementBlock as C, renderSlot as E, computed as y, unref as B, normalizeClass as K, createVNode as j, watchEffect as q, Fragment as F, createElementVNode as x, mergeProps as $, toDisplayString as z, withDirectives as Z, vShow as Q, createBlock as T, resolveDynamicComponent as Y, normalizeProps as P, guardReactiveProps as D, createCommentVNode as se, useCssModule as je, renderList as W, markRaw as w, inject as I, provide as A, reactive as ze, readonly as Ve, withCtx as M } from "vue";
|
|
2
2
|
import { _ as N } from "./_plugin-vue_export-helper.js";
|
|
3
3
|
import { IconLoading as he, IconAtom as Xe, IconArrowDown as ye, IconPlugin as be, IconError as qe, IconCancelled as Ze } from "@opentiny/tiny-robot-svgs";
|
|
4
|
-
import {
|
|
4
|
+
import { l as Qe, w as et, g as tt, a as nt } from "./index4.js";
|
|
5
|
+
function fe(t, e) {
|
|
6
|
+
const n = U(t, (o, r) => {
|
|
7
|
+
r === !0 && o === !1 && (e(), n());
|
|
8
|
+
});
|
|
9
|
+
return n;
|
|
10
|
+
}
|
|
11
|
+
function ot(t, e, n) {
|
|
12
|
+
const { scrollOnMount: o = !0, bottomThreshold: r = 20, scrollThrottle: i = 0 } = n ?? {}, s = L(!0);
|
|
13
|
+
let a = !1;
|
|
14
|
+
const u = /* @__PURE__ */ new Set(), b = () => nt(t), { y: m, isScrolling: p, arrivedState: f } = Qe(b, { throttle: i }), l = (c) => c.scrollHeight - c.scrollTop - c.clientHeight <= r, d = async (c = "auto") => {
|
|
15
|
+
const _ = k(b);
|
|
16
|
+
if (_ && (await ee(), _.scrollTo({ top: _.scrollHeight, behavior: c }), c === "smooth" && !l(_))) {
|
|
17
|
+
const v = fe(p, () => {
|
|
18
|
+
_.scrollTo({ top: _.scrollHeight, behavior: "auto" }), u.delete(v);
|
|
19
|
+
});
|
|
20
|
+
u.add(v);
|
|
21
|
+
}
|
|
22
|
+
}, h = () => {
|
|
23
|
+
a || !s.value || (a = !0, requestAnimationFrame(async () => {
|
|
24
|
+
a = !1, await d("auto");
|
|
25
|
+
}));
|
|
26
|
+
};
|
|
27
|
+
return U(
|
|
28
|
+
m,
|
|
29
|
+
() => {
|
|
30
|
+
const c = k(b);
|
|
31
|
+
c && (s.value = l(c));
|
|
32
|
+
},
|
|
33
|
+
{ flush: "post" }
|
|
34
|
+
), et(
|
|
35
|
+
e,
|
|
36
|
+
() => {
|
|
37
|
+
h();
|
|
38
|
+
},
|
|
39
|
+
{ flush: "post", throttle: 100 }
|
|
40
|
+
), ve(() => {
|
|
41
|
+
o && d("smooth");
|
|
42
|
+
}), We(() => {
|
|
43
|
+
u.forEach((c) => {
|
|
44
|
+
c();
|
|
45
|
+
}), u.clear();
|
|
46
|
+
}), tt("keydown", (c) => {
|
|
47
|
+
if (c.key === "End" && !s.value) {
|
|
48
|
+
const _ = fe(p, () => {
|
|
49
|
+
d("auto"), u.delete(_);
|
|
50
|
+
});
|
|
51
|
+
u.add(_);
|
|
52
|
+
}
|
|
53
|
+
}), {
|
|
54
|
+
scrollToBottom: d,
|
|
55
|
+
arrivedState: f
|
|
56
|
+
};
|
|
57
|
+
}
|
|
5
58
|
const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matches"), Be = Symbol("bubble-box-fallback-renderer"), Ce = Symbol("bubble-box-attributes"), Ee = Symbol(
|
|
6
59
|
"bubble-box-prop-fallback-renderer"
|
|
7
60
|
), ke = Symbol("bubble-content-renderer-matches"), Se = Symbol(
|
|
@@ -13,21 +66,21 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
13
66
|
NORMAL: 0,
|
|
14
67
|
CONTENT: 10,
|
|
15
68
|
ROLE: 20
|
|
16
|
-
},
|
|
69
|
+
}, st = {
|
|
17
70
|
class: "tr-bubble__box",
|
|
18
71
|
"data-box-type": "box"
|
|
19
|
-
},
|
|
72
|
+
}, rt = /* @__PURE__ */ S({
|
|
20
73
|
__name: "Box",
|
|
21
74
|
props: {
|
|
22
75
|
placement: {},
|
|
23
76
|
shape: {}
|
|
24
77
|
},
|
|
25
78
|
setup(t) {
|
|
26
|
-
return (e, n) => (g(), C("div",
|
|
79
|
+
return (e, n) => (g(), C("div", st, [
|
|
27
80
|
E(e.$slots, "default", {}, void 0, !0)
|
|
28
81
|
]));
|
|
29
82
|
}
|
|
30
|
-
}), re = /* @__PURE__ */ N(
|
|
83
|
+
}), re = /* @__PURE__ */ N(rt, [["__scopeId", "data-v-98101726"]]), at = ["src", "alt"], lt = /* @__PURE__ */ S({
|
|
31
84
|
__name: "Image",
|
|
32
85
|
props: {
|
|
33
86
|
message: {},
|
|
@@ -53,24 +106,24 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
53
106
|
onLoad: s,
|
|
54
107
|
onError: a,
|
|
55
108
|
"data-type": "image"
|
|
56
|
-
}, null, 42,
|
|
109
|
+
}, null, 42, at);
|
|
57
110
|
};
|
|
58
111
|
}
|
|
59
|
-
}), Me = /* @__PURE__ */ N(
|
|
112
|
+
}), Me = /* @__PURE__ */ N(lt, [["__scopeId", "data-v-e59794cb"]]), ct = {
|
|
60
113
|
class: "tr-bubble__loading",
|
|
61
114
|
"data-type": "loading"
|
|
62
|
-
},
|
|
115
|
+
}, ut = /* @__PURE__ */ S({
|
|
63
116
|
__name: "Loading",
|
|
64
117
|
props: {
|
|
65
118
|
message: {},
|
|
66
119
|
contentIndex: {}
|
|
67
120
|
},
|
|
68
121
|
setup(t) {
|
|
69
|
-
return (e, n) => (g(), C("div",
|
|
70
|
-
|
|
122
|
+
return (e, n) => (g(), C("div", ct, [
|
|
123
|
+
j(B(he))
|
|
71
124
|
]));
|
|
72
125
|
}
|
|
73
|
-
}), $e = /* @__PURE__ */ N(
|
|
126
|
+
}), $e = /* @__PURE__ */ N(ut, [["__scopeId", "data-v-bc1b5ff4"]]), it = { class: "title" }, dt = { class: "detail" }, bt = /* @__PURE__ */ S({
|
|
74
127
|
inheritAttrs: !1,
|
|
75
128
|
__name: "Reasoning",
|
|
76
129
|
props: {
|
|
@@ -110,14 +163,14 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
110
163
|
x("div", {
|
|
111
164
|
class: K(["icon-and-text", { thinking: (p = e.message.state) == null ? void 0 : p.thinking }])
|
|
112
165
|
}, [
|
|
113
|
-
|
|
114
|
-
x("span",
|
|
166
|
+
j(B(Xe)),
|
|
167
|
+
x("span", it, z((f = e.message.state) != null && f.thinking ? "正在思考" : "已思考"), 1)
|
|
115
168
|
], 2),
|
|
116
|
-
|
|
169
|
+
j(B(ye), {
|
|
117
170
|
class: K(["expand-icon", { "-rotate-90": !i.value }])
|
|
118
171
|
}, null, 8, ["class"])
|
|
119
172
|
]),
|
|
120
|
-
Z(x("div",
|
|
173
|
+
Z(x("div", dt, [
|
|
121
174
|
m[0] || (m[0] = x("div", { class: "side-border" }, [
|
|
122
175
|
x("div", { class: "dot-wrapper" }, [
|
|
123
176
|
x("div", { class: "dot" })
|
|
@@ -137,11 +190,11 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
137
190
|
], 64);
|
|
138
191
|
};
|
|
139
192
|
}
|
|
140
|
-
}), Oe = /* @__PURE__ */ N(
|
|
193
|
+
}), Oe = /* @__PURE__ */ N(bt, [["__scopeId", "data-v-d48eefd5"]]), ft = {
|
|
141
194
|
key: 0,
|
|
142
195
|
class: "tr-bubble__text",
|
|
143
196
|
"data-type": "text"
|
|
144
|
-
},
|
|
197
|
+
}, pt = /* @__PURE__ */ S({
|
|
145
198
|
__name: "Text",
|
|
146
199
|
props: {
|
|
147
200
|
message: {},
|
|
@@ -149,9 +202,9 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
149
202
|
},
|
|
150
203
|
setup(t) {
|
|
151
204
|
const e = t, { contentText: n } = ie(e);
|
|
152
|
-
return (o, r) => B(n) ? (g(), C("p",
|
|
205
|
+
return (o, r) => B(n) ? (g(), C("p", ft, z(B(n)), 1)) : se("", !0);
|
|
153
206
|
}
|
|
154
|
-
}), ae = /* @__PURE__ */ N(
|
|
207
|
+
}), ae = /* @__PURE__ */ N(pt, [["__scopeId", "data-v-93592ecb"]]), Ne = /* @__PURE__ */ S({
|
|
155
208
|
__name: "ToolRole",
|
|
156
209
|
props: {
|
|
157
210
|
message: {},
|
|
@@ -163,10 +216,10 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
163
216
|
e.message.tool_call_id && (n.toolCallResults || (n.toolCallResults = {}), n.toolCallResults[e.message.tool_call_id] = e.message.content ?? "");
|
|
164
217
|
}), (o, r) => se("", !0);
|
|
165
218
|
}
|
|
166
|
-
}),
|
|
219
|
+
}), _t = {
|
|
167
220
|
class: "tr-bubble__tool-call",
|
|
168
221
|
"data-type": "tool-call"
|
|
169
|
-
},
|
|
222
|
+
}, mt = { class: "header" }, gt = { class: "header-left" }, vt = { class: "title" }, ht = { class: "header-right" }, yt = { class: "divider" }, xt = ["innerHTML"], Rt = /* @__PURE__ */ S({
|
|
170
223
|
__name: "Tool",
|
|
171
224
|
props: {
|
|
172
225
|
message: {},
|
|
@@ -174,7 +227,7 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
174
227
|
toolCallIndex: {}
|
|
175
228
|
},
|
|
176
229
|
setup(t) {
|
|
177
|
-
const e = t, { toolCall: n, toolCallWithResult: o, state: r } =
|
|
230
|
+
const e = t, { toolCall: n, toolCallWithResult: o, state: r } = Dt(e), i = /* @__PURE__ */ new Map([
|
|
178
231
|
["running", { text: "正在调用", icon: he }],
|
|
179
232
|
["success", { text: "已调用", icon: be }],
|
|
180
233
|
["failed", { text: "调用失败", icon: qe }],
|
|
@@ -224,25 +277,25 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
224
277
|
};
|
|
225
278
|
return (_, v) => {
|
|
226
279
|
var R;
|
|
227
|
-
return g(), C("div",
|
|
228
|
-
x("div",
|
|
229
|
-
x("div",
|
|
280
|
+
return g(), C("div", _t, [
|
|
281
|
+
x("div", mt, [
|
|
282
|
+
x("div", gt, [
|
|
230
283
|
(g(), T(Y(s.value.icon), {
|
|
231
284
|
class: K(["header-icon", `icon-${B(r).status}`])
|
|
232
285
|
}, null, 8, ["class"])),
|
|
233
286
|
x("span", null, [
|
|
234
287
|
x("span", null, z(s.value.text) + " ", 1),
|
|
235
|
-
x("span",
|
|
288
|
+
x("span", vt, z(((R = B(n)) == null ? void 0 : R.function.name) || "Untitled"), 1)
|
|
236
289
|
])
|
|
237
290
|
]),
|
|
238
|
-
x("div",
|
|
239
|
-
|
|
291
|
+
x("div", ht, [
|
|
292
|
+
j(B(ye), {
|
|
240
293
|
class: K(["expand-icon", { "-rotate-90": !d.value }]),
|
|
241
294
|
onClick: c
|
|
242
295
|
}, null, 8, ["class"])
|
|
243
296
|
])
|
|
244
297
|
]),
|
|
245
|
-
Z(x("div",
|
|
298
|
+
Z(x("div", yt, null, 512), [
|
|
246
299
|
[Q, d.value]
|
|
247
300
|
]),
|
|
248
301
|
Z(x("div", {
|
|
@@ -250,21 +303,21 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
250
303
|
innerHTML: f.value,
|
|
251
304
|
ref_key: "detailRef",
|
|
252
305
|
ref: l
|
|
253
|
-
}, null, 8,
|
|
306
|
+
}, null, 8, xt), [
|
|
254
307
|
[Q, d.value]
|
|
255
308
|
])
|
|
256
309
|
]);
|
|
257
310
|
};
|
|
258
311
|
}
|
|
259
|
-
}),
|
|
260
|
-
key:
|
|
261
|
-
number:
|
|
262
|
-
string:
|
|
263
|
-
boolean:
|
|
312
|
+
}), Bt = "_key_1b448_2", Ct = "_number_1b448_6", Et = "_string_1b448_10", kt = "_boolean_1b448_14", St = {
|
|
313
|
+
key: Bt,
|
|
314
|
+
number: Ct,
|
|
315
|
+
string: Et,
|
|
316
|
+
boolean: kt,
|
|
264
317
|
null: "_null_1b448_18"
|
|
265
|
-
},
|
|
266
|
-
$style:
|
|
267
|
-
}, we = /* @__PURE__ */ N(
|
|
318
|
+
}, It = {
|
|
319
|
+
$style: St
|
|
320
|
+
}, we = /* @__PURE__ */ N(Rt, [["__cssModules", It], ["__scopeId", "data-v-d5b7675f"]]), Fe = /* @__PURE__ */ S({
|
|
268
321
|
inheritAttrs: !1,
|
|
269
322
|
__name: "Tools",
|
|
270
323
|
props: {
|
|
@@ -276,7 +329,7 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
276
329
|
return (i, s) => (g(), C(F, null, [
|
|
277
330
|
(g(), T(Y(B(r).renderer), P(D({ ...B(r).attributes, ...B(o) })), null, 16)),
|
|
278
331
|
x("div", $({ class: "tr-bubble__tools" }, i.$attrs), [
|
|
279
|
-
(g(!0), C(F, null,
|
|
332
|
+
(g(!0), C(F, null, W(e.message.tool_calls, (a, u) => (g(), T(we, $({
|
|
280
333
|
key: a.id
|
|
281
334
|
}, { ref_for: !0 }, e, { "tool-call-index": u }), null, 16, ["tool-call-index"]))), 128))
|
|
282
335
|
], 16)
|
|
@@ -315,22 +368,22 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
315
368
|
renderer: w(Ne),
|
|
316
369
|
priority: H.ROLE
|
|
317
370
|
}
|
|
318
|
-
], Ue = w(re), He = w(ae),
|
|
319
|
-
const e = I(
|
|
320
|
-
return !e && t && A(
|
|
371
|
+
], Ue = w(re), He = w(ae), pe = Symbol("BUBBLE_CONTENT_RESOLVER_KEY"), te = (t) => {
|
|
372
|
+
const e = I(pe, void 0), n = e ?? t;
|
|
373
|
+
return !e && t && A(pe, t), n ? (r) => {
|
|
321
374
|
const i = k(n);
|
|
322
375
|
return i == null ? void 0 : i(r);
|
|
323
376
|
} : (r) => r.content;
|
|
324
377
|
};
|
|
325
|
-
function
|
|
378
|
+
function Tt(t) {
|
|
326
379
|
const { boxRendererMatches: e, boxAttributes: n, fallbackBoxRenderer: o } = t;
|
|
327
380
|
e && A(Re, e), n && A(Ce, n), o && A(Be, o);
|
|
328
381
|
}
|
|
329
|
-
function
|
|
382
|
+
function At(t) {
|
|
330
383
|
const { fallbackBoxRenderer: e } = t;
|
|
331
384
|
e && A(Ee, e);
|
|
332
385
|
}
|
|
333
|
-
function
|
|
386
|
+
function Lt(t, e) {
|
|
334
387
|
const n = I(Re, Pe), o = I(Ce, void 0), r = I(Be, void 0), i = I(Ee, void 0), s = te();
|
|
335
388
|
if (typeof e == "number" && k(t).length !== 1)
|
|
336
389
|
throw new Error("[BubbleBoxRenderer] When contentIndex is a number, messages array length must be 1");
|
|
@@ -361,11 +414,11 @@ function At(t, e) {
|
|
|
361
414
|
};
|
|
362
415
|
});
|
|
363
416
|
}
|
|
364
|
-
function
|
|
417
|
+
function Mt(t) {
|
|
365
418
|
const { contentRendererMatches: e, contentAttributes: n, fallbackContentRenderer: o } = t;
|
|
366
419
|
e && A(ke, e), n && A(Ie, n), o && A(Se, o);
|
|
367
420
|
}
|
|
368
|
-
function
|
|
421
|
+
function $t(t) {
|
|
369
422
|
const { fallbackContentRenderer: e } = t;
|
|
370
423
|
e && A(Te, e);
|
|
371
424
|
}
|
|
@@ -389,7 +442,7 @@ function le(t, e) {
|
|
|
389
442
|
};
|
|
390
443
|
});
|
|
391
444
|
}
|
|
392
|
-
function
|
|
445
|
+
function Ot(t) {
|
|
393
446
|
A(Ae, t);
|
|
394
447
|
}
|
|
395
448
|
function Ke() {
|
|
@@ -401,7 +454,7 @@ function ce(t) {
|
|
|
401
454
|
const e = I(oe, void 0);
|
|
402
455
|
if (e)
|
|
403
456
|
return e;
|
|
404
|
-
const n =
|
|
457
|
+
const n = ze(t || {});
|
|
405
458
|
return A(oe, n), n;
|
|
406
459
|
}
|
|
407
460
|
function ue() {
|
|
@@ -436,10 +489,10 @@ const ie = (t) => {
|
|
|
436
489
|
contentText: o
|
|
437
490
|
};
|
|
438
491
|
};
|
|
439
|
-
function
|
|
492
|
+
function Nt(t) {
|
|
440
493
|
A(xe, t);
|
|
441
494
|
}
|
|
442
|
-
function
|
|
495
|
+
function wt() {
|
|
443
496
|
return I(xe, void 0);
|
|
444
497
|
}
|
|
445
498
|
function Ye(t, e) {
|
|
@@ -456,9 +509,9 @@ function Ye(t, e) {
|
|
|
456
509
|
};
|
|
457
510
|
}
|
|
458
511
|
let ne = null;
|
|
459
|
-
const
|
|
512
|
+
const Ft = () => (ne || (ne = import("./index5.js")), ne);
|
|
460
513
|
let J = null;
|
|
461
|
-
const
|
|
514
|
+
const Pt = async () => {
|
|
462
515
|
if (J)
|
|
463
516
|
return J;
|
|
464
517
|
try {
|
|
@@ -467,14 +520,14 @@ const Ft = async () => {
|
|
|
467
520
|
} catch {
|
|
468
521
|
return console.warn("[BubbleMarkdownRenderer] install markdown-it and dompurify to use markdown renderer"), J = null, null;
|
|
469
522
|
}
|
|
470
|
-
},
|
|
523
|
+
}, _e = ["running", "success", "failed", "cancelled"], Dt = (t) => {
|
|
471
524
|
const e = y(() => {
|
|
472
525
|
var s, a;
|
|
473
526
|
return (a = (s = t.message) == null ? void 0 : s.tool_calls) == null ? void 0 : a[t.toolCallIndex];
|
|
474
527
|
}), n = ue(), o = y(() => {
|
|
475
528
|
var m, p, f;
|
|
476
529
|
let s = n.toolCallDefaultStatus;
|
|
477
|
-
s && !
|
|
530
|
+
s && !_e.includes(s) && (s = void 0);
|
|
478
531
|
const a = n.toolCallDefaultOpen;
|
|
479
532
|
let u = {
|
|
480
533
|
status: s,
|
|
@@ -485,7 +538,7 @@ const Ft = async () => {
|
|
|
485
538
|
const l = (f = (p = t.message.state) == null ? void 0 : p.toolCall) == null ? void 0 : f[b];
|
|
486
539
|
if (l) {
|
|
487
540
|
const { status: d, open: h, ...c } = l;
|
|
488
|
-
d &&
|
|
541
|
+
d && _e.includes(d) && (u.status = d), h !== void 0 && (u.open = h), u = { ...u, ...c };
|
|
489
542
|
}
|
|
490
543
|
}
|
|
491
544
|
return u;
|
|
@@ -498,7 +551,7 @@ const Ft = async () => {
|
|
|
498
551
|
return q(() => {
|
|
499
552
|
var u;
|
|
500
553
|
const s = (u = e.value) == null ? void 0 : u.function.arguments, a = r.value;
|
|
501
|
-
|
|
554
|
+
Ft().then(({ jsonrepair: b }) => {
|
|
502
555
|
const m = b(typeof s == "string" ? s || "{}" : JSON.stringify(s));
|
|
503
556
|
i.value = {
|
|
504
557
|
arguments: JSON.parse(m),
|
|
@@ -509,10 +562,10 @@ const Ft = async () => {
|
|
|
509
562
|
});
|
|
510
563
|
}), {
|
|
511
564
|
toolCall: e,
|
|
512
|
-
toolCallWithResult:
|
|
565
|
+
toolCallWithResult: Ve(i),
|
|
513
566
|
state: o
|
|
514
567
|
};
|
|
515
|
-
},
|
|
568
|
+
}, me = /* @__PURE__ */ S({
|
|
516
569
|
__name: "BubbleBoxWrapper",
|
|
517
570
|
props: {
|
|
518
571
|
role: {},
|
|
@@ -522,7 +575,7 @@ const Ft = async () => {
|
|
|
522
575
|
contentIndex: {}
|
|
523
576
|
},
|
|
524
577
|
setup(t) {
|
|
525
|
-
const e = t, n =
|
|
578
|
+
const e = t, n = Lt(() => e.messages, e.contentIndex);
|
|
526
579
|
return (o, r) => (g(), T(Y(B(n).renderer), $(B(n).attributes, {
|
|
527
580
|
"data-role": e.role,
|
|
528
581
|
"data-placement": e.placement,
|
|
@@ -534,7 +587,7 @@ const Ft = async () => {
|
|
|
534
587
|
_: 3
|
|
535
588
|
}, 16, ["data-role", "data-placement", "data-shape"]));
|
|
536
589
|
}
|
|
537
|
-
}),
|
|
590
|
+
}), ge = /* @__PURE__ */ S({
|
|
538
591
|
__name: "BubbleContentWrapper",
|
|
539
592
|
props: {
|
|
540
593
|
message: {},
|
|
@@ -547,7 +600,7 @@ const Ft = async () => {
|
|
|
547
600
|
message: n.message,
|
|
548
601
|
contentIndex: n.contentIndex
|
|
549
602
|
})), i = e;
|
|
550
|
-
return
|
|
603
|
+
return Ot((a, u) => {
|
|
551
604
|
i("state-change", {
|
|
552
605
|
key: a,
|
|
553
606
|
value: u,
|
|
@@ -555,7 +608,7 @@ const Ft = async () => {
|
|
|
555
608
|
});
|
|
556
609
|
}), (a, u) => (g(), T(Y(B(o).renderer), P(D(r.value)), null, 16));
|
|
557
610
|
}
|
|
558
|
-
}),
|
|
611
|
+
}), Ut = ["data-role", "data-placement"], Ht = { class: "tr-bubble__body" }, Kt = { class: "tr-bubble__content" }, Gt = { class: "tr-bubble__after" }, Yt = /* @__PURE__ */ S({
|
|
559
612
|
__name: "Bubble",
|
|
560
613
|
props: {
|
|
561
614
|
content: {},
|
|
@@ -580,7 +633,7 @@ const Ft = async () => {
|
|
|
580
633
|
setup(t, { emit: e }) {
|
|
581
634
|
const n = t, o = te(() => n.contentResolver), r = e;
|
|
582
635
|
ce();
|
|
583
|
-
const i =
|
|
636
|
+
const i = wt(), s = y(() => k(i)), a = y(() => {
|
|
584
637
|
var de;
|
|
585
638
|
if ((de = s.value) != null && de.messages.length)
|
|
586
639
|
return s.value.messages;
|
|
@@ -590,7 +643,7 @@ const Ft = async () => {
|
|
|
590
643
|
const d = o(l);
|
|
591
644
|
return Array.isArray(d) ? d : [{ type: "text", text: d || "" }];
|
|
592
645
|
};
|
|
593
|
-
|
|
646
|
+
At({ fallbackBoxRenderer: () => n.fallbackBoxRenderer }), $t({ fallbackContentRenderer: () => n.fallbackContentRenderer });
|
|
594
647
|
const b = y(() => a.value.length === 0 ? !0 : n.hidden), m = y(() => {
|
|
595
648
|
if (n.contentRenderMode === "split" && a.value.length === 1) {
|
|
596
649
|
const l = o(a.value.at(0));
|
|
@@ -610,13 +663,13 @@ const Ft = async () => {
|
|
|
610
663
|
messages: a.value,
|
|
611
664
|
role: t.role
|
|
612
665
|
}, void 0, !0),
|
|
613
|
-
x("div",
|
|
666
|
+
x("div", Ht, [
|
|
614
667
|
n.avatar ? (g(), T(Y(n.avatar), {
|
|
615
668
|
key: 0,
|
|
616
669
|
class: K(["tr-bubble__avatar", l.$style["tr-bubble__avatar"]])
|
|
617
670
|
}, null, 8, ["class"])) : se("", !0),
|
|
618
|
-
x("div",
|
|
619
|
-
m.value ? (g(!0), C(F, { key: 0 },
|
|
671
|
+
x("div", Kt, [
|
|
672
|
+
m.value ? (g(!0), C(F, { key: 0 }, W(m.value, (h, c) => (g(), T(me, {
|
|
620
673
|
key: c,
|
|
621
674
|
class: "tr-bubble__box",
|
|
622
675
|
role: n.role,
|
|
@@ -626,7 +679,7 @@ const Ft = async () => {
|
|
|
626
679
|
"content-index": c
|
|
627
680
|
}, {
|
|
628
681
|
default: M(() => [
|
|
629
|
-
|
|
682
|
+
j(ge, {
|
|
630
683
|
message: a.value.at(0),
|
|
631
684
|
"content-index": c,
|
|
632
685
|
onStateChange: d[0] || (d[0] = (_) => r("state-change", { ..._, messageIndex: 0 }))
|
|
@@ -638,7 +691,7 @@ const Ft = async () => {
|
|
|
638
691
|
}, void 0, !0)
|
|
639
692
|
]),
|
|
640
693
|
_: 2
|
|
641
|
-
}, 1032, ["role", "placement", "shape", "messages", "content-index"]))), 128)) : (g(), T(
|
|
694
|
+
}, 1032, ["role", "placement", "shape", "messages", "content-index"]))), 128)) : (g(), T(me, {
|
|
642
695
|
key: 1,
|
|
643
696
|
role: n.role,
|
|
644
697
|
placement: n.placement,
|
|
@@ -646,10 +699,10 @@ const Ft = async () => {
|
|
|
646
699
|
messages: a.value
|
|
647
700
|
}, {
|
|
648
701
|
default: M(() => [
|
|
649
|
-
(g(!0), C(F, null,
|
|
702
|
+
(g(!0), C(F, null, W(a.value, (h, c) => (g(), C(F, {
|
|
650
703
|
key: `message-${c}`
|
|
651
704
|
}, [
|
|
652
|
-
(g(!0), C(F, null,
|
|
705
|
+
(g(!0), C(F, null, W(u(h), (_, v) => (g(), T(ge, {
|
|
653
706
|
key: `content-${v}`,
|
|
654
707
|
message: h,
|
|
655
708
|
"content-index": v,
|
|
@@ -664,7 +717,7 @@ const Ft = async () => {
|
|
|
664
717
|
_: 3
|
|
665
718
|
}, 8, ["role", "placement", "shape", "messages"]))
|
|
666
719
|
]),
|
|
667
|
-
x("div",
|
|
720
|
+
x("div", Gt, [
|
|
668
721
|
E(l.$slots, "after", {
|
|
669
722
|
messages: a.value,
|
|
670
723
|
role: t.role
|
|
@@ -675,69 +728,15 @@ const Ft = async () => {
|
|
|
675
728
|
messages: a.value,
|
|
676
729
|
role: t.role
|
|
677
730
|
}, void 0, !0)
|
|
678
|
-
], 8,
|
|
731
|
+
], 8, Ut)), [
|
|
679
732
|
[Q, !b.value]
|
|
680
733
|
]);
|
|
681
734
|
}
|
|
682
|
-
}),
|
|
735
|
+
}), Jt = {
|
|
683
736
|
"tr-bubble__avatar": "_tr-bubble__avatar_1r87c_2"
|
|
684
|
-
},
|
|
685
|
-
$style:
|
|
686
|
-
}, G = /* @__PURE__ */ N(
|
|
687
|
-
function ge(t, e) {
|
|
688
|
-
const n = U(t, (o, r) => {
|
|
689
|
-
r === !0 && o === !1 && (e(), n());
|
|
690
|
-
});
|
|
691
|
-
return n;
|
|
692
|
-
}
|
|
693
|
-
function jt(t, e, n) {
|
|
694
|
-
const { scrollOnMount: o = !0, bottomThreshold: r = 20, scrollThrottle: i = 0 } = n ?? {}, s = L(!0);
|
|
695
|
-
let a = !1;
|
|
696
|
-
const u = /* @__PURE__ */ new Set(), b = () => nt(t), { y: m, isScrolling: p, arrivedState: f } = Qe(b, { throttle: i }), l = (c) => c.scrollHeight - c.scrollTop - c.clientHeight <= r, d = async (c = "auto") => {
|
|
697
|
-
const _ = k(b);
|
|
698
|
-
if (_ && (await ee(), _.scrollTo({ top: _.scrollHeight, behavior: c }), c === "smooth" && !l(_))) {
|
|
699
|
-
const v = ge(p, () => {
|
|
700
|
-
_.scrollTo({ top: _.scrollHeight, behavior: "auto" }), u.delete(v);
|
|
701
|
-
});
|
|
702
|
-
u.add(v);
|
|
703
|
-
}
|
|
704
|
-
}, h = () => {
|
|
705
|
-
a || !s.value || (a = !0, requestAnimationFrame(async () => {
|
|
706
|
-
a = !1, await d("auto");
|
|
707
|
-
}));
|
|
708
|
-
};
|
|
709
|
-
return U(
|
|
710
|
-
m,
|
|
711
|
-
() => {
|
|
712
|
-
const c = k(b);
|
|
713
|
-
c && (s.value = l(c));
|
|
714
|
-
},
|
|
715
|
-
{ flush: "post" }
|
|
716
|
-
), et(
|
|
717
|
-
e,
|
|
718
|
-
() => {
|
|
719
|
-
h();
|
|
720
|
-
},
|
|
721
|
-
{ flush: "post", throttle: 100 }
|
|
722
|
-
), ve(() => {
|
|
723
|
-
o && d("smooth");
|
|
724
|
-
}), Ve(() => {
|
|
725
|
-
u.forEach((c) => {
|
|
726
|
-
c();
|
|
727
|
-
}), u.clear();
|
|
728
|
-
}), tt("keydown", (c) => {
|
|
729
|
-
if (c.key === "End" && !s.value) {
|
|
730
|
-
const _ = ge(p, () => {
|
|
731
|
-
d("auto"), u.delete(_);
|
|
732
|
-
});
|
|
733
|
-
u.add(_);
|
|
734
|
-
}
|
|
735
|
-
}), {
|
|
736
|
-
scrollToBottom: d,
|
|
737
|
-
arrivedState: f
|
|
738
|
-
};
|
|
739
|
-
}
|
|
740
|
-
const Wt = /* @__PURE__ */ S({
|
|
737
|
+
}, Wt = {
|
|
738
|
+
$style: Jt
|
|
739
|
+
}, G = /* @__PURE__ */ N(Yt, [["__cssModules", Wt], ["__scopeId", "data-v-2d927bba"]]), jt = /* @__PURE__ */ S({
|
|
741
740
|
__name: "BubbleItem",
|
|
742
741
|
props: {
|
|
743
742
|
messageGroup: {},
|
|
@@ -748,7 +747,7 @@ const Wt = /* @__PURE__ */ S({
|
|
|
748
747
|
emits: ["state-change"],
|
|
749
748
|
setup(t, { emit: e }) {
|
|
750
749
|
const n = t, o = e;
|
|
751
|
-
return
|
|
750
|
+
return Nt(() => n.messageGroup), (r, i) => (g(), T(G, $(t.roleConfig, {
|
|
752
751
|
role: t.messageGroup.role,
|
|
753
752
|
"content-render-mode": t.contentRenderMode,
|
|
754
753
|
"content-resolver": t.contentResolver,
|
|
@@ -792,7 +791,7 @@ const Wt = /* @__PURE__ */ S({
|
|
|
792
791
|
let a = async () => {
|
|
793
792
|
};
|
|
794
793
|
if (o.autoScroll) {
|
|
795
|
-
const p = y(() => o.messages.at(-1)), { scrollToBottom: f } =
|
|
794
|
+
const p = y(() => o.messages.at(-1)), { scrollToBottom: f } = ot(s, () => {
|
|
796
795
|
var l, d;
|
|
797
796
|
return [
|
|
798
797
|
o.messages.length,
|
|
@@ -848,9 +847,9 @@ const Wt = /* @__PURE__ */ S({
|
|
|
848
847
|
ref_key: "listRef",
|
|
849
848
|
ref: s
|
|
850
849
|
}, [
|
|
851
|
-
(g(!0), C(F, null,
|
|
850
|
+
(g(!0), C(F, null, W(m.value, (l, d) => {
|
|
852
851
|
var h;
|
|
853
|
-
return g(), T(
|
|
852
|
+
return g(), T(jt, {
|
|
854
853
|
key: d,
|
|
855
854
|
role: l.role || o.fallbackRole,
|
|
856
855
|
"role-config": (h = o.roleConfigs) == null ? void 0 : h[l.role || o.fallbackRole],
|
|
@@ -899,11 +898,11 @@ const Wt = /* @__PURE__ */ S({
|
|
|
899
898
|
const e = t;
|
|
900
899
|
ce(e.store);
|
|
901
900
|
const n = y(() => (e.boxRendererMatches || []).concat(Pe).sort((s, a) => (s.priority ?? 0) - (a.priority ?? 0))), o = y(() => (e.contentRendererMatches || []).concat(De).sort((s, a) => (s.priority ?? 0) - (a.priority ?? 0))), r = y(() => e.fallbackBoxRenderer || Ue), i = y(() => e.fallbackContentRenderer || He);
|
|
902
|
-
return
|
|
901
|
+
return Tt({
|
|
903
902
|
boxRendererMatches: n,
|
|
904
903
|
boxAttributes: () => e.boxAttributes,
|
|
905
904
|
fallbackBoxRenderer: r
|
|
906
|
-
}),
|
|
905
|
+
}), Mt({
|
|
907
906
|
contentRendererMatches: o,
|
|
908
907
|
contentAttributes: () => e.contentAttributes,
|
|
909
908
|
fallbackContentRenderer: i
|
|
@@ -918,7 +917,7 @@ const Wt = /* @__PURE__ */ S({
|
|
|
918
917
|
setup(t) {
|
|
919
918
|
const e = t, { contentText: n } = ie(e), o = L(null);
|
|
920
919
|
ve(async () => {
|
|
921
|
-
o.value = await
|
|
920
|
+
o.value = await Pt();
|
|
922
921
|
});
|
|
923
922
|
const { mdConfig: r, dompurifyConfig: i } = ue(), s = L("");
|
|
924
923
|
return q(() => {
|
|
@@ -968,11 +967,11 @@ export {
|
|
|
968
967
|
cn as b,
|
|
969
968
|
H as c,
|
|
970
969
|
rn as d,
|
|
971
|
-
|
|
970
|
+
Lt as e,
|
|
972
971
|
le as f,
|
|
973
972
|
Ke as g,
|
|
974
973
|
ie as h,
|
|
975
974
|
Ye as i,
|
|
976
|
-
|
|
977
|
-
|
|
975
|
+
Dt as j,
|
|
976
|
+
ot as u
|
|
978
977
|
};
|