yc-agent-ui 1.1.1 → 1.2.0

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 (147) hide show
  1. package/es/components/dialog-form/index.d.ts +4 -4
  2. package/es/components/dialog-form/src/index.vue.d.ts +4 -4
  3. package/es/components/display-item/index.d.ts +15 -15
  4. package/es/components/display-item/src/index.vue.d.ts +13 -13
  5. package/es/components/drawer-form/index.d.ts +4 -4
  6. package/es/components/drawer-form/src/index.vue.d.ts +4 -4
  7. package/es/components/form/index.d.ts +8 -8
  8. package/es/components/form/src/form-content.vue.d.ts +8 -8
  9. package/es/components/form/src/index.vue.d.ts +8 -8
  10. package/es/components/form-item/index.d.ts +6 -6
  11. package/es/components/form-item/src/index.vue.d.ts +6 -6
  12. package/es/components/index.d.ts +1 -0
  13. package/es/components/page/index.d.ts +172 -172
  14. package/es/components/page/src/index.vue.d.ts +60 -60
  15. package/es/components/search/index.d.ts +52 -52
  16. package/es/components/search/src/index.vue.d.ts +20 -20
  17. package/es/components/table/src/table-column.vue.d.ts +34 -34
  18. package/es/components/yc-ai-chat/index.d.ts +14 -0
  19. package/es/components/yc-ai-chat/src/bubble.vue.d.ts +27 -0
  20. package/es/components/yc-ai-chat/src/file-card.vue.d.ts +18 -0
  21. package/es/components/yc-ai-chat/src/mobile-frame.vue.d.ts +31 -0
  22. package/es/components/yc-ai-chat/src/presets.d.ts +6 -0
  23. package/es/components/yc-ai-chat/src/select.vue.d.ts +23 -0
  24. package/es/components/yc-ai-chat/src/sender.vue.d.ts +44 -0
  25. package/es/components/yc-ai-chat/src/sidebar.vue.d.ts +23 -0
  26. package/es/components/yc-ai-chat/src/studio.vue.d.ts +46 -0
  27. package/es/components/yc-ai-chat/src/thinking.vue.d.ts +9 -0
  28. package/es/components/yc-ai-chat/src/type.d.ts +34 -0
  29. package/es/components/yc-ai-chat/src/welcome.vue.d.ts +19 -0
  30. package/es/components/yc-plus-page/src/index.vue.d.ts +176 -176
  31. package/es/hooks/usePlusFormReset.d.ts +48 -48
  32. package/es/index.css +10 -10
  33. package/es/index.mjs +10 -0
  34. package/es/packages/components/index.mjs +10 -0
  35. package/es/packages/components/yc-ai-chat/index.mjs +14 -0
  36. package/es/packages/components/yc-ai-chat/src/bubble.vue.mjs +5 -0
  37. package/es/packages/components/yc-ai-chat/src/bubble2.vue.mjs +289 -0
  38. package/es/packages/components/yc-ai-chat/src/file-card.vue.mjs +5 -0
  39. package/es/packages/components/yc-ai-chat/src/file-card2.vue.mjs +127 -0
  40. package/es/packages/components/yc-ai-chat/src/mobile-frame.vue.mjs +5 -0
  41. package/es/packages/components/yc-ai-chat/src/mobile-frame2.vue.mjs +245 -0
  42. package/es/packages/components/yc-ai-chat/src/presets.mjs +55 -0
  43. package/es/packages/components/yc-ai-chat/src/select.vue.mjs +5 -0
  44. package/es/packages/components/yc-ai-chat/src/select2.vue.mjs +337 -0
  45. package/es/packages/components/yc-ai-chat/src/sender.vue.mjs +5 -0
  46. package/es/packages/components/yc-ai-chat/src/sender2.vue.mjs +432 -0
  47. package/es/packages/components/yc-ai-chat/src/sidebar.vue.mjs +5 -0
  48. package/es/packages/components/yc-ai-chat/src/sidebar2.vue.mjs +251 -0
  49. package/es/packages/components/yc-ai-chat/src/studio.vue.mjs +5 -0
  50. package/es/packages/components/yc-ai-chat/src/studio2.vue.mjs +421 -0
  51. package/es/packages/components/yc-ai-chat/src/thinking.vue.mjs +5 -0
  52. package/es/packages/components/yc-ai-chat/src/thinking2.vue.mjs +88 -0
  53. package/es/packages/components/yc-ai-chat/src/type.mjs +1 -0
  54. package/es/packages/components/yc-ai-chat/src/welcome.vue.mjs +5 -0
  55. package/es/packages/components/yc-ai-chat/src/welcome2.vue.mjs +113 -0
  56. package/es/packages/components/yc-lens/capability.mjs +10 -2
  57. package/es/version.d.ts +1 -1
  58. package/es/version.mjs +1 -1
  59. package/index.css +12 -2
  60. package/index.js +18963 -17199
  61. package/index.min.css +11 -1
  62. package/index.min.js +50 -27
  63. package/index.min.mjs +50 -27
  64. package/index.mjs +18941 -17188
  65. package/lib/components/dialog-form/index.d.ts +4 -4
  66. package/lib/components/dialog-form/src/index.vue.d.ts +4 -4
  67. package/lib/components/display-item/index.d.ts +15 -15
  68. package/lib/components/display-item/src/index.vue.d.ts +13 -13
  69. package/lib/components/drawer-form/index.d.ts +4 -4
  70. package/lib/components/drawer-form/src/index.vue.d.ts +4 -4
  71. package/lib/components/form/index.d.ts +8 -8
  72. package/lib/components/form/src/form-content.vue.d.ts +8 -8
  73. package/lib/components/form/src/index.vue.d.ts +8 -8
  74. package/lib/components/form-item/index.d.ts +6 -6
  75. package/lib/components/form-item/src/index.vue.d.ts +6 -6
  76. package/lib/components/index.d.ts +1 -0
  77. package/lib/components/page/index.d.ts +172 -172
  78. package/lib/components/page/src/index.vue.d.ts +60 -60
  79. package/lib/components/search/index.d.ts +52 -52
  80. package/lib/components/search/src/index.vue.d.ts +20 -20
  81. package/lib/components/table/src/table-column.vue.d.ts +34 -34
  82. package/lib/components/yc-ai-chat/index.d.ts +14 -0
  83. package/lib/components/yc-ai-chat/src/bubble.vue.d.ts +27 -0
  84. package/lib/components/yc-ai-chat/src/file-card.vue.d.ts +18 -0
  85. package/lib/components/yc-ai-chat/src/mobile-frame.vue.d.ts +31 -0
  86. package/lib/components/yc-ai-chat/src/presets.d.ts +6 -0
  87. package/lib/components/yc-ai-chat/src/select.vue.d.ts +23 -0
  88. package/lib/components/yc-ai-chat/src/sender.vue.d.ts +44 -0
  89. package/lib/components/yc-ai-chat/src/sidebar.vue.d.ts +23 -0
  90. package/lib/components/yc-ai-chat/src/studio.vue.d.ts +46 -0
  91. package/lib/components/yc-ai-chat/src/thinking.vue.d.ts +9 -0
  92. package/lib/components/yc-ai-chat/src/type.d.ts +34 -0
  93. package/lib/components/yc-ai-chat/src/welcome.vue.d.ts +19 -0
  94. package/lib/components/yc-plus-page/src/index.vue.d.ts +176 -176
  95. package/lib/hooks/usePlusFormReset.d.ts +48 -48
  96. package/lib/index.css +10 -10
  97. package/lib/index.js +23 -0
  98. package/lib/packages/components/index.js +23 -0
  99. package/lib/packages/components/yc-ai-chat/index.js +31 -0
  100. package/lib/packages/components/yc-ai-chat/src/bubble.vue.js +9 -0
  101. package/lib/packages/components/yc-ai-chat/src/bubble2.vue.js +293 -0
  102. package/lib/packages/components/yc-ai-chat/src/file-card.vue.js +9 -0
  103. package/lib/packages/components/yc-ai-chat/src/file-card2.vue.js +131 -0
  104. package/lib/packages/components/yc-ai-chat/src/mobile-frame.vue.js +9 -0
  105. package/lib/packages/components/yc-ai-chat/src/mobile-frame2.vue.js +249 -0
  106. package/lib/packages/components/yc-ai-chat/src/presets.js +60 -0
  107. package/lib/packages/components/yc-ai-chat/src/select.vue.js +9 -0
  108. package/lib/packages/components/yc-ai-chat/src/select2.vue.js +341 -0
  109. package/lib/packages/components/yc-ai-chat/src/sender.vue.js +9 -0
  110. package/lib/packages/components/yc-ai-chat/src/sender2.vue.js +436 -0
  111. package/lib/packages/components/yc-ai-chat/src/sidebar.vue.js +9 -0
  112. package/lib/packages/components/yc-ai-chat/src/sidebar2.vue.js +255 -0
  113. package/lib/packages/components/yc-ai-chat/src/studio.vue.js +9 -0
  114. package/lib/packages/components/yc-ai-chat/src/studio2.vue.js +425 -0
  115. package/lib/packages/components/yc-ai-chat/src/thinking.vue.js +9 -0
  116. package/lib/packages/components/yc-ai-chat/src/thinking2.vue.js +92 -0
  117. package/lib/packages/components/yc-ai-chat/src/type.js +2 -0
  118. package/lib/packages/components/yc-ai-chat/src/welcome.vue.js +9 -0
  119. package/lib/packages/components/yc-ai-chat/src/welcome2.vue.js +117 -0
  120. package/lib/packages/components/yc-lens/capability.js +10 -2
  121. package/lib/version.d.ts +1 -1
  122. package/lib/version.js +1 -1
  123. package/locale/en.js +1 -1
  124. package/locale/en.min.js +1 -1
  125. package/locale/en.min.mjs +1 -1
  126. package/locale/en.mjs +1 -1
  127. package/locale/ja.js +1 -1
  128. package/locale/ja.min.js +1 -1
  129. package/locale/ja.min.mjs +1 -1
  130. package/locale/ja.mjs +1 -1
  131. package/locale/ko.js +1 -1
  132. package/locale/ko.min.js +1 -1
  133. package/locale/ko.min.mjs +1 -1
  134. package/locale/ko.mjs +1 -1
  135. package/locale/zh-cn.js +1 -1
  136. package/locale/zh-cn.min.js +1 -1
  137. package/locale/zh-cn.min.mjs +1 -1
  138. package/locale/zh-cn.mjs +1 -1
  139. package/locale/zh-tw.js +1 -1
  140. package/locale/zh-tw.min.js +1 -1
  141. package/locale/zh-tw.min.mjs +1 -1
  142. package/locale/zh-tw.mjs +1 -1
  143. package/package.json +2 -1
  144. package/theme-chalk/index.css +12 -2
  145. package/theme-chalk/plus-yc-ai-chat.css +1 -0
  146. package/theme-chalk/src/index.scss +1 -0
  147. package/theme-chalk/src/yc-ai-chat.scss +1691 -0
