@blueking/ai-ui-sdk 0.3.0-beta.4 → 0.3.0-beta.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 (131) hide show
  1. package/README.md +290 -290
  2. package/dist/common/util.ts.js +102 -102
  3. package/dist/components/render-agent/agent-download.vue.css +2 -2
  4. package/dist/components/render-agent/agent-type.vue.css +9 -9
  5. package/dist/components/render-agent/agent-type.vue.js +1 -1
  6. package/dist/components/render-auth/auth-dialog.vue.css +2 -2
  7. package/dist/components/render-auto-height-textarea/index.vue.css +26 -26
  8. package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
  9. package/dist/components/render-auto-refresh/index.vue.css +30 -30
  10. package/dist/components/render-auto-refresh/index.vue.js +1 -1
  11. package/dist/components/render-card/agent/prefix-info-tool.vue.css +18 -18
  12. package/dist/components/render-card/agent/prefix-info-tool.vue.js +1 -1
  13. package/dist/components/render-card/base.vue.css +30 -30
  14. package/dist/components/render-card/base.vue.js +1 -1
  15. package/dist/components/render-card/llm/corner-badge.vue.css +12 -12
  16. package/dist/components/render-card/llm/corner-badge.vue.js +1 -1
  17. package/dist/components/render-card/llm/icons.vue.css +3 -3
  18. package/dist/components/render-card/llm/icons.vue.js +1 -1
  19. package/dist/components/render-card/llm/info.vue.css +8 -8
  20. package/dist/components/render-card/llm/info.vue.js +1 -1
  21. package/dist/components/render-card/llm/tag-prefix.vue.css +6 -6
  22. package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
  23. package/dist/components/render-card/mcp/name-suffix.vue.css +7 -7
  24. package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
  25. package/dist/components/render-card/prompt/icons.vue.css +2 -2
  26. package/dist/components/render-card/prompt/icons.vue.js +1 -1
  27. package/dist/components/render-card/skill/tag-prefix.vue.css +7 -7
  28. package/dist/components/render-card/skill/tag-prefix.vue.js +1 -1
  29. package/dist/components/render-checkbox/index.vue.css +41 -41
  30. package/dist/components/render-checkbox/index.vue.js +1 -1
  31. package/dist/components/render-choose-tag/index.vue.css +29 -29
  32. package/dist/components/render-choose-tag/index.vue.js +1 -1
  33. package/dist/components/render-collapse/index.vue.css +6 -6
  34. package/dist/components/render-collapse/index.vue.js +1 -1
  35. package/dist/components/render-collection/content/index.vue.css +15 -15
  36. package/dist/components/render-collection/content/index.vue.js +1 -1
  37. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +10 -10
  38. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +1 -1
  39. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.css +2 -2
  40. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.js +1 -1
  41. package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
  42. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.css +2 -2
  43. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.js +1 -1
  44. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +9 -9
  45. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  46. package/dist/components/render-dataset/components/operation-record/index.vue.css +10 -10
  47. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  48. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +8 -8
  49. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
  50. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +8 -8
  51. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  52. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +4 -4
  53. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  54. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +6 -6
  55. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
  56. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +3 -3
  57. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  58. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +3 -3
  59. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  60. package/dist/components/render-dataset/components/plus-dataset-data/form/manual.vue.css +4 -4
  61. package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +21 -21
  62. package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
  63. package/dist/components/render-dataset-detail-origin-data/index.vue.css +9 -9
  64. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  65. package/dist/components/render-dataset-list/components/main.vue.css +9 -9
  66. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  67. package/dist/components/render-dataset-list/index.vue.css +4 -4
  68. package/dist/components/render-dataset-list/index.vue.js +1 -1
  69. package/dist/components/render-dialog/choose-resource.vue.css +4 -4
  70. package/dist/components/render-dialog/choose-resource.vue.js +1 -1
  71. package/dist/components/render-dialog/choose-result.vue.css +31 -31
  72. package/dist/components/render-dialog/choose-result.vue.js +1 -1
  73. package/dist/components/render-dialog/choose-space.vue.css +17 -17
  74. package/dist/components/render-dialog/choose-space.vue.js +1 -1
  75. package/dist/components/render-dialog/index.vue.css +12 -12
  76. package/dist/components/render-dialog/index.vue.js +1 -1
  77. package/dist/components/render-dropdown/index.vue.css +15 -15
  78. package/dist/components/render-file-card/index.vue.css +28 -28
  79. package/dist/components/render-file-card/index.vue.js +1 -1
  80. package/dist/components/render-file-type-icon/index.vue.css +6 -6
  81. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  82. package/dist/components/render-generate-tag/index.vue.css +12 -12
  83. package/dist/components/render-generate-tag/index.vue.js +1 -1
  84. package/dist/components/render-header/index.vue.css +7 -7
  85. package/dist/components/render-header/index.vue.js +1 -1
  86. package/dist/components/render-knowledge/icon/index.vue.css +2 -2
  87. package/dist/components/render-knowledge/icon/index.vue.js +1 -1
  88. package/dist/components/render-like/index.vue.css +10 -10
  89. package/dist/components/render-like/index.vue.js +1 -1
  90. package/dist/components/render-markdown/edit.postcss.css +92 -92
  91. package/dist/components/render-markdown/katex.ts.js +8 -8
  92. package/dist/components/render-markdown/prism-atom-one-dark.postcss.css +192 -192
  93. package/dist/components/render-markdown/view.postcss.css +99 -99
  94. package/dist/components/render-permission-tag/index.vue.css +2 -2
  95. package/dist/components/render-prompt/content/index.vue.css +5 -5
  96. package/dist/components/render-prompt/content/index.vue.js +1 -1
  97. package/dist/components/render-reference/index.vue.css +4 -4
  98. package/dist/components/render-reference/index.vue.js +1 -1
  99. package/dist/components/render-resource-version/index.vue.css +7 -7
  100. package/dist/components/render-resource-version/index.vue.js +1 -1
  101. package/dist/components/render-router-tab/index.vue.css +15 -15
  102. package/dist/components/render-router-tab/index.vue.js +1 -1
  103. package/dist/components/render-select-plus-extension/index.vue.css +11 -11
  104. package/dist/components/render-select-plus-extension/index.vue.js +1 -1
  105. package/dist/components/render-t-table/index.vue.css +118 -118
  106. package/dist/components/render-t-table/index.vue.js +1 -1
  107. package/dist/components/render-tag-tree/index.vue.css +17 -17
  108. package/dist/components/render-tag-tree/index.vue.js +1 -1
  109. package/dist/components/render-tags/index.vue.css +12 -12
  110. package/dist/components/render-tags/index.vue.js +1 -1
  111. package/dist/components/render-tree/index.vue.css +12 -12
  112. package/dist/css/fonts/iconcool.svg +163 -163
  113. package/dist/css/style.css +154 -154
  114. package/dist/hooks/use-chat.ts.js +6 -6
  115. package/dist/hooks/use-ellipsis-tooltip.ts.js +28 -28
  116. package/dist/hooks/use-loading-version.ts.js +4 -4
  117. package/dist/hooks/use-reference-doc.ts.js +137 -137
  118. package/dist/hooks/use-think.ts.js +67 -67
  119. package/dist/http/helper/agent.ts.js +36 -36
  120. package/dist/http/helper/collection.ts.js +12 -12
  121. package/dist/http/helper/common.ts.js +36 -36
  122. package/dist/http/helper/dataset.ts.js +76 -76
  123. package/dist/http/helper/knowledge.ts.js +41 -41
  124. package/dist/http/helper/mcp.ts.js +36 -36
  125. package/dist/http/helper/permission.ts.js +12 -12
  126. package/dist/http/helper/prompt.ts.js +12 -12
  127. package/dist/http/helper/session.ts.js +32 -32
  128. package/dist/http/helper/skill.ts.js +20 -20
  129. package/dist/http/helper/space.ts.js +12 -12
  130. package/dist/http/helper/tool.ts.js +20 -20
  131. package/package.json +117 -115
