@opentiny/tiny-robot 0.4.2-alpha.3 → 0.4.2-alpha.5
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/ActionGroup.vue.d.ts +26 -0
- package/dist/action-group/ActionGroupItem.vue.d.ts +18 -0
- package/dist/action-group/index.d.ts +12 -0
- package/dist/action-group/index.js +3 -3
- package/dist/action-group/index.type.d.ts +17 -0
- package/dist/anchor/components/AnchorItem.vue.d.ts +24 -0
- package/dist/anchor/components/AnchorList.vue.d.ts +20 -0
- package/dist/anchor/components/AnchorOverlay.vue.d.ts +33 -0
- package/dist/anchor/components/AnchorSearch.vue.d.ts +7 -0
- package/dist/anchor/composables/index.d.ts +5 -0
- package/dist/anchor/composables/useActiveSync.d.ts +10 -0
- package/dist/anchor/composables/useFloatingOffset.d.ts +6 -0
- package/dist/anchor/composables/useNavController.d.ts +12 -0
- package/dist/anchor/composables/useOverlayInteractions.d.ts +6 -0
- package/dist/anchor/composables/useTargetFeedback.d.ts +5 -0
- package/dist/anchor/defaults.d.ts +16 -0
- package/dist/anchor/index.d.ts +7 -0
- package/dist/anchor/index.js +44 -44
- package/dist/anchor/index.type.d.ts +60 -0
- package/dist/anchor/index.vue.d.ts +159 -0
- package/dist/anchor/internal.type.d.ts +103 -0
- package/dist/anchor/utils/scroll.d.ts +7 -0
- package/dist/anchor/utils/target.d.ts +6 -0
- package/dist/attachments/components/FileCard.vue.d.ts +18 -0
- package/dist/attachments/components/ImagePreview.vue.d.ts +17 -0
- package/dist/attachments/components/index.d.ts +2 -0
- package/dist/attachments/composables/index.d.ts +5 -0
- package/dist/attachments/composables/useFileCard.d.ts +15 -0
- package/dist/attachments/composables/useFileType.d.ts +20 -0
- package/dist/attachments/composables/useImagePreview.d.ts +18 -0
- package/dist/attachments/composables/useListType.d.ts +11 -0
- package/dist/attachments/index.d.ts +7 -0
- package/dist/attachments/index.js +96 -96
- package/dist/attachments/index.type.d.ts +70 -0
- package/dist/attachments/index.vue.d.ts +27 -0
- package/dist/attachments/utils.d.ts +3 -0
- package/dist/base-popper/components/Popper.vue.d.ts +28 -0
- package/dist/base-popper/index.d.ts +2 -0
- package/dist/base-popper/index.vue.d.ts +41 -0
- package/dist/bubble/Bubble.vue.d.ts +39 -0
- package/dist/bubble/BubbleBoxWrapper.vue.d.ts +22 -0
- package/dist/bubble/BubbleContentWrapper.vue.d.ts +16 -0
- package/dist/bubble/BubbleItem.vue.d.ts +36 -0
- package/dist/bubble/BubbleList.vue.d.ts +41 -0
- package/dist/bubble/BubbleProvider.vue.d.ts +18 -0
- package/dist/bubble/composables/index.d.ts +10 -0
- package/dist/bubble/composables/useBubbleBoxRenderer.d.ts +18 -0
- package/dist/bubble/composables/useBubbleContentRenderer.d.ts +18 -0
- package/dist/bubble/composables/useBubbleStateChange.d.ts +2 -0
- package/dist/bubble/composables/useBubbleStore.d.ts +16 -0
- package/dist/bubble/composables/useContentResolver.d.ts +5 -0
- package/dist/bubble/composables/useCopyCleanup.d.ts +6 -0
- package/dist/bubble/composables/useMessageContent.d.ts +5 -0
- package/dist/bubble/composables/useMessageGroup.d.ts +4 -0
- package/dist/bubble/composables/useOmitMessageFields.d.ts +12 -0
- package/dist/bubble/composables/useToolCall.d.ts +25 -0
- package/dist/bubble/constants.d.ts +42 -0
- package/dist/bubble/index.d.ts +19 -0
- package/dist/bubble/index.type.d.ts +171 -0
- package/dist/bubble/renderers/Box.vue.d.ts +18 -0
- package/dist/bubble/renderers/Image.vue.d.ts +4 -0
- package/dist/bubble/renderers/Loading.vue.d.ts +4 -0
- package/dist/bubble/renderers/Markdown.vue.d.ts +4 -0
- package/dist/bubble/renderers/Reasoning.vue.d.ts +9 -0
- package/dist/bubble/renderers/Text.vue.d.ts +4 -0
- package/dist/bubble/renderers/Tool.vue.d.ts +14 -0
- package/dist/bubble/renderers/ToolRole.vue.d.ts +4 -0
- package/dist/bubble/renderers/Tools.vue.d.ts +4 -0
- package/dist/bubble/renderers/allRenderers.d.ts +93 -0
- package/dist/bubble/renderers/defaultRenderers.d.ts +27 -0
- package/dist/bubble/utils.d.ts +7 -0
- package/dist/chat/components/ChatConversation.vue.d.ts +70 -0
- package/dist/chat/components/ChatLauncherButton.vue.d.ts +12 -0
- package/dist/chat/components/ChatMcpTrigger.vue.d.ts +30 -0
- package/dist/chat/components/ChatThemeToggleButton.vue.d.ts +2 -0
- package/dist/chat/components/ChatWelcome.vue.d.ts +13 -0
- package/dist/chat/composables/useChatConversation.d.ts +37 -0
- package/dist/chat/composables/useChatMcp.d.ts +29 -0
- package/dist/chat/composables/useChatModel.d.ts +27 -0
- package/dist/chat/index.d.ts +9 -0
- package/dist/chat/index.js +13701 -0
- package/dist/chat/index.type.d.ts +88 -0
- package/dist/chat/index.vue.d.ts +58 -0
- package/dist/container/index.d.ts +7 -0
- package/dist/container/index.js +13 -13
- package/dist/container/index.type.d.ts +20 -0
- package/dist/container/index.vue.d.ts +32 -0
- package/dist/conversations/index.d.ts +7 -0
- package/dist/conversations/index.vue.d.ts +2 -0
- package/dist/drag-overlay/constants.d.ts +17 -0
- package/dist/drag-overlay/directives/vDropzone.d.ts +14 -0
- package/dist/drag-overlay/index.d.ts +7 -0
- package/dist/drag-overlay/index.js +1 -1
- package/dist/drag-overlay/index.type.d.ts +105 -0
- package/dist/drag-overlay/index.vue.d.ts +20 -0
- package/dist/dropdown-menu/composables/usePopperHover.d.ts +6 -0
- package/dist/dropdown-menu/index.d.ts +7 -0
- package/dist/dropdown-menu/index.js +18 -18
- package/dist/dropdown-menu/index.type.d.ts +42 -0
- package/dist/dropdown-menu/index.vue.d.ts +217 -0
- package/dist/feedback/components/SourceList.vue.d.ts +11 -0
- package/dist/feedback/components/index.d.ts +1 -0
- package/dist/feedback/index.d.ts +7 -0
- package/dist/feedback/index.type.d.ts +25 -0
- package/dist/feedback/index.vue.d.ts +13 -0
- package/dist/flow-layout-buttons/index.d.ts +7 -0
- package/dist/flow-layout-buttons/index.js +1 -1
- package/dist/flow-layout-buttons/index.type.d.ts +35 -0
- package/dist/flow-layout-buttons/index.vue.d.ts +22 -0
- package/dist/history/components/Empty.vue.d.ts +7 -0
- package/dist/history/components/MenuList.vue.d.ts +24 -0
- package/dist/history/composables/useRenameEditor.d.ts +22 -0
- package/dist/history/constants.d.ts +1 -0
- package/dist/history/index.d.ts +7 -0
- package/dist/history/index.type.d.ts +33 -0
- package/dist/history/index.vue.d.ts +18 -0
- package/dist/icon-button/index.d.ts +7 -0
- package/dist/icon-button/index.type.d.ts +7 -0
- package/dist/icon-button/index.vue.d.ts +6 -0
- package/dist/index.d.ts +49 -4999
- package/dist/index.js +3 -3
- package/dist/index2.js +139 -121
- package/dist/index3.js +1 -1
- package/dist/index4.js +13 -13
- package/dist/index6.js +19 -19
- package/dist/index7.js +30 -30
- package/dist/index8.js +8 -8
- package/dist/mcp-add-form/components/CodeEditor.vue.d.ts +9 -0
- package/dist/mcp-add-form/components/FormEditor.vue.d.ts +10 -0
- package/dist/mcp-add-form/components/index.d.ts +2 -0
- package/dist/mcp-add-form/index.d.ts +7 -0
- package/dist/mcp-add-form/index.type.d.ts +19 -0
- package/dist/mcp-add-form/index.vue.d.ts +13 -0
- package/dist/mcp-server-picker/components/NoData.vue.d.ts +7 -0
- package/dist/mcp-server-picker/components/PluginCard.vue.d.ts +40 -0
- package/dist/mcp-server-picker/components/PluginModal.vue.d.ts +15 -0
- package/dist/mcp-server-picker/components/index.d.ts +3 -0
- package/dist/mcp-server-picker/index.d.ts +7 -0
- package/dist/mcp-server-picker/index.js +178 -177
- package/dist/mcp-server-picker/index.type.d.ts +99 -0
- package/dist/mcp-server-picker/index.vue.d.ts +71 -0
- package/dist/prompts/index.d.ts +12 -0
- package/dist/prompts/index.type.d.ts +59 -0
- package/dist/prompts/prompt.vue.d.ts +5 -0
- package/dist/prompts/prompts.vue.d.ts +20 -0
- package/dist/sender/components/editor-content/index.vue.d.ts +4 -0
- package/dist/sender/components/footer/index.vue.d.ts +38 -0
- package/dist/sender/components/layouts/MultiLineLayout.vue.d.ts +43 -0
- package/dist/sender/components/layouts/SingleLineLayout.vue.d.ts +32 -0
- package/dist/sender/composables/index.d.ts +7 -0
- package/dist/sender/composables/useAutoSize.d.ts +5 -0
- package/dist/sender/composables/useEditor.d.ts +13 -0
- package/dist/sender/composables/useKeyboardShortcuts.d.ts +7 -0
- package/dist/sender/composables/useModeSwitch.d.ts +4 -0
- package/dist/sender/composables/useSenderCore.d.ts +31 -0
- package/dist/sender/composables/useSlotScope.d.ts +10 -0
- package/dist/sender/context/index.d.ts +6 -0
- package/dist/sender/context/types.d.ts +7 -0
- package/dist/sender/extensions/constants.d.ts +94 -0
- package/dist/sender/extensions/index.d.ts +12 -0
- package/dist/sender/extensions/mention/commands.d.ts +20 -0
- package/dist/sender/extensions/mention/components/mention-list.vue.d.ts +18 -0
- package/dist/sender/extensions/mention/components/mention-view.vue.d.ts +19 -0
- package/dist/sender/extensions/mention/extension.d.ts +6 -0
- package/dist/sender/extensions/mention/index.d.ts +22 -0
- package/dist/sender/extensions/mention/plugin.d.ts +16 -0
- package/dist/sender/extensions/mention/types.d.ts +126 -0
- package/dist/sender/extensions/mention/utils.d.ts +34 -0
- package/dist/sender/extensions/suggestion/extension.d.ts +8 -0
- package/dist/sender/extensions/suggestion/index.d.ts +20 -0
- package/dist/sender/extensions/suggestion/plugin.d.ts +21 -0
- package/dist/sender/extensions/suggestion/suggestion-list.vue.d.ts +46 -0
- package/dist/sender/extensions/suggestion/types.d.ts +254 -0
- package/dist/sender/extensions/suggestion/utils/filter.d.ts +29 -0
- package/dist/sender/extensions/suggestion/utils/highlight.d.ts +73 -0
- package/dist/sender/extensions/template/block/extension.d.ts +6 -0
- package/dist/sender/extensions/template/block/plugins.d.ts +13 -0
- package/dist/sender/extensions/template/block/template-block-view.vue.d.ts +14 -0
- package/dist/sender/extensions/template/commands.d.ts +31 -0
- package/dist/sender/extensions/template/extension.d.ts +6 -0
- package/dist/sender/extensions/template/index.d.ts +21 -0
- package/dist/sender/extensions/template/select/dropdown-manager.d.ts +23 -0
- package/dist/sender/extensions/template/select/extension.d.ts +5 -0
- package/dist/sender/extensions/template/select/plugins.d.ts +34 -0
- package/dist/sender/extensions/template/select/template-select-view.vue.d.ts +20 -0
- package/dist/sender/extensions/template/types.d.ts +100 -0
- package/dist/sender/extensions/template/utils.d.ts +20 -0
- package/dist/sender/extensions/utils/id-generator.d.ts +16 -0
- package/dist/sender/extensions/utils/index.d.ts +7 -0
- package/dist/sender/extensions/utils/keyboard.d.ts +49 -0
- package/dist/sender/extensions/utils/position.d.ts +25 -0
- package/dist/sender/index.d.ts +136 -0
- package/dist/sender/index.js +178 -164
- package/dist/sender/index.type.d.ts +302 -0
- package/dist/sender/index.vue.d.ts +90 -0
- package/dist/sender/types/base.d.ts +239 -0
- package/dist/sender/types/components.d.ts +68 -0
- package/dist/sender/types/composables.d.ts +122 -0
- package/dist/sender/types/context.d.ts +132 -0
- package/dist/sender/types/slots.d.ts +67 -0
- package/dist/sender/utils/countGraphemes.d.ts +1 -0
- package/dist/sender-actions/action-button/index.vue.d.ts +23 -0
- package/dist/sender-actions/clear-button/index.vue.d.ts +2 -0
- package/dist/sender-actions/clear-button/useClearButtonState.d.ts +6 -0
- package/dist/sender-actions/default-actions/index.vue.d.ts +17 -0
- package/dist/sender-actions/index.d.ts +21 -0
- package/dist/sender-actions/index.js +1 -1
- package/dist/sender-actions/index.type.d.ts +7 -0
- package/dist/sender-actions/submit-button/index.vue.d.ts +2 -0
- package/dist/sender-actions/types/common.d.ts +40 -0
- package/dist/sender-actions/types/index.d.ts +5 -0
- package/dist/sender-actions/types/tooltip.d.ts +7 -0
- package/dist/sender-actions/upload-button/index.type.d.ts +57 -0
- package/dist/sender-actions/upload-button/index.vue.d.ts +16 -0
- package/dist/sender-actions/utils/tooltip.d.ts +8 -0
- package/dist/sender-actions/voice-button/index.type.d.ts +78 -0
- package/dist/sender-actions/voice-button/index.vue.d.ts +43 -0
- package/dist/sender-actions/voice-button/speech.types.d.ts +40 -0
- package/dist/sender-actions/voice-button/useSpeechHandler.d.ts +10 -0
- package/dist/sender-actions/voice-button/webSpeechHandler.d.ts +40 -0
- package/dist/sender-actions/word-counter/index.vue.d.ts +2 -0
- package/dist/sender-compat/index.d.ts +7 -0
- package/dist/sender-compat/index.type.d.ts +91 -0
- package/dist/sender-compat/index.vue.d.ts +532 -0
- package/dist/shared/composables/createTeleport.d.ts +2 -0
- package/dist/shared/composables/index.d.ts +5 -0
- package/dist/shared/composables/useAutoScroll.d.ts +25 -0
- package/dist/shared/composables/useSlotRefs.d.ts +12 -0
- package/dist/shared/composables/useTeleportTarget.d.ts +11 -0
- package/dist/shared/composables/useTouchDevice.d.ts +3 -0
- package/dist/shared/utils.d.ts +7 -0
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/components/PillButton.vue.d.ts +16 -0
- package/dist/suggestion-pills/components/index.d.ts +1 -0
- package/dist/suggestion-pills/index.d.ts +13 -0
- package/dist/suggestion-pills/index.js +13 -13
- package/dist/suggestion-pills/index.type.d.ts +45 -0
- package/dist/suggestion-pills/index.vue.d.ts +44 -0
- package/dist/suggestion-popover/components/Backdrop.vue.d.ts +5 -0
- package/dist/suggestion-popover/components/Header.vue.d.ts +4 -0
- package/dist/suggestion-popover/components/Loading.vue.d.ts +17 -0
- package/dist/suggestion-popover/components/NoData.vue.d.ts +17 -0
- package/dist/suggestion-popover/components/Tooltip.vue.d.ts +19 -0
- package/dist/suggestion-popover/index.d.ts +7 -0
- package/dist/suggestion-popover/index.js +122 -125
- package/dist/suggestion-popover/index.type.d.ts +80 -0
- package/dist/suggestion-popover/index.vue.d.ts +262 -0
- package/dist/theme-provider/constants.d.ts +6 -0
- package/dist/theme-provider/index.d.ts +9 -0
- package/dist/theme-provider/index.js +32 -41
- package/dist/theme-provider/index.type.d.ts +18 -0
- package/dist/theme-provider/index.vue.d.ts +32 -0
- package/dist/theme-provider/useTheme.d.ts +11 -0
- package/dist/useSlotRefs.js +1 -1
- package/dist/useTheme.js +22 -0
- package/dist/utils.js +1 -1
- package/dist/welcome/index.d.ts +7 -0
- package/dist/welcome/index.type.d.ts +10 -0
- package/dist/welcome/index.vue.d.ts +18 -0
- package/package.json +22 -3
- package/dist/no-data.js +0 -4
package/dist/index.js
CHANGED
|
@@ -16,12 +16,12 @@ import R from "./sender-compat/index.js";
|
|
|
16
16
|
import W, { SuggestionPillButton as $ } from "./suggestion-pills/index.js";
|
|
17
17
|
import w from "./suggestion-popover/index.js";
|
|
18
18
|
import k from "./theme-provider/index.js";
|
|
19
|
-
import { useTheme as $e } from "./theme-provider/index.js";
|
|
20
19
|
import N from "./welcome/index.js";
|
|
21
20
|
import V from "./mcp-server-picker/index.js";
|
|
22
21
|
import I from "./mcp-add-form/index.js";
|
|
23
|
-
import {
|
|
24
|
-
import { a as
|
|
22
|
+
import { u as $e } from "./useTheme.js";
|
|
23
|
+
import { A as U, a as K, _ as X, W as Y, D as q } from "./index2.js";
|
|
24
|
+
import { S as ke, u as Ne } from "./index2.js";
|
|
25
25
|
import { _ as G, V as J } from "./index3.js";
|
|
26
26
|
var u = /* @__PURE__ */ ((e) => (e.FileTypeNotAllowed = "file-type-not-allowed", e.FileSizeExceeded = "file-size-exceeded", e.FileCountExceeded = "file-count-exceeded", e))(u || {});
|
|
27
27
|
function Q(e, r) {
|
package/dist/index2.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { IconSend as
|
|
4
|
-
import { TinyTooltip as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { inject as R, isVNode as V, h as F, defineComponent as y, computed as l, openBlock as i, createBlock as f, unref as o, withCtx as S, createElementVNode as k, normalizeStyle as I, normalizeClass as v, renderSlot as B, resolveDynamicComponent as P, createElementBlock as b, createVNode as x, toDisplayString as T, createCommentVNode as h, useSlots as W, Transition as $ } from "vue";
|
|
2
|
+
import { _ as w } from "./_plugin-vue_export-helper.js";
|
|
3
|
+
import { IconSend as N, IconStop as j, IconClose as U } from "@opentiny/tiny-robot-svgs";
|
|
4
|
+
import { TinyTooltip as D } from "@opentiny/vue";
|
|
5
|
+
import { t as G } from "./utils.js";
|
|
6
|
+
const K = Symbol("sender-context");
|
|
7
|
+
function C() {
|
|
8
|
+
const t = R(K);
|
|
8
9
|
if (!t)
|
|
9
10
|
throw new Error("useSenderContext must be used within Sender component");
|
|
10
11
|
return t;
|
|
11
12
|
}
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
return t ? typeof t == "string" ? t.split(/\s+/).includes(
|
|
13
|
+
const A = "tr-sender-tooltip-inner";
|
|
14
|
+
function E(t) {
|
|
15
|
+
return t ? typeof t == "string" ? t.split(/\s+/).includes(A) : Array.isArray(t) ? t.some(E) : typeof t == "object" ? !!t[A] : !1 : !1;
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function z(t) {
|
|
17
18
|
var e;
|
|
18
|
-
return
|
|
19
|
+
return V(t) && E((e = t.props) == null ? void 0 : e.class) ? t : F("div", { class: A }, t);
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
+
function O(t) {
|
|
21
22
|
if (t)
|
|
22
|
-
return typeof t == "string" ? () =>
|
|
23
|
+
return typeof t == "string" ? () => z(t) : () => z(t());
|
|
23
24
|
}
|
|
24
|
-
const
|
|
25
|
+
const M = ["disabled"], X = ["disabled"], Y = /* @__PURE__ */ y({
|
|
25
26
|
__name: "index",
|
|
26
27
|
props: {
|
|
27
28
|
icon: {},
|
|
@@ -32,176 +33,193 @@ const K = ["disabled"], X = ["disabled"], Y = /* @__PURE__ */ y({
|
|
|
32
33
|
size: {}
|
|
33
34
|
},
|
|
34
35
|
setup(t) {
|
|
35
|
-
const e = t,
|
|
36
|
-
|
|
36
|
+
const e = t, n = {
|
|
37
|
+
normal: "32px",
|
|
38
|
+
small: "28px"
|
|
39
|
+
}, a = l(() => O(e.tooltip)), d = (s) => s === "small" ? {
|
|
40
|
+
"--tr-action-button-size": n.small
|
|
41
|
+
} : s === "normal" ? {
|
|
42
|
+
"--tr-action-button-size": n.normal
|
|
43
|
+
} : {
|
|
44
|
+
"--tr-action-button-size": G(s)
|
|
45
|
+
}, c = l(() => e.size ? d(e.size) : {});
|
|
46
|
+
return (s, u) => e.tooltip ? (i(), f(o(D), {
|
|
37
47
|
key: 0,
|
|
38
|
-
"render-content":
|
|
48
|
+
"render-content": a.value,
|
|
39
49
|
placement: e.tooltipPlacement,
|
|
40
50
|
effect: "light",
|
|
41
51
|
"visible-arrow": !1,
|
|
42
52
|
"popper-class": "tr-action-button-tooltip-popper"
|
|
43
53
|
}, {
|
|
44
|
-
default:
|
|
45
|
-
|
|
46
|
-
class:
|
|
54
|
+
default: S(() => [
|
|
55
|
+
k("button", {
|
|
56
|
+
class: v(["tr-action-button", { active: e.active }]),
|
|
57
|
+
style: I(c.value),
|
|
47
58
|
disabled: e.disabled,
|
|
48
|
-
onFocusCapture:
|
|
59
|
+
onFocusCapture: u[0] || (u[0] = (r) => r.stopPropagation())
|
|
49
60
|
}, [
|
|
50
|
-
|
|
51
|
-
(
|
|
52
|
-
style: B(r.value)
|
|
53
|
-
}, null, 8, ["style"]))
|
|
61
|
+
B(s.$slots, "icon", {}, () => [
|
|
62
|
+
(i(), f(P(e.icon)))
|
|
54
63
|
], !0)
|
|
55
|
-
],
|
|
64
|
+
], 46, M)
|
|
56
65
|
]),
|
|
57
66
|
_: 3
|
|
58
|
-
}, 8, ["render-content", "placement"])) : (
|
|
67
|
+
}, 8, ["render-content", "placement"])) : (i(), b("button", {
|
|
59
68
|
key: 1,
|
|
60
|
-
class:
|
|
69
|
+
class: v(["tr-action-button", { active: e.active }]),
|
|
70
|
+
style: I(c.value),
|
|
61
71
|
disabled: e.disabled
|
|
62
72
|
}, [
|
|
63
|
-
|
|
64
|
-
(
|
|
65
|
-
style: B(r.value)
|
|
66
|
-
}, null, 8, ["style"]))
|
|
73
|
+
B(s.$slots, "icon", {}, () => [
|
|
74
|
+
(i(), f(P(e.icon)))
|
|
67
75
|
], !0)
|
|
68
|
-
],
|
|
76
|
+
], 14, X));
|
|
69
77
|
}
|
|
70
|
-
}),
|
|
78
|
+
}), Z = /* @__PURE__ */ w(Y, [["__scopeId", "data-v-875619e6"]]), q = {
|
|
71
79
|
key: 0,
|
|
72
80
|
class: "tr-sender-submit-button__cancel-text"
|
|
73
81
|
}, H = /* @__PURE__ */ y({
|
|
74
82
|
__name: "index",
|
|
75
83
|
setup(t) {
|
|
76
|
-
const { canSubmit: e, loading:
|
|
77
|
-
var
|
|
78
|
-
return (
|
|
79
|
-
}),
|
|
80
|
-
var
|
|
81
|
-
return
|
|
82
|
-
}),
|
|
83
|
-
var
|
|
84
|
-
return ((
|
|
85
|
-
}),
|
|
86
|
-
|
|
84
|
+
const { canSubmit: e, loading: n, defaultActions: a, submit: d, cancel: c, stopText: s } = C(), u = l(() => {
|
|
85
|
+
var _, m;
|
|
86
|
+
return (m = (_ = a.value) == null ? void 0 : _.submit) != null && m.disabled ? !0 : !e.value && !n.value;
|
|
87
|
+
}), r = l(() => {
|
|
88
|
+
var _, m;
|
|
89
|
+
return O((m = (_ = a.value) == null ? void 0 : _.submit) == null ? void 0 : m.tooltip);
|
|
90
|
+
}), p = l(() => {
|
|
91
|
+
var _, m;
|
|
92
|
+
return ((m = (_ = a.value) == null ? void 0 : _.submit) == null ? void 0 : m.tooltipPlacement) ?? "top";
|
|
93
|
+
}), g = () => {
|
|
94
|
+
u.value || (n.value ? c() : d());
|
|
87
95
|
};
|
|
88
|
-
return (
|
|
96
|
+
return (_, m) => r.value && !o(n) ? (i(), f(o(D), {
|
|
89
97
|
key: 0,
|
|
90
|
-
"render-content":
|
|
91
|
-
placement:
|
|
98
|
+
"render-content": r.value,
|
|
99
|
+
placement: p.value,
|
|
92
100
|
effect: "light",
|
|
93
101
|
"visible-arrow": !1,
|
|
94
102
|
"popper-class": "tr-submit-button-tooltip-popper"
|
|
95
103
|
}, {
|
|
96
|
-
default:
|
|
97
|
-
|
|
98
|
-
class:
|
|
104
|
+
default: S(() => [
|
|
105
|
+
k("div", {
|
|
106
|
+
class: v([
|
|
99
107
|
"tr-sender-submit-button",
|
|
100
108
|
{
|
|
101
|
-
"is-disabled":
|
|
102
|
-
"is-loading":
|
|
109
|
+
"is-disabled": u.value,
|
|
110
|
+
"is-loading": o(n)
|
|
103
111
|
}
|
|
104
112
|
]),
|
|
105
|
-
onClick:
|
|
113
|
+
onClick: g
|
|
106
114
|
}, [
|
|
107
|
-
|
|
115
|
+
x(o(N), { class: "tr-sender-submit-button__icon" })
|
|
108
116
|
], 2)
|
|
109
117
|
]),
|
|
110
118
|
_: 1
|
|
111
|
-
}, 8, ["render-content", "placement"])) : (
|
|
119
|
+
}, 8, ["render-content", "placement"])) : (i(), b("div", {
|
|
112
120
|
key: 1,
|
|
113
|
-
class:
|
|
121
|
+
class: v([
|
|
114
122
|
"tr-sender-submit-button",
|
|
115
123
|
{
|
|
116
|
-
"is-disabled":
|
|
117
|
-
"is-loading":
|
|
124
|
+
"is-disabled": u.value,
|
|
125
|
+
"is-loading": o(n)
|
|
118
126
|
}
|
|
119
127
|
]),
|
|
120
|
-
onClick:
|
|
128
|
+
onClick: g
|
|
121
129
|
}, [
|
|
122
|
-
|
|
130
|
+
o(n) ? (i(), b("div", {
|
|
123
131
|
key: 1,
|
|
124
|
-
class:
|
|
132
|
+
class: v(["tr-sender-submit-button__cancel", { "icon-only": !o(s) }])
|
|
125
133
|
}, [
|
|
126
|
-
|
|
127
|
-
s
|
|
128
|
-
], 2)) : (
|
|
134
|
+
x(o(j), { class: "tr-sender-submit-button__cancel-icon" }),
|
|
135
|
+
o(s) ? (i(), b("span", q, T(o(s)), 1)) : h("", !0)
|
|
136
|
+
], 2)) : (i(), f(o(N), {
|
|
129
137
|
key: 0,
|
|
130
138
|
class: "tr-sender-submit-button__icon"
|
|
131
139
|
}))
|
|
132
140
|
], 2));
|
|
133
141
|
}
|
|
134
|
-
}), J = /* @__PURE__ */
|
|
142
|
+
}), J = /* @__PURE__ */ w(H, [["__scopeId", "data-v-a58e69fe"]]), L = () => {
|
|
143
|
+
const { hasContent: t, clearable: e, loading: n, defaultActions: a } = C(), d = l(() => {
|
|
144
|
+
var r, p;
|
|
145
|
+
return ((p = (r = a.value) == null ? void 0 : r.clear) == null ? void 0 : p.disabled) !== void 0 ? a.value.clear.disabled : !1;
|
|
146
|
+
}), c = l(() => {
|
|
147
|
+
var r, p;
|
|
148
|
+
return (p = (r = a.value) == null ? void 0 : r.clear) == null ? void 0 : p.tooltip;
|
|
149
|
+
}), s = l(() => {
|
|
150
|
+
var r, p;
|
|
151
|
+
return ((p = (r = a.value) == null ? void 0 : r.clear) == null ? void 0 : p.tooltipPlacement) ?? "top";
|
|
152
|
+
}), u = l(() => e.value && t.value && !n.value && !d.value);
|
|
153
|
+
return {
|
|
154
|
+
isDisabled: d,
|
|
155
|
+
tooltip: c,
|
|
156
|
+
tooltipPlacement: s,
|
|
157
|
+
show: u
|
|
158
|
+
};
|
|
159
|
+
}, Q = /* @__PURE__ */ y({
|
|
135
160
|
__name: "index",
|
|
136
161
|
setup(t) {
|
|
137
|
-
const {
|
|
138
|
-
|
|
139
|
-
return ((o = (n = l.value) == null ? void 0 : n.clear) == null ? void 0 : o.disabled) !== void 0 ? l.value.clear.disabled : !1;
|
|
140
|
-
}), _ = d(() => {
|
|
141
|
-
var n, o;
|
|
142
|
-
return (o = (n = l.value) == null ? void 0 : n.clear) == null ? void 0 : o.tooltip;
|
|
143
|
-
}), h = d(() => {
|
|
144
|
-
var n, o;
|
|
145
|
-
return ((o = (n = l.value) == null ? void 0 : n.clear) == null ? void 0 : o.tooltipPlacement) ?? "top";
|
|
146
|
-
}), z = d(() => i.value && e.value && !c.value && !u.value), C = () => {
|
|
147
|
-
u.value || r();
|
|
162
|
+
const { clear: e } = C(), { isDisabled: n, tooltip: a, tooltipPlacement: d, show: c } = L(), s = () => {
|
|
163
|
+
n.value || e();
|
|
148
164
|
};
|
|
149
|
-
return (
|
|
165
|
+
return (u, r) => o(c) ? (i(), f(Z, {
|
|
150
166
|
key: 0,
|
|
151
|
-
icon:
|
|
152
|
-
disabled:
|
|
153
|
-
tooltip:
|
|
154
|
-
"tooltip-placement":
|
|
155
|
-
onClick:
|
|
156
|
-
}, null, 8, ["icon", "disabled", "tooltip", "tooltip-placement"])) :
|
|
167
|
+
icon: o(U),
|
|
168
|
+
disabled: o(n),
|
|
169
|
+
tooltip: o(a),
|
|
170
|
+
"tooltip-placement": o(d),
|
|
171
|
+
onClick: s
|
|
172
|
+
}, null, 8, ["icon", "disabled", "tooltip", "tooltip-placement"])) : h("", !0);
|
|
157
173
|
}
|
|
158
|
-
}),
|
|
174
|
+
}), tt = {
|
|
159
175
|
key: 0,
|
|
160
176
|
class: "tr-sender-word-counter"
|
|
161
|
-
},
|
|
177
|
+
}, et = /* @__PURE__ */ y({
|
|
162
178
|
__name: "index",
|
|
163
179
|
setup(t) {
|
|
164
|
-
const { characterCount: e, maxLength:
|
|
165
|
-
return (
|
|
166
|
-
|
|
167
|
-
class:
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
])) :
|
|
180
|
+
const { characterCount: e, maxLength: n, isOverLimit: a, showWordLimit: d } = C(), c = l(() => d.value && n.value !== void 0);
|
|
181
|
+
return (s, u) => c.value ? (i(), b("span", tt, [
|
|
182
|
+
k("span", {
|
|
183
|
+
class: v({ "is-over-limit": o(a) })
|
|
184
|
+
}, T(o(e)), 3),
|
|
185
|
+
k("span", null, "/" + T(o(n)), 1)
|
|
186
|
+
])) : h("", !0);
|
|
171
187
|
}
|
|
172
|
-
}),
|
|
188
|
+
}), ut = /* @__PURE__ */ w(et, [["__scopeId", "data-v-206396cd"]]), ot = {
|
|
189
|
+
key: 0,
|
|
190
|
+
class: "tr-default-action-buttons"
|
|
191
|
+
}, nt = {
|
|
173
192
|
key: 0,
|
|
174
193
|
class: "tr-action-buttons-group"
|
|
175
|
-
},
|
|
194
|
+
}, st = /* @__PURE__ */ y({
|
|
176
195
|
__name: "index",
|
|
177
196
|
setup(t) {
|
|
178
|
-
const { hasContent:
|
|
179
|
-
return (
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
197
|
+
const e = W(), { hasContent: n, loading: a } = C(), { show: d } = L(), c = l(() => !!e.prepend), s = l(() => n.value || a.value), u = l(() => c.value || d.value), r = l(() => c.value || s.value);
|
|
198
|
+
return (p, g) => (i(), f($, { name: "tr-slide-right" }, {
|
|
199
|
+
default: S(() => [
|
|
200
|
+
r.value ? (i(), b("div", ot, [
|
|
201
|
+
u.value ? (i(), b("div", nt, [
|
|
202
|
+
B(p.$slots, "prepend", {}, void 0, !0),
|
|
203
|
+
x($, { name: "tr-slide-right" }, {
|
|
204
|
+
default: S(() => [
|
|
205
|
+
x(Q)
|
|
186
206
|
]),
|
|
187
207
|
_: 1
|
|
188
|
-
})
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
})
|
|
196
|
-
]));
|
|
208
|
+
})
|
|
209
|
+
])) : h("", !0),
|
|
210
|
+
s.value ? (i(), f(J, { key: 1 })) : h("", !0)
|
|
211
|
+
])) : h("", !0)
|
|
212
|
+
]),
|
|
213
|
+
_: 3
|
|
214
|
+
}));
|
|
197
215
|
}
|
|
198
|
-
}),
|
|
216
|
+
}), dt = /* @__PURE__ */ w(st, [["__scopeId", "data-v-e9441989"]]);
|
|
199
217
|
export {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
218
|
+
Z as A,
|
|
219
|
+
dt as D,
|
|
220
|
+
K as S,
|
|
221
|
+
ut as W,
|
|
222
|
+
Q as _,
|
|
223
|
+
J as a,
|
|
224
|
+
C as u
|
|
207
225
|
};
|
package/dist/index3.js
CHANGED
|
@@ -4,7 +4,7 @@ var C = (i, o, e) => D(i, typeof o != "symbol" ? o + "" : o, e);
|
|
|
4
4
|
import { defineComponent as B, toRefs as H, computed as R, watch as F, openBlock as S, createBlock as x, unref as p, ref as V, reactive as A, onUnmounted as P, createElementBlock as j, Fragment as U, normalizeClass as W, createSlots as L, withCtx as y, renderSlot as z, resolveDynamicComponent as M, createCommentVNode as N } from "vue";
|
|
5
5
|
import { e as O } from "./index4.js";
|
|
6
6
|
import { u as I, A as b } from "./index2.js";
|
|
7
|
-
import {
|
|
7
|
+
import { IconImageUpload as T, IconVoice as _, IconRecordingWave as q } from "@opentiny/tiny-robot-svgs";
|
|
8
8
|
import { _ as G } from "./_plugin-vue_export-helper.js";
|
|
9
9
|
const te = /* @__PURE__ */ B({
|
|
10
10
|
__name: "index",
|
package/dist/index4.js
CHANGED
|
@@ -754,20 +754,20 @@ function it(e = {}) {
|
|
|
754
754
|
return { width: r, height: s };
|
|
755
755
|
}
|
|
756
756
|
export {
|
|
757
|
-
|
|
758
|
-
|
|
757
|
+
Ke as a,
|
|
758
|
+
Ze as b,
|
|
759
759
|
et as c,
|
|
760
|
-
|
|
760
|
+
M as d,
|
|
761
761
|
tt as e,
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
762
|
+
de as f,
|
|
763
|
+
ot as g,
|
|
764
|
+
rt as h,
|
|
765
|
+
ve as i,
|
|
766
|
+
nt as j,
|
|
767
|
+
Qe as k,
|
|
768
|
+
it as l,
|
|
769
|
+
qe as m,
|
|
770
770
|
Je as o,
|
|
771
|
-
|
|
772
|
-
|
|
771
|
+
S as u,
|
|
772
|
+
Ue as w
|
|
773
773
|
};
|
package/dist/index6.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as S, openBlock as g, createElementBlock as C, renderSlot as E, ref as L, computed as y, watch as U, unref as B, normalizeClass as K, createVNode as
|
|
1
|
+
import { defineComponent as S, openBlock as g, createElementBlock as C, renderSlot as E, ref as L, computed as y, watch as U, unref as B, normalizeClass as K, createVNode as W, watchEffect as q, nextTick as ee, 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 j, markRaw as w, inject as I, provide as A, toValue as k, reactive as We, readonly as ze, withCtx as M, onMounted as ve, onUnmounted as Ve } 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 { j as Qe, m as et, d as tt, u as nt } from "./index4.js";
|
|
5
5
|
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
6
|
"bubble-box-prop-fallback-renderer"
|
|
7
7
|
), ke = Symbol("bubble-content-renderer-matches"), Se = Symbol(
|
|
@@ -67,7 +67,7 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
67
67
|
},
|
|
68
68
|
setup(t) {
|
|
69
69
|
return (e, n) => (g(), C("div", lt, [
|
|
70
|
-
|
|
70
|
+
W(B(he))
|
|
71
71
|
]));
|
|
72
72
|
}
|
|
73
73
|
}), $e = /* @__PURE__ */ N(ct, [["__scopeId", "data-v-bc1b5ff4"]]), ut = { class: "title" }, it = { class: "detail" }, dt = /* @__PURE__ */ S({
|
|
@@ -110,10 +110,10 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
110
110
|
x("div", {
|
|
111
111
|
class: K(["icon-and-text", { thinking: (p = e.message.state) == null ? void 0 : p.thinking }])
|
|
112
112
|
}, [
|
|
113
|
-
|
|
113
|
+
W(B(Xe)),
|
|
114
114
|
x("span", ut, z((f = e.message.state) != null && f.thinking ? "正在思考" : "已思考"), 1)
|
|
115
115
|
], 2),
|
|
116
|
-
|
|
116
|
+
W(B(ye), {
|
|
117
117
|
class: K(["expand-icon", { "-rotate-90": !i.value }])
|
|
118
118
|
}, null, 8, ["class"])
|
|
119
119
|
]),
|
|
@@ -189,7 +189,7 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
189
189
|
} catch {
|
|
190
190
|
}
|
|
191
191
|
return R;
|
|
192
|
-
}, u =
|
|
192
|
+
}, u = je(), b = (_) => _.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), m = (_) => {
|
|
193
193
|
if (!_)
|
|
194
194
|
return "";
|
|
195
195
|
let v = b(_);
|
|
@@ -236,7 +236,7 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
236
236
|
])
|
|
237
237
|
]),
|
|
238
238
|
x("div", vt, [
|
|
239
|
-
|
|
239
|
+
W(B(ye), {
|
|
240
240
|
class: K(["expand-icon", { "-rotate-90": !d.value }]),
|
|
241
241
|
onClick: c
|
|
242
242
|
}, null, 8, ["class"])
|
|
@@ -276,7 +276,7 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
276
276
|
return (i, s) => (g(), C(F, null, [
|
|
277
277
|
(g(), T(Y(B(r).renderer), P(D({ ...B(r).attributes, ...B(o) })), null, 16)),
|
|
278
278
|
x("div", $({ class: "tr-bubble__tools" }, i.$attrs), [
|
|
279
|
-
(g(!0), C(F, null,
|
|
279
|
+
(g(!0), C(F, null, j(e.message.tool_calls, (a, u) => (g(), T(we, $({
|
|
280
280
|
key: a.id
|
|
281
281
|
}, { ref_for: !0 }, e, { "tool-call-index": u }), null, 16, ["tool-call-index"]))), 128))
|
|
282
282
|
], 16)
|
|
@@ -401,7 +401,7 @@ function ce(t) {
|
|
|
401
401
|
const e = I(oe, void 0);
|
|
402
402
|
if (e)
|
|
403
403
|
return e;
|
|
404
|
-
const n =
|
|
404
|
+
const n = We(t || {});
|
|
405
405
|
return A(oe, n), n;
|
|
406
406
|
}
|
|
407
407
|
function ue() {
|
|
@@ -616,7 +616,7 @@ const Ft = async () => {
|
|
|
616
616
|
class: K(["tr-bubble__avatar", l.$style["tr-bubble__avatar"]])
|
|
617
617
|
}, null, 8, ["class"])) : se("", !0),
|
|
618
618
|
x("div", Ht, [
|
|
619
|
-
m.value ? (g(!0), C(F, { key: 0 },
|
|
619
|
+
m.value ? (g(!0), C(F, { key: 0 }, j(m.value, (h, c) => (g(), T(_e, {
|
|
620
620
|
key: c,
|
|
621
621
|
class: "tr-bubble__box",
|
|
622
622
|
role: n.role,
|
|
@@ -626,7 +626,7 @@ const Ft = async () => {
|
|
|
626
626
|
"content-index": c
|
|
627
627
|
}, {
|
|
628
628
|
default: M(() => [
|
|
629
|
-
|
|
629
|
+
W(me, {
|
|
630
630
|
message: a.value.at(0),
|
|
631
631
|
"content-index": c,
|
|
632
632
|
onStateChange: d[0] || (d[0] = (_) => r("state-change", { ..._, messageIndex: 0 }))
|
|
@@ -646,10 +646,10 @@ const Ft = async () => {
|
|
|
646
646
|
messages: a.value
|
|
647
647
|
}, {
|
|
648
648
|
default: M(() => [
|
|
649
|
-
(g(!0), C(F, null,
|
|
649
|
+
(g(!0), C(F, null, j(a.value, (h, c) => (g(), C(F, {
|
|
650
650
|
key: `message-${c}`
|
|
651
651
|
}, [
|
|
652
|
-
(g(!0), C(F, null,
|
|
652
|
+
(g(!0), C(F, null, j(u(h), (_, v) => (g(), T(me, {
|
|
653
653
|
key: `content-${v}`,
|
|
654
654
|
message: h,
|
|
655
655
|
"content-index": v,
|
|
@@ -690,7 +690,7 @@ function ge(t, e) {
|
|
|
690
690
|
});
|
|
691
691
|
return n;
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function jt(t, e, n) {
|
|
694
694
|
const { scrollOnMount: o = !0, bottomThreshold: r = 20, scrollThrottle: i = 0 } = n ?? {}, s = L(!0);
|
|
695
695
|
let a = !1;
|
|
696
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") => {
|
|
@@ -737,7 +737,7 @@ function Wt(t, e, n) {
|
|
|
737
737
|
arrivedState: f
|
|
738
738
|
};
|
|
739
739
|
}
|
|
740
|
-
const
|
|
740
|
+
const Wt = /* @__PURE__ */ S({
|
|
741
741
|
__name: "BubbleItem",
|
|
742
742
|
props: {
|
|
743
743
|
messageGroup: {},
|
|
@@ -792,7 +792,7 @@ const jt = /* @__PURE__ */ S({
|
|
|
792
792
|
let a = async () => {
|
|
793
793
|
};
|
|
794
794
|
if (o.autoScroll) {
|
|
795
|
-
const p = y(() => o.messages.at(-1)), { scrollToBottom: f } =
|
|
795
|
+
const p = y(() => o.messages.at(-1)), { scrollToBottom: f } = jt(s, () => {
|
|
796
796
|
var l, d;
|
|
797
797
|
return [
|
|
798
798
|
o.messages.length,
|
|
@@ -848,9 +848,9 @@ const jt = /* @__PURE__ */ S({
|
|
|
848
848
|
ref_key: "listRef",
|
|
849
849
|
ref: s
|
|
850
850
|
}, [
|
|
851
|
-
(g(!0), C(F, null,
|
|
851
|
+
(g(!0), C(F, null, j(m.value, (l, d) => {
|
|
852
852
|
var h;
|
|
853
|
-
return g(), T(
|
|
853
|
+
return g(), T(Wt, {
|
|
854
854
|
key: d,
|
|
855
855
|
role: l.role || o.fallbackRole,
|
|
856
856
|
"role-config": (h = o.roleConfigs) == null ? void 0 : h[l.role || o.fallbackRole],
|
|
@@ -974,5 +974,5 @@ export {
|
|
|
974
974
|
ie as h,
|
|
975
975
|
Ye as i,
|
|
976
976
|
Pt as j,
|
|
977
|
-
|
|
977
|
+
jt as u
|
|
978
978
|
};
|