package/es/index.mjs CHANGED
@@ -20,6 +20,15 @@ export { default as ReCard, default as YcCard } from './packages/components/yc-c
20
20
  export { default as ReLineTree, default as YcLineTree } from './packages/components/yc-line-tree/src/index2.vue.mjs';
21
21
  export { default as ReSelectV2, default as YcSelectV2 } from './packages/components/yc-select-v2/src/index2.vue.mjs';
22
22
  export { default as ReText, default as YcText } from './packages/components/yc-text/src/index2.vue.mjs';
23
+ export { default as YcChatBubble } from './packages/components/yc-ai-chat/src/bubble2.vue.mjs';
24
+ export { default as YcChatFileCard } from './packages/components/yc-ai-chat/src/file-card2.vue.mjs';
25
+ export { default as YcChatSelect } from './packages/components/yc-ai-chat/src/select2.vue.mjs';
26
+ export { default as YcChatSender } from './packages/components/yc-ai-chat/src/sender2.vue.mjs';
27
+ export { default as YcChatSidebar } from './packages/components/yc-ai-chat/src/sidebar2.vue.mjs';
28
+ export { default as YcChatStudio } from './packages/components/yc-ai-chat/src/studio2.vue.mjs';
29
+ export { default as YcChatThinking } from './packages/components/yc-ai-chat/src/thinking2.vue.mjs';
30
+ export { default as YcChatWelcome } from './packages/components/yc-ai-chat/src/welcome2.vue.mjs';
31
+ export { default as YcMobileDeviceFrame } from './packages/components/yc-ai-chat/src/mobile-frame2.vue.mjs';
23
32
  export { AnimatedPagination, Pagination, RePagination, YcPagination } from './packages/components/yc-pagination/index.mjs';