@@ -1,8 +1,8 @@
1
1
  import { onBeforeMount, onBeforeUnmount } from 'vue';
2
- /**
3
- * 获取引用资料的 HTML 内容
4
- * @param documents
5
- * @returns
2
+ /**
3
+ * 获取引用资料的 HTML 内容
4
+ * @param documents
5
+ * @returns
6
6
  */ export const getHtmlContentFromDocuments = (documents, hideReferenceDocIcon)=>{
7
7
  let htmlContent = `<section class="knowledge-head click-close"><svg class="ai-ui-sdk-wenzhang"><use href="#ai-ui-sdk-wenzhang"></use></svg>找到 ${documents.length} 篇资料参考<i class="ai-ui-sdk-icon ai-ui-sdk-angle-up"></i></section><ul class="knowledge-body">`;
8
8
  documents.forEach((document1)=>{
@@ -14,10 +14,10 @@ import { onBeforeMount, onBeforeUnmount } from 'vue';
14
14
  htmlContent += '</ul>';
15
15
  return htmlContent;
16
16
  };
17
- /**
18
- * 移除引用资料的 HTML 内容
19
- * @param content
20
- * @returns
17
+ /**
18
+ * 移除引用资料的 HTML 内容
19
+ * @param content
20
+ * @returns
21
21
  */ export const removeReferenceDoc = (content)=>{
22
22
  return content.replace(/<section class="knowledge-head click-close">[\s\S]*?<\/section>/, '').replace(/<ul class="knowledge-body">[\s\S]*?<\/ul>/, '').replace(/<section class="knowledge-tips">[\s\S]*?<\/section>/, '');
23
23
  };
@@ -25,137 +25,137 @@ export const useReferenceDoc = ()=>{
25
25
  let styleEle = null;
26
26
  const addReferenceDocStyle = ()=>{
27
27
  // 旧版知识样式
28
- const oldStyle = `.knowledge-tips {
29
- position: relative;
30
- padding: 6px 8px;
31
- margin-bottom: 14px;
32
- line-height: 22px;
33
- background: #f5f7fa;
34
- border-radius: 4px;
35
-
36
- &.closed {
37
- .ai-ui-sdk-angle-up {
38
- transform: rotate(180deg);
39
- }
40
-
41
- .knowledge-summary {
42
- margin-bottom: 0;
43
- }
44
-
45
- .knowledge-link {
46
- display: none;
47
- }
48
- }
49
-
50
- .ai-ui-sdk-angle-up {
51
- position: absolute;
52
- top: 4px;
53
- right: 0px;
54
- font-size: 22px;
55
- color: #979ba5;
56
- cursor: pointer;
57
- }
58
-
59
- .ai-ui-sdk-help-document {
60
- margin-right: 4px;
61
- font-size: 19px;
62
- color: #3a84ff;
63
- }
64
-
65
- .knowledge-summary {
66
- display: block;
67
- margin-bottom: 4px;
68
- color: #313238;
69
- }
70
-
71
- .knowledge-link {
72
- display: block;
73
- color: #3a84ff;
74
- text-decoration: none;
75
- cursor: pointer;
76
-
77
- .ai-ui-sdk-cc-jump-link {
78
- font-size: 14px;
79
- }
80
-
81
- &:last-child {
82
- margin-bottom: 2px;
83
- }
84
- }
28
+ const oldStyle = `.knowledge-tips {
29
+ position: relative;
30
+ padding: 6px 8px;
31
+ margin-bottom: 14px;
32
+ line-height: 22px;
33
+ background: #f5f7fa;
34
+ border-radius: 4px;
35
+
36
+ &.closed {
37
+ .ai-ui-sdk-angle-up {
38
+ transform: rotate(180deg);
39
+ }
40
+
41
+ .knowledge-summary {
42
+ margin-bottom: 0;
43
+ }
44
+
45
+ .knowledge-link {
46
+ display: none;
47
+ }
48
+ }
49
+
50
+ .ai-ui-sdk-angle-up {
51
+ position: absolute;
52
+ top: 4px;
53
+ right: 0px;
54
+ font-size: 22px;
55
+ color: #979ba5;
56
+ cursor: pointer;
57
+ }
58
+
59
+ .ai-ui-sdk-help-document {
60
+ margin-right: 4px;
61
+ font-size: 19px;
62
+ color: #3a84ff;
63
+ }
64
+
65
+ .knowledge-summary {
66
+ display: block;
67
+ margin-bottom: 4px;
68
+ color: #313238;
69
+ }
70
+
71
+ .knowledge-link {
72
+ display: block;
73
+ color: #3a84ff;
74
+ text-decoration: none;
75
+ cursor: pointer;
76
+
77
+ .ai-ui-sdk-cc-jump-link {
78
+ font-size: 14px;
79
+ }
80
+
81
+ &:last-child {
82
+ margin-bottom: 2px;
83
+ }
84
+ }
85
85
  }`;
86
86
  // 新版知识样式
87
- const newStyle = `.knowledge-head {
88
- display: flex;
89
- align-items: center;
90
- padding: 0 8px 0 6px;
91
- margin-bottom: 8px;
92
- line-height: 28px;
93
- background: #F0F1F5;
94
- border-radius: 4px;
95
- font-size: 12px;
96
- color: #313238;
97
- cursor: pointer;
98
- width: fit-content;
99
-
100
- .ai-ui-sdk-wenzhang {
101
- width: 14px;
102
- height: 14px;
103
- margin-right: 6px;
104
- }
105
-
106
- .ai-ui-sdk-angle-up {
107
- font-size: 22px;
108
- color: #4D4F56;
109
- margin-left: 4px;
110
- }
111
-
112
- &.closed {
113
- margin-bottom: 16px;
114
-
115
- .ai-ui-sdk-angle-up {
116
- transform: rotate(180deg);
117
- }
118
-
119
- &~ .knowledge-body {
120
- display: none;
121
- }
122
- }
123
-
124
- &:hover {
125
- background: #EAEBF0;
126
- }
127
- }
128
- .knowledge-body {
129
- background: #F5F7FA;
130
- padding: 16px 0 !important;
131
- .knowledge-item {
132
- padding-left: 10px;
133
- display: flex;
134
- align-items: center;
135
- line-height: 28px;
136
- .hover-show {
137
- display: none;
138
- }
139
- a {
140
- margin-right: 10px;
141
- &:has(i) {
142
- padding: 0 10px;
143
- margin-right: 0;
144
- text-decoration: none !important;
145
- }
146
- }
147
- .ai-ui-sdk-zhishiku {
148
- color: #D66F6B;
149
- font-size: 14px;
150
- margin-right: 6px;
151
- }
152
- &:hover {
153
- background: #EAEBF0;
154
- .hover-show {
155
- display: inline;
156
- }
157
- }
158
- }
87
+ const newStyle = `.knowledge-head {
88
+ display: flex;
89
+ align-items: center;
90
+ padding: 0 8px 0 6px;
91
+ margin-bottom: 8px;
92
+ line-height: 28px;
93
+ background: #F0F1F5;
94
+ border-radius: 4px;
95
+ font-size: 12px;
96
+ color: #313238;
97
+ cursor: pointer;
98
+ width: fit-content;
99
+
100
+ .ai-ui-sdk-wenzhang {
101
+ width: 14px;
102
+ height: 14px;
103
+ margin-right: 6px;
104
+ }
105
+
106
+ .ai-ui-sdk-angle-up {
107
+ font-size: 22px;
108
+ color: #4D4F56;
109
+ margin-left: 4px;
110
+ }
111
+
112
+ &.closed {
113
+ margin-bottom: 16px;
114
+
115
+ .ai-ui-sdk-angle-up {
116
+ transform: rotate(180deg);
117
+ }
118
+
119
+ &~ .knowledge-body {
120
+ display: none;
121
+ }
122
+ }
123
+
124
+ &:hover {
125
+ background: #EAEBF0;
126
+ }
127
+ }
128
+ .knowledge-body {
129
+ background: #F5F7FA;
130
+ padding: 16px 0 !important;
131
+ .knowledge-item {
132
+ padding-left: 10px;
133
+ display: flex;
134
+ align-items: center;
135
+ line-height: 28px;
136
+ .hover-show {
137
+ display: none;
138
+ }
139
+ a {
140
+ margin-right: 10px;
141
+ &:has(i) {
142
+ padding: 0 10px;
143
+ margin-right: 0;
144
+ text-decoration: none !important;
145
+ }
146
+ }
147
+ .ai-ui-sdk-zhishiku {
148
+ color: #D66F6B;
149
+ font-size: 14px;
150
+ margin-right: 6px;
151
+ }
152
+ &:hover {
153
+ background: #EAEBF0;
154
+ .hover-show {
155
+ display: inline;
156
+ }
157
+ }
158
+ }
159
159
  }`;
160
160
  styleEle = document.createElement('style');
161
161
  styleEle.textContent = oldStyle + newStyle;
@@ -1,20 +1,20 @@
1
1
  import { onBeforeMount, onBeforeUnmount } from 'vue';
2
2
  import { durationFormatter } from '../common/util.ts.js';
3
- /**
4
- * 获取思考的 HTML 内容
5
- * @param chatContent 聊天内容
6
- * @param content 思考内容
7
- * @param elapsedTime 思考时间
8
- * @returns 完整的 chatContent
3
+ /**
4
+ * 获取思考的 HTML 内容
5
+ * @param chatContent 聊天内容
6
+ * @param content 思考内容
7
+ * @param elapsedTime 思考时间
8
+ * @returns 完整的 chatContent
9
9
  */ export const getHtmlContentFromThink = (chatContent, content, cover, elapsedTime)=>{
10
10
  let htmlContent = chatContent === '内容正在生成中...' || cover ? '' : chatContent;
11
11
  // 思考开始
12
12
  if (!htmlContent.includes('<section class="think-head click-close">')) {
13
- htmlContent += `<section class="think-head click-close">
14
- <i class="ai-ui-sdk-icon ai-ui-sdk-sikao"></i>思考中...<i class="ai-ui-sdk-icon ai-ui-sdk-angle-up"></i>
15
- </section>
16
- <section class="think-body">
17
- ${content}
13
+ htmlContent += `<section class="think-head click-close">
14
+ <i class="ai-ui-sdk-icon ai-ui-sdk-sikao"></i>思考中...<i class="ai-ui-sdk-icon ai-ui-sdk-angle-up"></i>
15
+ </section>
16
+ <section class="think-body">
17
+ ${content}
18
18
  </section>`;
19
19
  } else {
20
20
  // 补充思考内容
@@ -34,10 +34,10 @@ import { durationFormatter } from '../common/util.ts.js';
34
34
  }
35
35
  return htmlContent;
36
36
  };
37
- /**
38
- * 移除思考的 HTML 内容
39
- * @param content
40
- * @returns
37
+ /**
38
+ * 移除思考的 HTML 内容
39
+ * @param content
40
+ * @returns
41
41
  */ export const removeThink = (content)=>{
42
42
  // 移除思考头部
43
43
  const afterRemoveThinkHead = content.replace(/<section class="think-head click-close">[\s\S]*<\/section>/, '');
@@ -52,10 +52,10 @@ import { durationFormatter } from '../common/util.ts.js';
52
52
  }
53
53
  return afterRemoveThinkBody;
54
54
  };
55
- /**
56
- * 判断是否是思考中
57
- * @param content
58
- * @returns
55
+ /**
56
+ * 判断是否是思考中
57
+ * @param content
58
+ * @returns
59
59
  */ export const isThinking = (content)=>{
60
60
  // 是否开始思考
61
61
  const isStartThinking = content === '正在思考...';
@@ -68,54 +68,54 @@ import { durationFormatter } from '../common/util.ts.js';
68
68
  export const useThink = ()=>{
69
69
  let styleEle = null;
70
70
  const addThinkStyle = ()=>{
71
- const style = `.think-head {
72
- display: flex;
73
- align-items: center;
74
- padding: 0 8px 0 6px;
75
- margin-bottom: 8px;
76
- line-height: 28px;
77
- background: #F0F1F5;
78
- border-radius: 4px;
79
- font-size: 12px;
80
- color: #313238;
81
- cursor: pointer;
82
- width: fit-content;
83
- .ai-ui-sdk-sikao {
84
- font-size: 14px;
85
- color: #979ba5;
86
- margin-right: 4px;
87
- }
88
-
89
- .ai-ui-sdk-angle-up {
90
- font-size: 22px;
91
- color: #4D4F56;
92
- margin-left: 4px;
93
- }
94
-
95
- &.closed {
96
- margin-bottom: 16px;
97
-
98
- .ai-ui-sdk-angle-up {
99
- transform: rotate(180deg);
100
- }
101
-
102
- &~ .think-body {
103
- display: none;
104
- }
105
- }
106
-
107
- &:hover {
108
- background: #EAEBF0;
109
- }
110
- }
111
- .think-body {
112
- background: #F5F7FA;
113
- color: #979BA5;
114
- padding: 16px;
115
- margin-bottom: 16px;
116
- &~ .knowledge-head {
117
- margin-bottom: 8px;
118
- }
71
+ const style = `.think-head {
72
+ display: flex;
73
+ align-items: center;
74
+ padding: 0 8px 0 6px;
75
+ margin-bottom: 8px;
76
+ line-height: 28px;
77
+ background: #F0F1F5;
78
+ border-radius: 4px;
79
+ font-size: 12px;
80
+ color: #313238;
81
+ cursor: pointer;
82
+ width: fit-content;
83
+ .ai-ui-sdk-sikao {
84
+ font-size: 14px;
85
+ color: #979ba5;
86
+ margin-right: 4px;
87
+ }
88
+
89
+ .ai-ui-sdk-angle-up {
90
+ font-size: 22px;
91
+ color: #4D4F56;
92
+ margin-left: 4px;
93
+ }
94
+
95
+ &.closed {
96
+ margin-bottom: 16px;
97
+
98
+ .ai-ui-sdk-angle-up {
99
+ transform: rotate(180deg);
100
+ }
101
+
102
+ &~ .think-body {
103
+ display: none;
104
+ }
105
+ }
106
+
107
+ &:hover {
108
+ background: #EAEBF0;
109
+ }
110
+ }
111
+ .think-body {
112
+ background: #F5F7FA;
113
+ color: #979BA5;
114
+ padding: 16px;
115
+ margin-bottom: 16px;
116
+ &~ .knowledge-head {
117
+ margin-bottom: 8px;
118
+ }
119
119
  }`;
120
120
  styleEle = document.createElement('style');
121
121
  styleEle.textContent = style;
@@ -55,10 +55,10 @@ import { transferKnowledge, transferKnowledgeApi, transferKnowledgebase, transfe
55
55
  import { transferMcp2McpApi, transferMcpApi2Mcp } from './mcp.ts.js';
56
56
  import { transferSkill2SkillApi, transferSkillApi2Skill } from './skill.ts.js';
57
57
  import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
58
- /**
59
- * 转换agentapi为agent
60
- * @param data IAgentInfoApi
61
- * @returns IAgentInfo
58
+ /**
59
+ * 转换agentapi为agent
60
+ * @param data IAgentInfoApi
61
+ * @returns IAgentInfo
62
62
  */ export const transferAgentInfoApi2AgentInfo = (data)=>{
63
63
  var _data_conversation_settings, _data_conversation_settings1, _data_conversation_settings_commands, _data_conversation_settings2, _data_conversation_settings3, _data_conversation_settings4, _data_prompt_setting;
64
64
  return {
@@ -81,10 +81,10 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
81
81
  saasUrl: data === null || data === void 0 ? void 0 : data.saas_url
82
82
  };
83
83
  };
84
- /**
85
- * 接口转换为ui使用
86
- * @param data IAgentCommandApi
87
- * @returns IAgentCommand
84
+ /**
85
+ * 接口转换为ui使用
86
+ * @param data IAgentCommandApi
87
+ * @returns IAgentCommand
88
88
  */ export const transferAgentCommandApi2AgentCommand = (data)=>{
89
89
  return {
90
90
  id: data.id,
@@ -119,10 +119,10 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
119
119
  }))
120
120
  };
121
121
  };
122
- /**
123
- * ui转换为接口使用
124
- * @param data IAgentCommand
125
- * @returns IAgentCommandApi
122
+ /**
123
+ * ui转换为接口使用
124
+ * @param data IAgentCommand
125
+ * @returns IAgentCommandApi
126
126
  */ export const transferAgentCommand2AgentCommandApi = (data)=>{
127
127
  const result = {
128
128
  id: data.id,
@@ -158,10 +158,10 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
158
158
  };
159
159
  return result;
160
160
  };
161
- /**
162
- * ui转换为接口使用(表单字段)
163
- * @param data IAgentForm
164
- * @returns IAgentFormApi
161
+ /**
162
+ * ui转换为接口使用(表单字段)
163
+ * @param data IAgentForm
164
+ * @returns IAgentFormApi
165
165
  */ export const transferAgentForm2AgentFormApi = (data)=>{
166
166
  var _data_conversationSettings, _data_conversationSettings1, _data_conversationSettings_commands, _data_conversationSettings2, _data_conversationSettings3, _data_conversationSettings4, _data_promptSetting_collectionVariables, _data_relatedTools_tools, _data_relatedTools_mcps;
167
167
  var _data_conversationSettings_openingRemark, _data_conversationSettings_predefinedQuestions;
@@ -222,10 +222,10 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
222
222
  is_bind_credential: data.isBindCredential
223
223
  });
224
224
  };
225
- /**
226
- * 接口转换为ui使用(表单字段)
227
- * @param data IAgentFormApi
228
- * @returns IAgentForm
225
+ /**
226
+ * 接口转换为ui使用(表单字段)
227
+ * @param data IAgentFormApi
228
+ * @returns IAgentForm
229
229
  */ export const transferAgentFormApi2AgentForm = (data)=>{
230
230
  var _data_conversation_settings, _data_conversation_settings1, _data_conversation_settings_commands, _data_conversation_settings2, _data_conversation_settings3, _data_conversation_settings4, _data_prompt_setting_collection_variables, _data_related_tools_tools, _data_related_tools_mcps, _data_related_skills_skills;
231
231
  var _data_conversation_settings_opening_remark, _data_conversation_settings_predefined_questions;
@@ -286,10 +286,10 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
286
286
  isBindCredential: data.is_bind_credential
287
287
  });
288
288
  };
289
- /**
290
- * 接口转换为ui使用(完整资源)
291
- * @param data IAgentApi
292
- * @returns IAgent
289
+ /**
290
+ * 接口转换为ui使用(完整资源)
291
+ * @param data IAgentApi
292
+ * @returns IAgent
293
293
  */ export const transferAgentApi2Agent = (data)=>_object_spread_props(_object_spread({}, transferAgentFormApi2AgentForm(data), transferResourceCommonApi2ResourceCommon(data)), {
294
294
  version: data.version,
295
295
  latestVersion: data.latest_version,
@@ -311,10 +311,10 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
311
311
  observability: data.paasv3_pages.observability
312
312
  } : undefined
313
313
  });
314
- /**
315
- * ui转换为接口使用(完整资源)
316
- * @param data IAgent
317
- * @returns IAgentApi
314
+ /**
315
+ * ui转换为接口使用(完整资源)
316
+ * @param data IAgent
317
+ * @returns IAgentApi
318
318
  */ export const transferAgent2AgentApi = (data)=>_object_spread_props(_object_spread({}, transferAgentForm2AgentFormApi(data), transferResourceCommon2ResourceCommonApi(data)), {
319
319
  version: data.version,
320
320
  latest_version: data.latestVersion,
@@ -335,10 +335,10 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
335
335
  observability: data.paasv3Pages.observability
336
336
  } : undefined
337
337
  });
