@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.
Files changed (261) hide show
  1. package/dist/action-group/ActionGroup.vue.d.ts +26 -0
  2. package/dist/action-group/ActionGroupItem.vue.d.ts +18 -0
  3. package/dist/action-group/index.d.ts +12 -0
  4. package/dist/action-group/index.js +3 -3
  5. package/dist/action-group/index.type.d.ts +17 -0
  6. package/dist/anchor/components/AnchorItem.vue.d.ts +24 -0
  7. package/dist/anchor/components/AnchorList.vue.d.ts +20 -0
  8. package/dist/anchor/components/AnchorOverlay.vue.d.ts +33 -0
  9. package/dist/anchor/components/AnchorSearch.vue.d.ts +7 -0
  10. package/dist/anchor/composables/index.d.ts +5 -0
  11. package/dist/anchor/composables/useActiveSync.d.ts +10 -0
  12. package/dist/anchor/composables/useFloatingOffset.d.ts +6 -0
  13. package/dist/anchor/composables/useNavController.d.ts +12 -0
  14. package/dist/anchor/composables/useOverlayInteractions.d.ts +6 -0
  15. package/dist/anchor/composables/useTargetFeedback.d.ts +5 -0
  16. package/dist/anchor/defaults.d.ts +16 -0
  17. package/dist/anchor/index.d.ts +7 -0
  18. package/dist/anchor/index.js +44 -44
  19. package/dist/anchor/index.type.d.ts +60 -0
  20. package/dist/anchor/index.vue.d.ts +159 -0
  21. package/dist/anchor/internal.type.d.ts +103 -0
  22. package/dist/anchor/utils/scroll.d.ts +7 -0
  23. package/dist/anchor/utils/target.d.ts +6 -0
  24. package/dist/attachments/components/FileCard.vue.d.ts +18 -0
  25. package/dist/attachments/components/ImagePreview.vue.d.ts +17 -0
  26. package/dist/attachments/components/index.d.ts +2 -0
  27. package/dist/attachments/composables/index.d.ts +5 -0
  28. package/dist/attachments/composables/useFileCard.d.ts +15 -0
  29. package/dist/attachments/composables/useFileType.d.ts +20 -0
  30. package/dist/attachments/composables/useImagePreview.d.ts +18 -0
  31. package/dist/attachments/composables/useListType.d.ts +11 -0
  32. package/dist/attachments/index.d.ts +7 -0
  33. package/dist/attachments/index.js +96 -96
  34. package/dist/attachments/index.type.d.ts +70 -0
  35. package/dist/attachments/index.vue.d.ts +27 -0
  36. package/dist/attachments/utils.d.ts +3 -0
  37. package/dist/base-popper/components/Popper.vue.d.ts +28 -0
  38. package/dist/base-popper/index.d.ts +2 -0
  39. package/dist/base-popper/index.vue.d.ts +41 -0
  40. package/dist/bubble/Bubble.vue.d.ts +39 -0
  41. package/dist/bubble/BubbleBoxWrapper.vue.d.ts +22 -0
  42. package/dist/bubble/BubbleContentWrapper.vue.d.ts +16 -0
  43. package/dist/bubble/BubbleItem.vue.d.ts +36 -0
  44. package/dist/bubble/BubbleList.vue.d.ts +41 -0
  45. package/dist/bubble/BubbleProvider.vue.d.ts +18 -0
  46. package/dist/bubble/composables/index.d.ts +10 -0
  47. package/dist/bubble/composables/useBubbleBoxRenderer.d.ts +18 -0
  48. package/dist/bubble/composables/useBubbleContentRenderer.d.ts +18 -0
  49. package/dist/bubble/composables/useBubbleStateChange.d.ts +2 -0
  50. package/dist/bubble/composables/useBubbleStore.d.ts +16 -0
  51. package/dist/bubble/composables/useContentResolver.d.ts +5 -0
  52. package/dist/bubble/composables/useCopyCleanup.d.ts +6 -0
  53. package/dist/bubble/composables/useMessageContent.d.ts +5 -0
  54. package/dist/bubble/composables/useMessageGroup.d.ts +4 -0
  55. package/dist/bubble/composables/useOmitMessageFields.d.ts +12 -0
  56. package/dist/bubble/composables/useToolCall.d.ts +25 -0
  57. package/dist/bubble/constants.d.ts +42 -0
  58. package/dist/bubble/index.d.ts +19 -0
  59. package/dist/bubble/index.type.d.ts +171 -0
  60. package/dist/bubble/renderers/Box.vue.d.ts +18 -0
  61. package/dist/bubble/renderers/Image.vue.d.ts +4 -0
  62. package/dist/bubble/renderers/Loading.vue.d.ts +4 -0
  63. package/dist/bubble/renderers/Markdown.vue.d.ts +4 -0
  64. package/dist/bubble/renderers/Reasoning.vue.d.ts +9 -0
  65. package/dist/bubble/renderers/Text.vue.d.ts +4 -0
  66. package/dist/bubble/renderers/Tool.vue.d.ts +14 -0
  67. package/dist/bubble/renderers/ToolRole.vue.d.ts +4 -0
  68. package/dist/bubble/renderers/Tools.vue.d.ts +4 -0
  69. package/dist/bubble/renderers/allRenderers.d.ts +93 -0
  70. package/dist/bubble/renderers/defaultRenderers.d.ts +27 -0
  71. package/dist/bubble/utils.d.ts +7 -0
  72. package/dist/chat/components/ChatConversation.vue.d.ts +70 -0
  73. package/dist/chat/components/ChatLauncherButton.vue.d.ts +12 -0
  74. package/dist/chat/components/ChatMcpTrigger.vue.d.ts +30 -0
  75. package/dist/chat/components/ChatThemeToggleButton.vue.d.ts +2 -0
  76. package/dist/chat/components/ChatWelcome.vue.d.ts +13 -0
  77. package/dist/chat/composables/useChatConversation.d.ts +37 -0
  78. package/dist/chat/composables/useChatMcp.d.ts +29 -0
  79. package/dist/chat/composables/useChatModel.d.ts +27 -0
  80. package/dist/chat/index.d.ts +9 -0
  81. package/dist/chat/index.js +13701 -0
  82. package/dist/chat/index.type.d.ts +88 -0
  83. package/dist/chat/index.vue.d.ts +58 -0
  84. package/dist/container/index.d.ts +7 -0
  85. package/dist/container/index.js +13 -13
  86. package/dist/container/index.type.d.ts +20 -0
  87. package/dist/container/index.vue.d.ts +32 -0
  88. package/dist/conversations/index.d.ts +7 -0
  89. package/dist/conversations/index.vue.d.ts +2 -0
  90. package/dist/drag-overlay/constants.d.ts +17 -0
  91. package/dist/drag-overlay/directives/vDropzone.d.ts +14 -0
  92. package/dist/drag-overlay/index.d.ts +7 -0
  93. package/dist/drag-overlay/index.js +1 -1
  94. package/dist/drag-overlay/index.type.d.ts +105 -0
  95. package/dist/drag-overlay/index.vue.d.ts +20 -0
  96. package/dist/dropdown-menu/composables/usePopperHover.d.ts +6 -0
  97. package/dist/dropdown-menu/index.d.ts +7 -0
  98. package/dist/dropdown-menu/index.js +18 -18
  99. package/dist/dropdown-menu/index.type.d.ts +42 -0
  100. package/dist/dropdown-menu/index.vue.d.ts +217 -0
  101. package/dist/feedback/components/SourceList.vue.d.ts +11 -0
  102. package/dist/feedback/components/index.d.ts +1 -0
  103. package/dist/feedback/index.d.ts +7 -0
  104. package/dist/feedback/index.type.d.ts +25 -0
  105. package/dist/feedback/index.vue.d.ts +13 -0
  106. package/dist/flow-layout-buttons/index.d.ts +7 -0
  107. package/dist/flow-layout-buttons/index.js +1 -1
  108. package/dist/flow-layout-buttons/index.type.d.ts +35 -0
  109. package/dist/flow-layout-buttons/index.vue.d.ts +22 -0
  110. package/dist/history/components/Empty.vue.d.ts +7 -0
  111. package/dist/history/components/MenuList.vue.d.ts +24 -0
  112. package/dist/history/composables/useRenameEditor.d.ts +22 -0
  113. package/dist/history/constants.d.ts +1 -0
  114. package/dist/history/index.d.ts +7 -0
  115. package/dist/history/index.type.d.ts +33 -0
  116. package/dist/history/index.vue.d.ts +18 -0
  117. package/dist/icon-button/index.d.ts +7 -0
  118. package/dist/icon-button/index.type.d.ts +7 -0
  119. package/dist/icon-button/index.vue.d.ts +6 -0
  120. package/dist/index.d.ts +49 -4999
  121. package/dist/index.js +3 -3
  122. package/dist/index2.js +139 -121
  123. package/dist/index3.js +1 -1
  124. package/dist/index4.js +13 -13
  125. package/dist/index6.js +19 -19
  126. package/dist/index7.js +30 -30
  127. package/dist/index8.js +8 -8
  128. package/dist/mcp-add-form/components/CodeEditor.vue.d.ts +9 -0
  129. package/dist/mcp-add-form/components/FormEditor.vue.d.ts +10 -0
  130. package/dist/mcp-add-form/components/index.d.ts +2 -0
  131. package/dist/mcp-add-form/index.d.ts +7 -0
  132. package/dist/mcp-add-form/index.type.d.ts +19 -0
  133. package/dist/mcp-add-form/index.vue.d.ts +13 -0
  134. package/dist/mcp-server-picker/components/NoData.vue.d.ts +7 -0
  135. package/dist/mcp-server-picker/components/PluginCard.vue.d.ts +40 -0
  136. package/dist/mcp-server-picker/components/PluginModal.vue.d.ts +15 -0
  137. package/dist/mcp-server-picker/components/index.d.ts +3 -0
  138. package/dist/mcp-server-picker/index.d.ts +7 -0
  139. package/dist/mcp-server-picker/index.js +178 -177
  140. package/dist/mcp-server-picker/index.type.d.ts +99 -0
  141. package/dist/mcp-server-picker/index.vue.d.ts +71 -0
  142. package/dist/prompts/index.d.ts +12 -0
  143. package/dist/prompts/index.type.d.ts +59 -0
  144. package/dist/prompts/prompt.vue.d.ts +5 -0
  145. package/dist/prompts/prompts.vue.d.ts +20 -0
  146. package/dist/sender/components/editor-content/index.vue.d.ts +4 -0
  147. package/dist/sender/components/footer/index.vue.d.ts +38 -0
  148. package/dist/sender/components/layouts/MultiLineLayout.vue.d.ts +43 -0
  149. package/dist/sender/components/layouts/SingleLineLayout.vue.d.ts +32 -0
  150. package/dist/sender/composables/index.d.ts +7 -0
  151. package/dist/sender/composables/useAutoSize.d.ts +5 -0
  152. package/dist/sender/composables/useEditor.d.ts +13 -0
  153. package/dist/sender/composables/useKeyboardShortcuts.d.ts +7 -0
  154. package/dist/sender/composables/useModeSwitch.d.ts +4 -0
  155. package/dist/sender/composables/useSenderCore.d.ts +31 -0
  156. package/dist/sender/composables/useSlotScope.d.ts +10 -0
  157. package/dist/sender/context/index.d.ts +6 -0
  158. package/dist/sender/context/types.d.ts +7 -0
  159. package/dist/sender/extensions/constants.d.ts +94 -0
  160. package/dist/sender/extensions/index.d.ts +12 -0
  161. package/dist/sender/extensions/mention/commands.d.ts +20 -0
  162. package/dist/sender/extensions/mention/components/mention-list.vue.d.ts +18 -0
  163. package/dist/sender/extensions/mention/components/mention-view.vue.d.ts +19 -0
  164. package/dist/sender/extensions/mention/extension.d.ts +6 -0
  165. package/dist/sender/extensions/mention/index.d.ts +22 -0
  166. package/dist/sender/extensions/mention/plugin.d.ts +16 -0
  167. package/dist/sender/extensions/mention/types.d.ts +126 -0
  168. package/dist/sender/extensions/mention/utils.d.ts +34 -0
  169. package/dist/sender/extensions/suggestion/extension.d.ts +8 -0
  170. package/dist/sender/extensions/suggestion/index.d.ts +20 -0
  171. package/dist/sender/extensions/suggestion/plugin.d.ts +21 -0
  172. package/dist/sender/extensions/suggestion/suggestion-list.vue.d.ts +46 -0
  173. package/dist/sender/extensions/suggestion/types.d.ts +254 -0
  174. package/dist/sender/extensions/suggestion/utils/filter.d.ts +29 -0
  175. package/dist/sender/extensions/suggestion/utils/highlight.d.ts +73 -0
  176. package/dist/sender/extensions/template/block/extension.d.ts +6 -0
  177. package/dist/sender/extensions/template/block/plugins.d.ts +13 -0
  178. package/dist/sender/extensions/template/block/template-block-view.vue.d.ts +14 -0
  179. package/dist/sender/extensions/template/commands.d.ts +31 -0
  180. package/dist/sender/extensions/template/extension.d.ts +6 -0
  181. package/dist/sender/extensions/template/index.d.ts +21 -0
  182. package/dist/sender/extensions/template/select/dropdown-manager.d.ts +23 -0
  183. package/dist/sender/extensions/template/select/extension.d.ts +5 -0
  184. package/dist/sender/extensions/template/select/plugins.d.ts +34 -0
  185. package/dist/sender/extensions/template/select/template-select-view.vue.d.ts +20 -0
  186. package/dist/sender/extensions/template/types.d.ts +100 -0
  187. package/dist/sender/extensions/template/utils.d.ts +20 -0
  188. package/dist/sender/extensions/utils/id-generator.d.ts +16 -0
  189. package/dist/sender/extensions/utils/index.d.ts +7 -0
  190. package/dist/sender/extensions/utils/keyboard.d.ts +49 -0
  191. package/dist/sender/extensions/utils/position.d.ts +25 -0
  192. package/dist/sender/index.d.ts +136 -0
  193. package/dist/sender/index.js +178 -164
  194. package/dist/sender/index.type.d.ts +302 -0
  195. package/dist/sender/index.vue.d.ts +90 -0
  196. package/dist/sender/types/base.d.ts +239 -0
  197. package/dist/sender/types/components.d.ts +68 -0
  198. package/dist/sender/types/composables.d.ts +122 -0
  199. package/dist/sender/types/context.d.ts +132 -0
  200. package/dist/sender/types/slots.d.ts +67 -0
  201. package/dist/sender/utils/countGraphemes.d.ts +1 -0
  202. package/dist/sender-actions/action-button/index.vue.d.ts +23 -0
  203. package/dist/sender-actions/clear-button/index.vue.d.ts +2 -0
  204. package/dist/sender-actions/clear-button/useClearButtonState.d.ts +6 -0
  205. package/dist/sender-actions/default-actions/index.vue.d.ts +17 -0
  206. package/dist/sender-actions/index.d.ts +21 -0
  207. package/dist/sender-actions/index.js +1 -1
  208. package/dist/sender-actions/index.type.d.ts +7 -0
  209. package/dist/sender-actions/submit-button/index.vue.d.ts +2 -0
  210. package/dist/sender-actions/types/common.d.ts +40 -0
  211. package/dist/sender-actions/types/index.d.ts +5 -0
  212. package/dist/sender-actions/types/tooltip.d.ts +7 -0
  213. package/dist/sender-actions/upload-button/index.type.d.ts +57 -0
  214. package/dist/sender-actions/upload-button/index.vue.d.ts +16 -0
  215. package/dist/sender-actions/utils/tooltip.d.ts +8 -0
  216. package/dist/sender-actions/voice-button/index.type.d.ts +78 -0
  217. package/dist/sender-actions/voice-button/index.vue.d.ts +43 -0
  218. package/dist/sender-actions/voice-button/speech.types.d.ts +40 -0
  219. package/dist/sender-actions/voice-button/useSpeechHandler.d.ts +10 -0
  220. package/dist/sender-actions/voice-button/webSpeechHandler.d.ts +40 -0
  221. package/dist/sender-actions/word-counter/index.vue.d.ts +2 -0
  222. package/dist/sender-compat/index.d.ts +7 -0
  223. package/dist/sender-compat/index.type.d.ts +91 -0
  224. package/dist/sender-compat/index.vue.d.ts +532 -0
  225. package/dist/shared/composables/createTeleport.d.ts +2 -0
  226. package/dist/shared/composables/index.d.ts +5 -0
  227. package/dist/shared/composables/useAutoScroll.d.ts +25 -0
  228. package/dist/shared/composables/useSlotRefs.d.ts +12 -0
  229. package/dist/shared/composables/useTeleportTarget.d.ts +11 -0
  230. package/dist/shared/composables/useTouchDevice.d.ts +3 -0
  231. package/dist/shared/utils.d.ts +7 -0
  232. package/dist/style.css +1 -1
  233. package/dist/suggestion-pills/components/PillButton.vue.d.ts +16 -0
  234. package/dist/suggestion-pills/components/index.d.ts +1 -0
  235. package/dist/suggestion-pills/index.d.ts +13 -0
  236. package/dist/suggestion-pills/index.js +13 -13
  237. package/dist/suggestion-pills/index.type.d.ts +45 -0
  238. package/dist/suggestion-pills/index.vue.d.ts +44 -0
  239. package/dist/suggestion-popover/components/Backdrop.vue.d.ts +5 -0
  240. package/dist/suggestion-popover/components/Header.vue.d.ts +4 -0
  241. package/dist/suggestion-popover/components/Loading.vue.d.ts +17 -0
  242. package/dist/suggestion-popover/components/NoData.vue.d.ts +17 -0
  243. package/dist/suggestion-popover/components/Tooltip.vue.d.ts +19 -0
  244. package/dist/suggestion-popover/index.d.ts +7 -0
  245. package/dist/suggestion-popover/index.js +122 -125
  246. package/dist/suggestion-popover/index.type.d.ts +80 -0
  247. package/dist/suggestion-popover/index.vue.d.ts +262 -0
  248. package/dist/theme-provider/constants.d.ts +6 -0
  249. package/dist/theme-provider/index.d.ts +9 -0
  250. package/dist/theme-provider/index.js +32 -41
  251. package/dist/theme-provider/index.type.d.ts +18 -0
  252. package/dist/theme-provider/index.vue.d.ts +32 -0
  253. package/dist/theme-provider/useTheme.d.ts +11 -0
  254. package/dist/useSlotRefs.js +1 -1
  255. package/dist/useTheme.js +22 -0
  256. package/dist/utils.js +1 -1
  257. package/dist/welcome/index.d.ts +7 -0
  258. package/dist/welcome/index.type.d.ts +10 -0
  259. package/dist/welcome/index.vue.d.ts +18 -0
  260. package/package.json +22 -3
  261. 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 { A as U, S as K, _ as X, W as Y, D as q } from "./index2.js";