24
33
  export { AreaChart, BarChart, CandlestickChart, ChartCard, ChartContainer, ChartDashboard, DualLineChart, GaugeChart, GradientLineChart, HeatmapChart, LineChart, LineGradientChart, MetricCard, PieChart, PieSimpleChart, RadarChart, ReAreaChart, ReBarChart, ReCandlestickChart, ReChartCard, ReChartContainer, ReChartDashboard, ReDualLineChart, ReGaugeChart, ReHeatmapChart, ReLineChart, ReLineGradientChart, ReMetricCard, RePieChart, RePieSimpleChart, ReRadarChart, ReRoseChart, ReScatterChart, ReStepLineChart, RoseChart, ScatterChart, SimplePieChart, StepLineChart, YcAreaChart, YcBarChart, YcCandlestickChart, YcChartCard, YcChartContainer, YcChartDashboard, YcDualLineChart, YcGaugeChart, YcHeatmapChart, YcLineChart, YcLineGradientChart, YcMetricCard, YcPieChart, YcPieSimpleChart, YcRadarChart, YcRoseChart, YcScatterChart, YcStepLineChart } from './packages/components/chart/index.mjs';
25
34
  export { AssetTable, BillTable, DeviceTable, OrderTable, PropertyTable, ReAssetTable, ReBillTable, ReDeviceTable, ReOrderTable, RePropertyTable, YcAssetTable, YcBillTable, YcDeviceTable, YcOrderTable, YcPropertyTable } from './packages/components/yc-property-table/index.mjs';