338
- /**
339
- * ui 转换为接口使用
340
- * @param data IAgentListParam
341
- * @returns IAgentListParamApi
338
+ /**
339
+ * ui 转换为接口使用
340
+ * @param data IAgentListParam
341
+ * @returns IAgentListParamApi
342
342
  */ export const transferAgentListParam2AgentListParamApi = (data)=>_object_spread_props(_object_spread({}, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi(data), transferISortParam2ISortParamApi(data), transferIPaginationParam2IPaginationParamApi(data)), {
343
343
  agent_type: data.agentType,
344
344
  fuzzy: data.fuzzy,
@@ -355,10 +355,10 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
355
355
  created_by: data.createdBy,
356
356
  agent_version: data.agentVersion
357
357
  });
358
- /**
359
- * ui转换为接口使用
360
- * @param data IResourceApply[]
361
- * @returns IResourceApplyApi[]
358
+ /**
359
+ * ui转换为接口使用
360
+ * @param data IResourceApply[]
361
+ * @returns IResourceApplyApi[]
362
362
  */ export const transferResourceApply2ResourceApplyApi = (data)=>data.map((item)=>({
363
363
  resource_type: item.resourceType,
364
364
  resource_code: item.resourceCode
@@ -51,10 +51,10 @@ function _object_spread_props(target, source) {
51
51
  return target;
52
52
  }
53
53
  import { transferBaseCount2BaseCountApi, transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortParamApi, transferResourceCommonApi2ResourceCommon, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi, transferVariableApi2Variable } from './common.ts.js';
54
- /**
55
- * ui转换为接口使用
56
- * @param data ICollectionListParam
57
- * @returns ICollectionListParamApi
54
+ /**
55
+ * ui转换为接口使用
56
+ * @param data ICollectionListParam
57
+ * @returns ICollectionListParamApi
58
58
  */ export const transferCollectionListParam2CollectionListParamApi = (data)=>{
59
59
  return _object_spread_props(_object_spread({}, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi(data), transferIPaginationParam2IPaginationParamApi(data), transferISortParam2ISortParamApi(data)), {
60
60
  fuzzy: data.fuzzy,
@@ -75,10 +75,10 @@ import { transferBaseCount2BaseCountApi, transferIPaginationParam2IPaginationPar
75
75
  updated_by: data.updatedBy
76
76
  });
77
77
  };
78
- /**
79
- * 接口转换为ui使用(表单字段,Collection 的 Omit<IResourceFormCommon, 'description'> 需手动映射公共字段)
80
- * @param data ICollectionFormApi
81
- * @returns ICollectionForm
78
+ /**
79
+ * 接口转换为ui使用(表单字段,Collection 的 Omit<IResourceFormCommon, 'description'> 需手动映射公共字段)
80
+ * @param data ICollectionFormApi
81
+ * @returns ICollectionForm
82
82
  */ export const transferCollectionFormApi2CollectionForm = (data)=>({
83
83
  tagNames: data.tag_names,
84
84
  generateType: data.generate_type,
@@ -89,10 +89,10 @@ import { transferBaseCount2BaseCountApi, transferIPaginationParam2IPaginationPar
89
89
  variables: data.variables.map(transferVariableApi2Variable),
90
90
  content: data.content
91
91
  });
92
- /**
93
- * 接口转换为ui使用(完整资源)
94
- * @param data ICollectionApi
95
- * @returns ICollection
92
+ /**
93
+ * 接口转换为ui使用(完整资源)
94
+ * @param data ICollectionApi
95
+ * @returns ICollection
96
96
  */ export const transferCollectionApi2Collection = (data)=>{
97
97
  var _data_collection_id, _ref, _data_ref_count;
98
98
  return _object_spread_props(_object_spread({}, transferCollectionFormApi2CollectionForm(data), transferResourceCommonApi2ResourceCommon(data)), {