24
- import { a as ke, u as Ne } from "./index2.js";
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 O, isVNode as R, h as V, defineComponent as y, computed as d, openBlock as a, createBlock as f, unref as s, withCtx as x, createElementVNode as v, normalizeClass as b, renderSlot as T, resolveDynamicComponent as $, normalizeStyle as B, createElementBlock as p, createVNode as m, toDisplayString as w, createCommentVNode as S, Transition as A } from "vue";
2
- import { _ as k } from "./_plugin-vue_export-helper.js";
3
- import { IconSend as E, IconStop as F, IconClear as W } from "@opentiny/tiny-robot-svgs";
4
- import { TinyTooltip as P } from "@opentiny/vue";
5
- const j = Symbol("sender-context");
6
- function g() {
7
- const t = O(j);
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 I = "tr-sender-tooltip-inner";
13
- function D(t) {
14
- return t ? typeof t == "string" ? t.split(/\s+/).includes(I) : Array.isArray(t) ? t.some(D) : typeof t == "object" ? !!t[I] : !1 : !1;
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 N(t) {
17
+ function z(t) {
17
18
  var e;
18
- return R(t) && D((e = t.props) == null ? void 0 : e.class) ? t : V("div", { class: I }, t);
19
+ return V(t) && E((e = t.props) == null ? void 0 : e.class) ? t : F("div", { class: A }, t);
19
20
  }
20
- function L(t) {
21
+ function O(t) {
21
22
  if (t)
22
- return typeof t == "string" ? () => N(t) : () => N(t());
23
+ return typeof t == "string" ? () => z(t) : () => z(t());
23
24
  }
24
- const K = ["disabled"], X = ["disabled"], Y = /* @__PURE__ */ y({
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, i = d(() => L(e.tooltip)), r = d(() => e.size ? { fontSize: typeof e.size == "number" ? `${e.size}px` : e.size } : {});
36
- return (c, l) => e.tooltip ? (a(), f(s(P), {
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": i.value,
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: x(() => [
45
- v("button", {
46
- class: b(["tr-action-button", { active: e.active }]),
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: l[0] || (l[0] = (u) => u.stopPropagation())
59
+ onFocusCapture: u[0] || (u[0] = (r) => r.stopPropagation())
49
60
  }, [
50
- T(c.$slots, "icon", {}, () => [
51
- (a(), f($(e.icon), {
52
- style: B(r.value)
53
- }, null, 8, ["style"]))
61
+ B(s.$slots, "icon", {}, () => [
62
+ (i(), f(P(e.icon)))
54
63
  ], !0)
55
- ], 42, K)
64
+ ], 46, M)
56
65
  ]),
57
66
  _: 3
58
- }, 8, ["render-content", "placement"])) : (a(), p("button", {
67
+ }, 8, ["render-content", "placement"])) : (i(), b("button", {
59
68
  key: 1,
60
- class: b(["tr-action-button", { active: e.active }]),
69
+ class: v(["tr-action-button", { active: e.active }]),
70
+ style: I(c.value),
61
71
  disabled: e.disabled
62
72
  }, [
63
- T(c.$slots, "icon", {}, () => [
64
- (a(), f($(e.icon), {
65
- style: B(r.value)
66
- }, null, 8, ["style"]))
73
+ B(s.$slots, "icon", {}, () => [
74
+ (i(), f(P(e.icon)))
67
75
  ], !0)
68
- ], 10, X));
76
+ ], 14, X));
69
77
  }
70
- }), q = /* @__PURE__ */ k(Y, [["__scopeId", "data-v-d6737627"]]), G = {
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: i, defaultActions: r, submit: c, cancel: l, stopText: u } = g(), _ = d(() => {
77
- var n, o;
78
- return (o = (n = r.value) == null ? void 0 : n.submit) != null && o.disabled ? !0 : !e.value && !i.value;
79
- }), h = d(() => {
80
- var n, o;
81
- return L((o = (n = r.value) == null ? void 0 : n.submit) == null ? void 0 : o.tooltip);
82
- }), z = d(() => {
83
- var n, o;
84
- return ((o = (n = r.value) == null ? void 0 : n.submit) == null ? void 0 : o.tooltipPlacement) ?? "top";
85
- }), C = () => {
86
- _.value || (i.value ? l() : c());
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 (n, o) => h.value && !s(i) ? (a(), f(s(P), {
96
+ return (_, m) => r.value && !o(n) ? (i(), f(o(D), {
89
97
  key: 0,
90
- "render-content": h.value,
91
- placement: z.value,
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: x(() => [
97
- v("div", {
98
- class: b([
104
+ default: S(() => [
105
+ k("div", {
106
+ class: v([
99
107
  "tr-sender-submit-button",
100
108
  {
101
- "is-disabled": _.value,
102
- "is-loading": s(i)
109
+ "is-disabled": u.value,
110
+ "is-loading": o(n)
103
111
  }
104
112
  ]),
105
- onClick: C
113
+ onClick: g
106
114
  }, [
107
- m(s(E), { class: "tr-sender-submit-button__icon" })
115
+ x(o(N), { class: "tr-sender-submit-button__icon" })
108
116
  ], 2)
109
117
  ]),
110
118
  _: 1
111
- }, 8, ["render-content", "placement"])) : (a(), p("div", {
119
+ }, 8, ["render-content", "placement"])) : (i(), b("div", {
112
120
  key: 1,
113
- class: b([
121
+ class: v([
114
122
  "tr-sender-submit-button",
115
123
  {
116
- "is-disabled": _.value,
117
- "is-loading": s(i)
124
+ "is-disabled": u.value,
125
+ "is-loading": o(n)
118
126
  }
119
127
  ]),
120
- onClick: C
128
+ onClick: g
121
129
  }, [
122
- s(i) ? (a(), p("div", {
130
+ o(n) ? (i(), b("div", {
123
131
  key: 1,
124
- class: b(["tr-sender-submit-button__cancel", { "icon-only": !s(u) }])
132
+ class: v(["tr-sender-submit-button__cancel", { "icon-only": !o(s) }])
125
133
  }, [
126
- m(s(F), { class: "tr-sender-submit-button__cancel-icon" }),
127
- s(u) ? (a(), p("span", G, w(s(u)), 1)) : S("", !0)
128
- ], 2)) : (a(), f(s(E), {
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__ */ k(H, [["__scopeId", "data-v-a58e69fe"]]), M = /* @__PURE__ */ y({
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 { hasContent: e, clearable: i, clear: r, loading: c, defaultActions: l } = g(), u = d(() => {
138
- var n, o;
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 (n, o) => z.value ? (a(), f(q, {
165
+ return (u, r) => o(c) ? (i(), f(Z, {
150
166
  key: 0,
151
- icon: s(W),
152
- disabled: u.value,
153
- tooltip: _.value,
154
- "tooltip-placement": h.value,
155
- onClick: C
156
- }, null, 8, ["icon", "disabled", "tooltip", "tooltip-placement"])) : S("", !0);
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
- }), Q = {
174
+ }), tt = {
159
175
  key: 0,
160
176
  class: "tr-sender-word-counter"
161
- }, U = /* @__PURE__ */ y({
177
+ }, et = /* @__PURE__ */ y({
162
178
  __name: "index",
163
179
  setup(t) {
164
- const { characterCount: e, maxLength: i, isOverLimit: r, showWordLimit: c } = g(), l = d(() => c.value && i.value !== void 0);
165
- return (u, _) => l.value ? (a(), p("span", Q, [
166
- v("span", {
167
- class: b({ "is-over-limit": s(r) })
168
- }, w(s(e)), 3),
169
- v("span", null, "/" + w(s(i)), 1)
170
- ])) : S("", !0);
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
- }), rt = /* @__PURE__ */ k(U, [["__scopeId", "data-v-206396cd"]]), Z = { class: "tr-default-action-buttons" }, tt = {
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
- }, et = { class: "tr-submit-wrapper" }, nt = /* @__PURE__ */ y({
194
+ }, st = /* @__PURE__ */ y({
176
195
  __name: "index",
177
196
  setup(t) {
178
- const { hasContent: e, loading: i } = g();
179
- return (r, c) => (a(), p("div", Z, [
180
- m(A, { name: "tr-slide-right" }, {
181
- default: x(() => [
182
- s(e) || s(i) ? (a(), p("div", tt, [
183
- m(A, { name: "tr-slide-right" }, {
184
- default: x(() => [
185
- m(M)
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
- v("div", et, [
190
- m(J)
191
- ])
192
- ])) : S("", !0)
193
- ]),
194
- _: 1
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
- }), lt = /* @__PURE__ */ k(nt, [["__scopeId", "data-v-209924d7"]]);
216
+ }), dt = /* @__PURE__ */ w(st, [["__scopeId", "data-v-e9441989"]]);
199
217
  export {
200
- q as A,
201
- lt as D,
202
- J as S,
203
- rt as W,
204
- M as _,
205
- j as a,
206
- g as u
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 { IconUpload as T, IconVoice as _, IconRecordingWave as q } from "@opentiny/tiny-robot-svgs";
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
- S as a,
758
- it as b,
757
+ Ke as a,
758
+ Ze as b,
759
759
  et as c,
760
- Ze as d,
760
+ M as d,
761
761
  tt as e,
762
- Ue as f,
763
- M as g,
764
- Qe as h,
765
- rt as i,
766
- ve as j,
767
- de as k,
768
- nt as l,
769
- Ke as m,
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
- ot as u,
772
- qe as w
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 j, 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 We, renderList as W, markRaw as w, inject as I, provide as A, toValue as k, reactive as je, readonly as ze, withCtx as M, onMounted as ve, onUnmounted as Ve } from "vue";
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 { l as Qe, w as et, g as tt, a as nt } from "./index4.js";
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
- j(B(he))
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
- j(B(Xe)),
113
+ W(B(Xe)),
114
114
  x("span", ut, z((f = e.message.state) != null && f.thinking ? "正在思考" : "已思考"), 1)
115
115
  ], 2),
116
- j(B(ye), {
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 = We(), b = (_) => _.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), m = (_) => {
192
+ }, u = je(), b = (_) => _.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), 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
- j(B(ye), {
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, W(e.message.tool_calls, (a, u) => (g(), T(we, $({
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 = je(t || {});
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 }, W(m.value, (h, c) => (g(), T(_e, {
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
- j(me, {
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, W(a.value, (h, c) => (g(), C(F, {
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, W(u(h), (_, v) => (g(), T(me, {
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 Wt(t, e, n) {
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 jt = /* @__PURE__ */ S({
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 } = Wt(s, () => {
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, W(m.value, (l, d) => {
851
+ (g(!0), C(F, null, j(m.value, (l, d) => {
852
852
  var h;
853
- return g(), T(jt, {
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
- Wt as u
977
+ jt as u
978
978
  };