@@ -65,6 +74,7 @@ export { ReQueryFilterManager, YcQueryFilterManager } from './packages/component
65
74
  export { default as ReStatusDialog, default as YcStatusDialog } from './packages/components/yc-status-dialog/src/index.vue.mjs';
66
75
  export { default as ReSvgIcon, default as YcSvgIcon } from './packages/components/yc-svg-icon/src/index.vue.mjs';
67
76
  export { STATUS_CONFIG_MAP } from './packages/components/yc-status-dialog/src/type.mjs';
77
+ export { YC_MOBILE_DEVICE_PRESETS, formatChatFileSize, formatChatSessionTime, groupChatSessionByDate } from './packages/components/yc-ai-chat/src/presets.mjs';
68
78
  export { YcAuthWithInstall } from './packages/components/yc-auth/index.mjs';
69
79
  export { YcCardWithInstall } from './packages/components/yc-card/index.mjs';
70
80
  export { YcLineTreeWithInstall } from './packages/components/yc-line-tree/index.mjs';
@@ -42,6 +42,15 @@ export { default as ReCard, default as YcCard } from './yc-card/src/index2.vue.m
42
42
  export { default as ReLineTree, default as YcLineTree } from './yc-line-tree/src/index2.vue.mjs';
43
43
  export { default as ReSelectV2, default as YcSelectV2 } from './yc-select-v2/src/index2.vue.mjs';
44
44
  export { default as ReText, default as YcText } from './yc-text/src/index2.vue.mjs';
45
+ export { default as YcChatBubble } from './yc-ai-chat/src/bubble2.vue.mjs';
46
+ export { default as YcChatFileCard } from './yc-ai-chat/src/file-card2.vue.mjs';
47
+ export { default as YcChatSelect } from './yc-ai-chat/src/select2.vue.mjs';
48
+ export { default as YcChatSender } from './yc-ai-chat/src/sender2.vue.mjs';
49
+ export { default as YcChatSidebar } from './yc-ai-chat/src/sidebar2.vue.mjs';
50
+ export { default as YcChatStudio } from './yc-ai-chat/src/studio2.vue.mjs';
51
+ export { default as YcChatThinking } from './yc-ai-chat/src/thinking2.vue.mjs';
52
+ export { default as YcChatWelcome } from './yc-ai-chat/src/welcome2.vue.mjs';
53
+ export { default as YcMobileDeviceFrame } from './yc-ai-chat/src/mobile-frame2.vue.mjs';
45
54
  export { COSS_TABLE_INJECTION_KEY } from './yc-coss-table/src/type.mjs';
46
55
  export { DEFAULT_CDN_CONFIG, DEFAULT_YC_CONFIG, YC_CONFIG_KEY } from './yc-config-provider/src/type.mjs';
47
56
  export { DEFAULT_OPERATORS, NO_VALUE_OPERATORS, OPERATOR_CATALOG, OPERATOR_LABELS } from './yc-plus-page/src/constants.mjs';
@@ -52,6 +61,7 @@ export { default as RePerms, default as YcPerms } from './yc-perms/src/index.mjs
52
61
  export { default as ReStatusDialog, default as YcStatusDialog } from './yc-status-dialog/src/index.vue.mjs';
53
62
  export { default as ReSvgIcon, default as YcSvgIcon } from './yc-svg-icon/src/index.vue.mjs';
54
63
  export { STATUS_CONFIG_MAP } from './yc-status-dialog/src/type.mjs';
64
+ export { YC_MOBILE_DEVICE_PRESETS, formatChatFileSize, formatChatSessionTime, groupChatSessionByDate } from './yc-ai-chat/src/presets.mjs';
55
65
  export { addDrawer, closeAllDrawer, closeDrawer, drawerStore, updateDrawer } from './yc-drawer/store.mjs';
56
66
  export { findNodeById, findNodeByPath, findNodePosition, insertAsChild, insertAsSibling, insertNodeAtPosition, removeNode, reorderNodeChildren, reorderSiblingNodes } from './yc-plus-tree/src/treeDataUtils.mjs';
57
67
  export { useColumnAdapter } from './virtual-table/src/use-column-adapter.mjs';
@@ -0,0 +1,14 @@
1
+ import _sfc_main from './src/studio2.vue.mjs';
2
+ export { default as YcChatSidebar } from './src/sidebar2.vue.mjs';
3
+ export { default as YcChatWelcome } from './src/welcome2.vue.mjs';
4
+ export { default as YcChatBubble } from './src/bubble2.vue.mjs';
5
+ export { default as YcChatThinking } from './src/thinking2.vue.mjs';
6
+ export { default as YcChatFileCard } from './src/file-card2.vue.mjs';
7
+ export { default as YcChatSender } from './src/sender2.vue.mjs';
8
+ export { default as YcChatSelect } from './src/select2.vue.mjs';
9
+ export { default as YcMobileDeviceFrame } from './src/mobile-frame2.vue.mjs';
10
+ export { YC_MOBILE_DEVICE_PRESETS, formatChatFileSize, formatChatSessionTime, groupChatSessionByDate } from './src/presets.mjs';
11
+
12
+
13
+
14
+ export { _sfc_main as YcChatStudio, _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './bubble2.vue.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,289 @@
1
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, createVNode, unref, createSlots, withCtx, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode, renderSlot } from 'vue';
2
+ import { Bubble } from 'vue-element-plus-x';
3
+
4
+ const _hoisted_1 = { class: "yc-chat-bubble__header" };
5
+ const _hoisted_2 = {
6
+ key: 0,
7
+ class: "yc-chat-bubble__sender"
8
+ };
9
+ const _hoisted_3 = { class: "message-body yc-chat-bubble__body" };
10
+ const _hoisted_4 = {
11
+ key: 0,
12
+ class: "message-error yc-chat-bubble__inline-status"
13
+ };
14
+ const _hoisted_5 = {
15
+ key: 0,
16
+ class: "message-metrics yc-chat-bubble__metrics",
17
+ "data-testid": "message-metrics"
18
+ };
19
+ const _hoisted_6 = {
20
+ key: 0,
21
+ class: "message-identifiers yc-chat-bubble__identifiers"
22
+ };
23
+ const _hoisted_7 = { class: "message-identifiers__summary" };
24
+ const _hoisted_8 = {
25
+ class: "message-identifiers__list",
26
+ "aria-label": "\u6D88\u606F\u5B9A\u4F4D\u4FE1\u606F"
27
+ };
28
+ const _hoisted_9 = { class: "message-footer__actions yc-chat-bubble__actions" };
29
+ const _hoisted_10 = ["disabled"];
30
+ const _hoisted_11 = {
31
+ key: 0,
32
+ class: "yc-chat-bubble__action-text"
33
+ };
34
+ const _hoisted_12 = ["disabled"];
35
+ const _hoisted_13 = {
36
+ key: 0,
37
+ class: "yc-chat-bubble__action-text"
38
+ };
39
+ var _sfc_main = /* @__PURE__ */ defineComponent({
40
+ ...{
41
+ name: "YcChatBubble"
42
+ },
43
+ __name: "bubble",
44
+ props: {
45
+ role: {},
46
+ senderName: { default: "" },
47
+ status: { default: "completed" },
48
+ metrics: { default: () => [] },
49
+ identifiers: { default: () => [] },
50
+ canCopyContent: { type: Boolean, default: true },
51
+ compact: { type: Boolean, default: false }
52
+ },
53
+ emits: ["copy-content", "copy-identifiers"],
54
+ setup(__props, { emit: __emit }) {
55
+ const props = __props;
56
+ const emit = __emit;
57
+ const statusTagText = computed(() => {
58
+ if (props.status === "failed") return "\u751F\u6210\u5931\u8D25";
59
+ if (props.status === "cancelled") return "\u5DF2\u505C\u6B62";
60
+ return "";
61
+ });
62
+ return (_ctx, _cache) => {
63
+ return openBlock(), createElementBlock(
64
+ "div",
65
+ {
66
+ class: normalizeClass(["yc-chat-bubble message-row", [__props.role, { "is-compact": __props.compact }]])
67
+ },
68
+ [
69
+ createVNode(unref(Bubble), {
70
+ placement: __props.role === "user" ? "end" : "start",
71
+ "no-style": true,
72
+ "max-width": "100%"
73
+ }, createSlots({
74
+ content: withCtx(() => [
75
+ createElementVNode(
76
+ "div",
77
+ {
78
+ class: normalizeClass(["message-bubble yc-chat-bubble__surface", [__props.role]])
79
+ },
80
+ [
81
+ createElementVNode("div", _hoisted_3, [
82
+ renderSlot(_ctx.$slots, "default"),
83
+ __props.role === "user" && statusTagText.value ? (openBlock(), createElementBlock(
84
+ "div",
85
+ _hoisted_4,
86
+ toDisplayString(statusTagText.value),
87
+ 1
88
+ /* TEXT */
89
+ )) : createCommentVNode("v-if", true)
90
+ ]),
91
+ __props.role === "assistant" && __props.metrics.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_5, [
92
+ (openBlock(true), createElementBlock(
93
+ Fragment,
94
+ null,
95
+ renderList(__props.metrics, (metric) => {
96
+ return openBlock(), createElementBlock(
97
+ "span",
98
+ {
99
+ key: metric.key,
100
+ class: "yc-chat-bubble__metric-pill"
101
+ },
102
+ toDisplayString(metric.text),
103
+ 1
104
+ /* TEXT */
105
+ );
106
+ }),
107
+ 128
108
+ /* KEYED_FRAGMENT */
109
+ ))
110
+ ])) : createCommentVNode("v-if", true)
111
+ ],
112
+ 2
113
+ /* CLASS */
114
+ )
115
+ ]),
116
+ footer: withCtx(() => [
117
+ createElementVNode(
118
+ "div",
119
+ {
120
+ class: normalizeClass(["message-footer yc-chat-bubble__footer", `is-${__props.role}`])
121
+ },
122
+ [
123
+ __props.identifiers.length > 0 ? (openBlock(), createElementBlock("details", _hoisted_6, [
124
+ createElementVNode(
125
+ "summary",
126
+ _hoisted_7,
127
+ " \u8C03\u8BD5\u8FFD\u8E2A ID (" + toDisplayString(__props.identifiers.length) + ") ",
128
+ 1
129
+ /* TEXT */
130
+ ),
131
+ createElementVNode("div", _hoisted_8, [
132
+ (openBlock(true), createElementBlock(
133
+ Fragment,
134
+ null,
135
+ renderList(__props.identifiers, (item) => {
136
+ return openBlock(), createElementBlock(
137
+ "span",
138
+ {
139
+ key: `${item.label}:${item.value}`,
140
+ class: "message-identifier"
141
+ },
142
+ toDisplayString(item.label) + ": " + toDisplayString(item.value),
143
+ 1
144
+ /* TEXT */
145
+ );
146
+ }),
147
+ 128
148
+ /* KEYED_FRAGMENT */
149
+ ))
150
+ ])
151
+ ])) : createCommentVNode("v-if", true),
152
+ createElementVNode("div", _hoisted_9, [
153
+ createElementVNode("button", {
154
+ type: "button",
155
+ class: "message-action-btn",
156
+ "data-testid": "copy-message-content",
157
+ "aria-label": "\u590D\u5236\u6D88\u606F\u5185\u5BB9",
158
+ title: "\u590D\u5236\u6D88\u606F\u5185\u5BB9",
159
+ disabled: !__props.canCopyContent,
160
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("copy-content"))
161
+ }, [
162
+ _cache[3] || (_cache[3] = createElementVNode(
163
+ "svg",
164
+ {
165
+ viewBox: "0 0 16 16",
166
+ fill: "none",
167
+ "aria-hidden": "true"
168
+ },
169
+ [
170
+ createElementVNode("rect", {
171
+ x: "5.5",
172
+ y: "5.5",
173
+ width: "7.5",
174
+ height: "7.5",
175
+ rx: "1.5",
176
+ stroke: "currentColor",
177
+ "stroke-width": "1.3"
178
+ }),
179
+ createElementVNode("path", {
180
+ d: "M3.5 10.5H3A1.5 1.5 0 0 1 1.5 9V3A1.5 1.5 0 0 1 3 1.5H9A1.5 1.5 0 0 1 10.5 3V3.5",
181
+ stroke: "currentColor",
182
+ "stroke-width": "1.3",
183
+ "stroke-linecap": "round"
184
+ })
185
+ ],
186
+ -1
187
+ /* CACHED */
188
+ )),
189
+ !__props.compact ? (openBlock(), createElementBlock("span", _hoisted_11, "\u590D\u5236")) : createCommentVNode("v-if", true)
190
+ ], 8, _hoisted_10),
191
+ createElementVNode("button", {
192
+ type: "button",
193
+ class: "message-action-btn",
194
+ "data-testid": "copy-message-identifiers",
195
+ "aria-label": "\u590D\u5236\u6D88\u606F ID",
196
+ title: "\u590D\u5236\u6D88\u606F ID",
197
+ disabled: !__props.identifiers.length,
198
+ onClick: _cache[1] || (_cache[1] = ($event) => emit("copy-identifiers"))
199
+ }, [
200
+ _cache[4] || (_cache[4] = createElementVNode(
201
+ "svg",
202
+ {
203
+ viewBox: "0 0 16 16",
204
+ fill: "none",
205
+ "aria-hidden": "true"
206
+ },
207
+ [
208
+ createElementVNode("path", {
209
+ d: "M6.5 9.5L9.5 6.5M5.2 7.3L3.8 8.7A2.5 2.5 0 0 0 7.3 12.2L8.7 10.8M10.8 8.7L12.2 7.3A2.5 2.5 0 0 0 8.7 3.8L7.3 5.2",
210
+ stroke: "currentColor",
211
+ "stroke-width": "1.3",
212
+ "stroke-linecap": "round"
213
+ })
214
+ ],
215
+ -1
216
+ /* CACHED */
217
+ )),
218
+ !__props.compact ? (openBlock(), createElementBlock("span", _hoisted_13, "\u8FFD\u8E2A ID")) : createCommentVNode("v-if", true)
219
+ ], 8, _hoisted_12)
220
+ ])
221
+ ],
222
+ 2
223
+ /* CLASS */
224
+ )
225
+ ]),
226
+ _: 2
227
+ /* DYNAMIC */
228
+ }, [
229
+ __props.role === "assistant" ? {
230
+ name: "avatar",
231
+ fn: withCtx(() => [
232
+ _cache[2] || (_cache[2] = createElementVNode(
233
+ "div",
234
+ {
235
+ class: "yc-chat-bubble__avatar is-assistant",
236
+ "aria-hidden": "true"
237
+ },
238
+ [
239
+ createElementVNode("svg", {
240
+ viewBox: "0 0 20 20",
241
+ fill: "none"
242
+ }, [
243
+ createElementVNode("path", {
244
+ d: "M10 3L11.6 8.4L17 10L11.6 11.6L10 17L8.4 11.6L3 10L8.4 8.4L10 3Z",
245
+ fill: "currentColor"
246
+ })
247
+ ])
248
+ ],
249
+ -1
250
+ /* CACHED */
251
+ ))
252
+ ]),
253
+ key: "0"
254
+ } : void 0,
255
+ __props.role === "assistant" && (__props.senderName || statusTagText.value) ? {
256
+ name: "header",
257
+ fn: withCtx(() => [
258
+ createElementVNode("div", _hoisted_1, [
259
+ __props.senderName ? (openBlock(), createElementBlock(
260
+ "span",
261
+ _hoisted_2,
262
+ toDisplayString(__props.senderName),
263
+ 1
264
+ /* TEXT */
265
+ )) : createCommentVNode("v-if", true),
266
+ statusTagText.value ? (openBlock(), createElementBlock(
267
+ "span",
268
+ {
269
+ key: 1,
270
+ class: normalizeClass(["yc-chat-bubble__status message-error", `is-${__props.status}`])
271
+ },
272
+ toDisplayString(statusTagText.value),
273
+ 3
274
+ /* TEXT, CLASS */
275
+ )) : createCommentVNode("v-if", true)
276
+ ])
277
+ ]),
278
+ key: "1"
279
+ } : void 0
280
+ ]), 1032, ["placement"])
281
+ ],
282
+ 2
283
+ /* CLASS */
284
+ );
285
+ };
286
+ }
287
+ });
288
+
289
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './file-card2.vue.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,127 @@
1
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, unref, withModifiers, toDisplayString, createCommentVNode } from 'vue';
2
+ import { FilesCard } from 'vue-element-plus-x';
3
+ import { formatChatFileSize } from './presets.mjs';
4
+
5
+ const _hoisted_1 = ["disabled"];
6
+ var _sfc_main = /* @__PURE__ */ defineComponent({
7
+ ...{
8
+ name: "YcChatFileCard"
9
+ },
10
+ __name: "file-card",
11
+ props: {
12
+ uid: { default: void 0 },
13
+ name: {},
14
+ fileSize: { default: void 0 },
15
+ mimeType: { default: "" },
16
+ url: { default: "" },
17
+ variant: { default: "artifact" },
18
+ removable: { type: Boolean, default: false },
19
+ downloadable: { type: Boolean, default: false },
20
+ downloading: { type: Boolean, default: false }
21
+ },
22
+ emits: ["remove", "download"],
23
+ setup(__props, { emit: __emit }) {
24
+ const props = __props;
25
+ const emit = __emit;
26
+ const descriptionText = computed(() => {
27
+ const parts = [props.mimeType, formatChatFileSize(props.fileSize)].filter(Boolean);
28
+ return parts.join(" \xB7 ");
29
+ });
30
+ return (_ctx, _cache) => {
31
+ return openBlock(), createElementBlock(
32
+ "div",
33
+ {
34
+ class: normalizeClass([
35
+ "yc-chat-file-card",
36
+ __props.variant === "composer" ? "yc-chat-file-card--composer composer-attachment" : "yc-chat-file-card--artifact artifact-card"
37
+ ])
38
+ },
39
+ [
40
+ createElementVNode(
41
+ "div",
42
+ {
43
+ class: normalizeClass(["yc-chat-file-card__main", { "artifact-main": __props.variant === "artifact" }])
44
+ },
45
+ [
46
+ createVNode(unref(FilesCard), {
47
+ uid: __props.uid,
48
+ name: __props.name || "\u672A\u547D\u540D\u6587\u4EF6",
49
+ "file-size": __props.fileSize,
50
+ description: descriptionText.value || void 0,
51
+ url: __props.url || void 0,
52
+ "icon-size": __props.variant === "composer" ? "28px" : "34px",
53
+ "max-width": __props.variant === "composer" ? "220px" : "100%",
54
+ "show-del-icon": false
55
+ }, null, 8, ["uid", "name", "file-size", "description", "url", "icon-size", "max-width"])
56
+ ],
57
+ 2
58
+ /* CLASS */
59
+ ),
60
+ __props.removable ? (openBlock(), createElementBlock("button", {
61
+ key: 0,
62
+ type: "button",
63
+ class: "yc-chat-file-card__remove composer-attachment-remove",
64
+ "aria-label": "\u79FB\u9664\u9644\u4EF6",
65
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => emit("remove"), ["stop"]))
66
+ }, [..._cache[2] || (_cache[2] = [
67
+ createElementVNode(
68
+ "svg",
69
+ {
70
+ viewBox: "0 0 14 14",
71
+ fill: "none",
72
+ "aria-hidden": "true"
73
+ },
74
+ [
75
+ createElementVNode("path", {
76
+ d: "M4 4L10 10M10 4L4 10",
77
+ stroke: "currentColor",
78
+ "stroke-width": "1.5",
79
+ "stroke-linecap": "round"
80
+ })
81
+ ],
82
+ -1
83
+ /* CACHED */
84
+ )
85
+ ])])) : __props.downloadable ? (openBlock(), createElementBlock("button", {
86
+ key: 1,
87
+ type: "button",
88
+ class: "yc-chat-file-card__download",
89
+ disabled: __props.downloading,
90
+ onClick: _cache[1] || (_cache[1] = withModifiers(($event) => emit("download"), ["stop"]))
91
+ }, [
92
+ _cache[3] || (_cache[3] = createElementVNode(
93
+ "svg",
94
+ {
95
+ viewBox: "0 0 16 16",
96
+ fill: "none",
97
+ "aria-hidden": "true"
98
+ },
99
+ [
100
+ createElementVNode("path", {
101
+ d: "M8 2.75V10.25M8 10.25L5.25 7.5M8 10.25L10.75 7.5M3.25 12.75H12.75",
102
+ stroke: "currentColor",
103
+ "stroke-width": "1.4",
104
+ "stroke-linecap": "round",
105
+ "stroke-linejoin": "round"
106
+ })
107
+ ],
108
+ -1
109
+ /* CACHED */
110
+ )),
111
+ createElementVNode(
112
+ "span",
113
+ null,
114
+ toDisplayString(__props.downloading ? "\u4E0B\u8F7D\u4E2D\u2026" : "\u4E0B\u8F7D"),
115
+ 1
116
+ /* TEXT */
117
+ )
118
+ ], 8, _hoisted_1)) : createCommentVNode("v-if", true)
119
+ ],
120
+ 2
121
+ /* CLASS */
122
+ );
123
+ };
124
+ }
125
+ });
126
+
127
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './mobile-frame2.vue.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };