@blueking/ai-ui-sdk 0.6.0-beta.2 → 0.6.0-beta.21

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 (155) hide show
  1. package/README.md +3 -1
  2. package/dist/common/constants.d.ts +4 -0
  3. package/dist/common/constants.ts.js +30 -0
  4. package/dist/common/util.d.ts +5 -2
  5. package/dist/common/util.ts.js +12 -3
  6. package/dist/components/render-agent/agent-type.vue.css +4 -4
  7. package/dist/components/render-agent/agent-type.vue.js +1 -1
  8. package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
  9. package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
  10. package/dist/components/render-auto-refresh/index.script.vue.js.js +60 -46
  11. package/dist/components/render-auto-refresh/index.vue.js +0 -2
  12. package/dist/components/render-card/agent/prefix-info-tool.vue.css +5 -5
  13. package/dist/components/render-card/agent/prefix-info-tool.vue.js +1 -1
  14. package/dist/components/render-card/agent/upgrade.vue.css +2 -2
  15. package/dist/components/render-card/agent/upgrade.vue.js +1 -1
  16. package/dist/components/render-card/base/approval-strategy-popover.script.vue.js.js +2 -2
  17. package/dist/components/render-card/base.vue.css +13 -13
  18. package/dist/components/render-card/base.vue.js +1 -1
  19. package/dist/components/render-card/llm/corner-badge.vue.css +3 -3
  20. package/dist/components/render-card/llm/corner-badge.vue.js +1 -1
  21. package/dist/components/render-card/llm/icons.vue.css +2 -2
  22. package/dist/components/render-card/llm/icons.vue.js +1 -1
  23. package/dist/components/render-card/llm/info.vue.css +1 -1
  24. package/dist/components/render-card/llm/info.vue.js +1 -1
  25. package/dist/components/render-card/llm/tag-prefix.vue.css +2 -2
  26. package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
  27. package/dist/components/render-card/mcp/name-suffix.vue.css +2 -2
  28. package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
  29. package/dist/components/render-card/prompt/icons.vue.css +1 -1
  30. package/dist/components/render-card/prompt/icons.vue.js +1 -1
  31. package/dist/components/render-card/skill/scanner.vue.css +3 -3
  32. package/dist/components/render-card/skill/scanner.vue.js +1 -1
  33. package/dist/components/render-checkbox/index.vue.css +4 -4
  34. package/dist/components/render-checkbox/index.vue.js +1 -1
  35. package/dist/components/render-choose-tag/index.vue.css +7 -7
  36. package/dist/components/render-choose-tag/index.vue.js +1 -1
  37. package/dist/components/render-collapse/index.vue.css +2 -2
  38. package/dist/components/render-collapse/index.vue.js +1 -1
  39. package/dist/components/render-collection/content/index.vue.css +4 -4
  40. package/dist/components/render-collection/content/index.vue.js +1 -1
  41. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +3 -3
  42. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +1 -1
  43. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  44. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  45. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  46. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  47. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  48. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
  49. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  50. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  51. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +1 -1
  52. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  53. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
  54. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
  55. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  56. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  57. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +1 -1
  58. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  59. package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
  60. package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
  61. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  62. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  63. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  64. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  65. package/dist/components/render-dataset-list/index.vue.css +2 -2
  66. package/dist/components/render-dataset-list/index.vue.js +1 -1
  67. package/dist/components/render-dialog/choose-resource.vue.css +3 -3
  68. package/dist/components/render-dialog/choose-resource.vue.js +1 -1
  69. package/dist/components/render-dialog/choose-result.vue.css +14 -14
  70. package/dist/components/render-dialog/choose-result.vue.js +1 -1
  71. package/dist/components/render-dialog/choose-space.vue.css +9 -9
  72. package/dist/components/render-dialog/choose-space.vue.js +1 -1
  73. package/dist/components/render-dialog/index.vue.css +6 -6
  74. package/dist/components/render-dialog/index.vue.js +1 -1
  75. package/dist/components/render-dropdown/index.vue.css +1 -0
  76. package/dist/components/render-exception/index.vue.css +9 -9
  77. package/dist/components/render-exception/index.vue.js +1 -1
  78. package/dist/components/render-file-card/index.vue.css +11 -11
  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.script.vue.js.js +6 -0
  83. package/dist/components/render-generate-tag/index.vue.css +13 -5
  84. package/dist/components/render-generate-tag/index.vue.js +1 -1
  85. package/dist/components/render-header/index.script.vue.js.js +5 -2
  86. package/dist/components/render-knowledge/icon/index.vue.css +1 -1
  87. package/dist/components/render-knowledge/icon/index.vue.js +1 -1
  88. package/dist/components/render-markdown/common.ts.js +2 -1
  89. package/dist/components/render-markdown/edit.postcss.css +16 -0
  90. package/dist/components/render-markdown/edit.ts.js +18 -8
  91. package/dist/components/render-markdown/filter-css.ts.js +3 -8
  92. package/dist/components/render-markdown/html.d.ts +2 -0
  93. package/dist/components/render-markdown/html.ts.js +67 -0
  94. package/dist/components/render-markdown/image.d.ts +3 -0
  95. package/dist/components/render-markdown/image.ts.js +98 -0
  96. package/dist/components/render-markdown/katex.ts.js +14 -4
  97. package/dist/components/render-markdown/view.d.ts +10 -0
  98. package/dist/components/render-markdown/view.ts.js +69 -2
  99. package/dist/components/render-prompt/content/index.vue.css +1 -1
  100. package/dist/components/render-prompt/content/index.vue.js +1 -1
  101. package/dist/components/render-reference/index.vue.css +2 -2
  102. package/dist/components/render-reference/index.vue.js +1 -1
  103. package/dist/components/render-resource-version/index.vue.css +2 -2
  104. package/dist/components/render-resource-version/index.vue.js +1 -1
  105. package/dist/components/render-router-tab/index.vue.css +3 -3
  106. package/dist/components/render-router-tab/index.vue.js +1 -1
  107. package/dist/components/render-select-plus-extension/index.vue.css +3 -3
  108. package/dist/components/render-select-plus-extension/index.vue.js +1 -1
  109. package/dist/components/render-skill/install/index.script.vue.js.js +38 -28
  110. package/dist/components/render-skill/install/{openclaw-windows-instances.script.vue.js.js → openclaw-instances.script.vue.js.js} +23 -21
  111. package/dist/components/render-skill/install/{openclaw-windows-instances.vue.d.ts → openclaw-instances.vue.d.ts} +6 -4
  112. package/dist/components/render-skill/install/openclaw-instances.vue.js +3 -0
  113. package/dist/components/render-t-table/index.vue.css +33 -29
  114. package/dist/components/render-t-table/index.vue.js +1 -1
  115. package/dist/components/render-tag-tree/index.vue.css +7 -7
  116. package/dist/components/render-tag-tree/index.vue.js +1 -1
  117. package/dist/components/render-tags/index.vue.css +6 -6
  118. package/dist/components/render-tags/index.vue.js +1 -1
  119. package/dist/components/render-tree/index.script.vue.js +1 -1
  120. package/dist/css/bk-icon/fonts/iconcool.eot +0 -0
  121. package/dist/css/bk-icon/fonts/iconcool.svg +3 -0
  122. package/dist/css/bk-icon/fonts/iconcool.ttf +0 -0
  123. package/dist/css/bk-icon/fonts/iconcool.woff +0 -0
  124. package/dist/css/bk-icon/iconcool.js +1 -1
  125. package/dist/css/bk-icon/style.css +3 -0
  126. package/dist/css/bk-patch.css +31 -6
  127. package/dist/css/g-utilities.css +71 -0
  128. package/dist/css/g-utilities.manifest.json +17 -0
  129. package/dist/css/variable/token.d.ts +11 -0
  130. package/dist/css/variable/token.ts.js +16 -1
  131. package/dist/hooks/use-form-rule.d.ts +31 -2
  132. package/dist/hooks/use-form-rule.ts.js +65 -26
  133. package/dist/hooks/use-meta-http.d.ts +6 -2
  134. package/dist/hooks/use-meta-http.ts.js +19 -5
  135. package/dist/hooks/use-scroll-load.d.ts +12 -3
  136. package/dist/hooks/use-skill-http.d.ts +7 -6
  137. package/dist/hooks/use-skill-http.ts.js +19 -17
  138. package/dist/hooks.d.ts +1 -0
  139. package/dist/hooks.ts.js +1 -0
  140. package/dist/http/helper/agent.ts.js +12 -2
  141. package/dist/http/helper/model.ts.js +42 -1
  142. package/dist/http/helper/skill.d.ts +9 -9
  143. package/dist/http/helper/skill.ts.js +12 -10
  144. package/dist/i18n/en-US.d.ts +20 -0
  145. package/dist/i18n/en-US.ts.js +21 -1
  146. package/dist/i18n/zh-CN.d.ts +20 -0
  147. package/dist/i18n/zh-CN.ts.js +21 -1
  148. package/dist/types/agent.d.ts +11 -1
  149. package/dist/types/enum.d.ts +6 -1
  150. package/dist/types/enum.ts.js +6 -0
  151. package/dist/types/model.d.ts +16 -0
  152. package/dist/types/skill.d.ts +26 -22
  153. package/package.json +3 -3
  154. package/dist/components/render-auto-refresh/index.vue.css +0 -46
  155. package/dist/components/render-skill/install/openclaw-windows-instances.vue.js +0 -3
@@ -1,35 +1,35 @@
1
1
 
2
- .choose-space[data-v-wnl5zm31] {
2
+ .choose-space[data-v-tdwtvneh] {
3
3
  padding: 0 18px 0 24px;
4
4
  height: 100%;
5
5
  font-size: 12px;
6
6
  }
7
- .space-list[data-v-wnl5zm31] {
7
+ .space-list[data-v-tdwtvneh] {
8
8
  margin-top: 12px;
9
9
  height: calc(100% - 88px);
10
10
  }
11
- .space-list .space-item[data-v-wnl5zm31] {
11
+ .space-list .space-item[data-v-tdwtvneh] {
12
12
  line-height: 32px;
13
13
  padding-left: 8px;
14
14
  }
15
- .space-list .space-item[data-v-wnl5zm31]:hover {
15
+ .space-list .space-item[data-v-tdwtvneh]:hover {
16
16
  background: #f5f7fa;
17
17
  }
18
- .space-list .space-item.space-item-active[data-v-wnl5zm31] {
18
+ .space-list .space-item.space-item-active[data-v-tdwtvneh] {
19
19
  background: var(--aidev-item-hover-background);
20
20
  color: var(--aidev-clickable-color);
21
21
  }
22
- .space-list .space-item.space-item-active .space-tool-number[data-v-wnl5zm31] {
22
+ .space-list .space-item.space-item-active .space-tool-number[data-v-tdwtvneh] {
23
23
  background: var(--aidev-list-item-active-count-background);
24
24
  color: #FFFFFF;
25
25
  }
26
- .space-list .space-item.space-item-active .bkaidev-guanlikongjian-3[data-v-wnl5zm31] {
26
+ .space-list .space-item.space-item-active .bkaidev-guanlikongjian-3[data-v-tdwtvneh] {
27
27
  color: var(--aidev-clickable-color);
28
28
  }
29
- .space-list .space-item.space-item-active .ai-ui-sdk-icon[data-v-wnl5zm31] {
29
+ .space-list .space-item.space-item-active .ai-ui-sdk-icon[data-v-tdwtvneh] {
30
30
  color: var(--aidev-clickable-color);
31
31
  }
32
- .space-list .space-tool-number[data-v-wnl5zm31] {
32
+ .space-list .space-tool-number[data-v-tdwtvneh] {
33
33
  padding: 0 6px;
34
34
  border-radius: var(--aidev-radius-s);
35
35
  background: var(--aidev-tag-background);
@@ -1,5 +1,5 @@
1
1
  import script from './choose-space.script.vue.js.js';
2
- script.__scopeId = "data-v-wnl5zm31";
2
+ script.__scopeId = "data-v-tdwtvneh";
3
3
  script.__file = "./src/components/render-dialog/choose-space.vue";
4
4
  import './choose-space.vue.css';
5
5
  export default script;
@@ -1,24 +1,24 @@
1
1
 
2
- .resource-dialog[data-v-04ttigzu] .bk-modal-wrapper {
2
+ .resource-dialog[data-v-3tvgw2lk] .bk-modal-wrapper {
3
3
  max-width: 1600px;
4
4
  }
5
- .resource-dialog-main[data-v-04ttigzu] {
5
+ .resource-dialog-main[data-v-3tvgw2lk] {
6
6
  height: 60vh;
7
7
  }
8
- .resource-dialog-choose[data-v-04ttigzu] {
8
+ .resource-dialog-choose[data-v-3tvgw2lk] {
9
9
  width: 75%;
10
10
  height: 100%;
11
11
  }
12
- .resource-dialog-title[data-v-04ttigzu] {
12
+ .resource-dialog-title[data-v-3tvgw2lk] {
13
13
  font-size: 20px;
14
14
  line-height: 28px;
15
15
  color: var(--aidev-title-color);
16
16
  padding: 15px 24px 14px;
17
17
  }
18
- .resource-dialog-layout[data-v-04ttigzu] {
18
+ .resource-dialog-layout[data-v-3tvgw2lk] {
19
19
  height: calc(100% - 57px);
20
20
  }
21
- .resource-dialog-result[data-v-04ttigzu] {
21
+ .resource-dialog-result[data-v-3tvgw2lk] {
22
22
  width: 25%;
23
23
  height: 100%;
24
24
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js';
2
- script.__scopeId = "data-v-04ttigzu";
2
+ script.__scopeId = "data-v-3tvgw2lk";
3
3
  script.__file = "./src/components/render-dialog/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,6 +1,7 @@
1
1
 
2
2
  .render-dropdown-content {
3
3
  overflow: hidden;
4
+ border-radius: var(--aidev-radius);
4
5
  }
5
6
  .tippy-box[data-theme~='light'] {
6
7
  background-color: #fff;
@@ -1,32 +1,32 @@
1
1
 
2
- [data-v-5dvrftt6] svg {
2
+ [data-v-26s5shu0] svg {
3
3
  flex-shrink: 0;
4
4
  max-width: none;
5
5
  height: auto;
6
6
  }
7
- .is-part[data-v-5dvrftt6] svg {
7
+ .is-part[data-v-26s5shu0] svg {
8
8
  width: 300%;
9
9
  }
10
- .is-page[data-v-5dvrftt6] svg {
10
+ .is-page[data-v-26s5shu0] svg {
11
11
  width: 100%;
12
12
  }
13
- [data-v-5dvrftt6] .bk-exception-title {
13
+ [data-v-26s5shu0] .bk-exception-title {
14
14
  margin-top: -10px;
15
15
  margin-bottom: 20px;
16
16
  }
17
- [data-v-5dvrftt6] .bk-exception-description {
17
+ [data-v-26s5shu0] .bk-exception-description {
18
18
  margin-bottom: 8px;
19
19
  white-space: pre-wrap;
20
20
  }
21
- [data-v-5dvrftt6] .bk-exception-footer {
21
+ [data-v-26s5shu0] .bk-exception-footer {
22
22
  margin-top: 0;
23
23
  }
24
- [data-v-5dvrftt6] .bk-exception-footer:has(.bk-exception-description) {
24
+ [data-v-26s5shu0] .bk-exception-footer:has(.bk-exception-description) {
25
25
  text-align: left;
26
26
  }
27
- .bk-exception-part[data-v-5dvrftt6] .bk-exception-description {
27
+ .bk-exception-part[data-v-26s5shu0] .bk-exception-description {
28
28
  margin-top: 0;
29
29
  }
30
- .bk-exception-page[data-v-5dvrftt6] .bk-exception-description {
30
+ .bk-exception-page[data-v-26s5shu0] .bk-exception-description {
31
31
  margin-top: -36px;
32
32
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-5dvrftt6";
2
+ script.__scopeId = "data-v-26s5shu0";
3
3
  script.__file = "./src/components/render-exception/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,21 +1,21 @@
1
1
 
2
- .upload-file-home[data-v-0fzktvtj] {
2
+ .upload-file-home[data-v-xjn2hqk7] {
3
3
  position: relative;
4
4
  background: #FFFFFF;
5
5
  border: 1px solid var(--aidev-line-strong-color);
6
6
  border-radius: var(--aidev-radius-l);
7
7
  padding: 12px 12px 10px 12px;
8
8
  }
9
- .upload-file-home[data-v-0fzktvtj]:hover {
9
+ .upload-file-home[data-v-xjn2hqk7]:hover {
10
10
  border: 1px solid var(--aidev-clickable-color);
11
11
  }
12
- .upload-file-home:hover .file-icons[data-v-0fzktvtj] {
12
+ .upload-file-home:hover .file-icons[data-v-xjn2hqk7] {
13
13
  display: flex;
14
14
  }
15
- .upload-file-home .file-icon[data-v-0fzktvtj] {
15
+ .upload-file-home .file-icon[data-v-xjn2hqk7] {
16
16
  font-size: 32px;
17
17
  }
18
- .upload-file-home .file-content[data-v-0fzktvtj] {
18
+ .upload-file-home .file-content[data-v-xjn2hqk7] {
19
19
  font-size: 12px;
20
20
  flex: 1;
21
21
  align-items: flex-start;
@@ -23,28 +23,28 @@
23
23
  font-weight: normal;
24
24
  width: 0;
25
25
  }
26
- .upload-file-home .file-content .file-name[data-v-0fzktvtj] {
26
+ .upload-file-home .file-content .file-name[data-v-xjn2hqk7] {
27
27
  width: 100%;
28
28
  font-size: 14px;
29
29
  line-height: 20px;
30
30
  }
31
- .upload-file-home .file-content .file-size[data-v-0fzktvtj] {
31
+ .upload-file-home .file-content .file-size[data-v-xjn2hqk7] {
32
32
  font-size: 12px;
33
33
  color: var(--aidev-assist-color);
34
34
  line-height: 20px;
35
35
  }
36
- .upload-file-home .file-icons[data-v-0fzktvtj] {
36
+ .upload-file-home .file-icons[data-v-xjn2hqk7] {
37
37
  display: none;
38
38
  color: var(--aidev-assist-color);
39
39
  }
40
- .upload-file-home .file-icons .ai-ui-sdk-icon[data-v-0fzktvtj] {
40
+ .upload-file-home .file-icons .ai-ui-sdk-icon[data-v-xjn2hqk7] {
41
41
  cursor: pointer;
42
42
  margin-right: 15px;
43
43
  font-size: 16px;
44
44
  }
45
- .upload-file-home .file-icons .ai-ui-sdk-icon[data-v-0fzktvtj]:hover {
45
+ .upload-file-home .file-icons .ai-ui-sdk-icon[data-v-xjn2hqk7]:hover {
46
46
  color: var(--aidev-clickable-color);
47
47
  }
48
- .upload-file-home .file-icons .ai-ui-sdk-delete[data-v-0fzktvtj] {
48
+ .upload-file-home .file-icons .ai-ui-sdk-delete[data-v-xjn2hqk7] {
49
49
  margin: 0;
50
50
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-0fzktvtj";
2
+ script.__scopeId = "data-v-xjn2hqk7";
3
3
  script.__file = "./src/components/render-file-card/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,19 +1,19 @@
1
1
 
2
- .ai-ui-sdk-icon.ai-ui-sdk-pdf[data-v-0g5mldbi] {
2
+ .ai-ui-sdk-icon.ai-ui-sdk-pdf[data-v-yvdk6dx2] {
3
3
  color: var(--aidev-alert-danger-icon-color);
4
4
  }
5
- .ai-ui-sdk-icon.ai-ui-sdk-doc-2[data-v-0g5mldbi], .ai-ui-sdk-icon.ai-ui-sdk-ppt-2[data-v-0g5mldbi], .ai-ui-sdk-icon.ai-ui-sdk-markdown[data-v-0g5mldbi] {
5
+ .ai-ui-sdk-icon.ai-ui-sdk-doc-2[data-v-yvdk6dx2], .ai-ui-sdk-icon.ai-ui-sdk-ppt-2[data-v-yvdk6dx2], .ai-ui-sdk-icon.ai-ui-sdk-markdown[data-v-yvdk6dx2] {
6
6
  color: var(--aidev-clickable-color);
7
7
  }
8
- .ai-ui-sdk-icon.ai-ui-sdk-folder-fill[data-v-0g5mldbi] {
8
+ .ai-ui-sdk-icon.ai-ui-sdk-folder-fill[data-v-yvdk6dx2] {
9
9
  color: var(--aidev-disabled-color);
10
10
  }
11
- .ai-ui-sdk-icon.ai-ui-sdk-archive-line[data-v-0g5mldbi] {
11
+ .ai-ui-sdk-icon.ai-ui-sdk-archive-line[data-v-yvdk6dx2] {
12
12
  color: var(--aidev-assist-color);
13
13
  }
14
- .ai-ui-sdk-icon.ai-ui-sdk-excel[data-v-0g5mldbi] {
14
+ .ai-ui-sdk-icon.ai-ui-sdk-excel[data-v-yvdk6dx2] {
15
15
  color: var(--aidev-alert-success-icon-color);
16
16
  }
17
- .ai-ui-sdk-icon.ai-ui-sdk-wangye[data-v-0g5mldbi] {
17
+ .ai-ui-sdk-icon.ai-ui-sdk-wangye[data-v-yvdk6dx2] {
18
18
  color: var(--aidev-generate-public-color);
19
19
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-0g5mldbi";
2
+ script.__scopeId = "data-v-yvdk6dx2";
3
3
  script.__file = "./src/components/render-file-type-icon/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -29,6 +29,9 @@ export default /*@__PURE__*/ _defineComponent({
29
29
  setup (__props) {
30
30
  const props = __props;
31
31
  const getIconClass = (generateType)=>{
32
+ if (generateType === EnumCharacter.Global) {
33
+ return 'ai-ui-sdk-icon ai-ui-sdk-quanzuhukejian';
34
+ }
32
35
  if (generateType === EnumCharacter.Public) {
33
36
  return 'ai-ui-sdk-icon ai-ui-sdk-suoyoukongjiangongkai';
34
37
  }
@@ -42,6 +45,9 @@ export default /*@__PURE__*/ _defineComponent({
42
45
  };
43
46
  const getTooltipContent = (generateType)=>{
44
47
  if (!props.showTips) return '';
48
+ if (generateType === EnumCharacter.Global) {
49
+ return props.module === Module.Agent ? t('该智能体已对平台所有租户公开,可被所有租户的空间智能体关联调用') : t('该资源已对平台所有租户开放,所有租户的空间均可使用');
50
+ }
45
51
  if (generateType === EnumCharacter.Public) {
46
52
  return props.module === Module.Agent ? t('该智能体由【{currentSpaceName}】空间开放,可被所有空间智能体关联调用', {
47
53
  currentSpaceName: getCurrentSpaceName(props.spaces, props.spaceId)
@@ -1,22 +1,30 @@
1
1
 
2
- .generate-type-tag[data-v-9sn5oq8u] {
2
+ .generate-type-tag[data-v-cmpx35xu] {
3
3
  border-radius: var(--aidev-radius-s);
4
4
  text-align: left;
5
5
  white-space: nowrap;
6
6
  }
7
- .generate-type-tag.public[data-v-9sn5oq8u] {
7
+ .generate-type-tag.global[data-v-cmpx35xu] {
8
+ color: var(--aidev-generate-global-color);
9
+ background-color: var(--aidev-generate-global-background);
10
+ }
11
+ .generate-type-tag.global[data-v-cmpx35xu]:hover {
12
+ color: var(--aidev-generate-global-hover-color);
13
+ background-color: var(--aidev-generate-global-hover-background);
14
+ }
15
+ .generate-type-tag.public[data-v-cmpx35xu] {
8
16
  color: var(--aidev-generate-public-color);
9
17
  background-color: var(--aidev-generate-public-background);
10
18
  }
11
- .generate-type-tag.public[data-v-9sn5oq8u]:hover {
19
+ .generate-type-tag.public[data-v-cmpx35xu]:hover {
12
20
  color: var(--aidev-generate-public-hover-color);
13
21
  background-color: var(--aidev-generate-public-hover-background);
14
22
  }
15
- .generate-type-tag.space[data-v-9sn5oq8u] {
23
+ .generate-type-tag.space[data-v-cmpx35xu] {
16
24
  color: var(--aidev-generate-space-color);
17
25
  background-color: var(--aidev-generate-space-background);
18
26
  }
19
- .generate-type-tag.space[data-v-9sn5oq8u]:hover {
27
+ .generate-type-tag.space[data-v-cmpx35xu]:hover {
20
28
  color: var(--aidev-generate-space-hover-color);
21
29
  background-color: var(--aidev-generate-space-hover-background);
22
30
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-9sn5oq8u";
2
+ script.__scopeId = "data-v-cmpx35xu";
3
3
  script.__file = "./src/components/render-generate-tag/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -14,7 +14,10 @@ const _hoisted_3 = {
14
14
  };
15
15
  const _hoisted_4 = {
16
16
  key: 0,
17
- class: "g-flex-row g-bg-[var(--aidev-inner-background)] g-p-4 g-inline-flex-row g-rounded-[var(--aidev-radius)]"
17
+ class: /*@__PURE__*/ _normalizeClass([
18
+ 'g-bg-[var(--aidev-inner-background)] g-mr-8 g-p-4 g-inline-flex-row g-rounded-[var(--aidev-radius)]',
19
+ 'g-min-w-0 g-scrollbar g-overflow-x-auto !g-overflow-y-hidden'
20
+ ])
18
21
  };
19
22
  const _hoisted_5 = [
20
23
  "onClick"
@@ -66,7 +69,7 @@ export default /*@__PURE__*/ _defineComponent({
66
69
  (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(props.tabs, (tab)=>{
67
70
  return _openBlock(), _createElementBlock("li", {
68
71
  class: _normalizeClass([
69
- 'g-flex-row g-px-12 g-py-2 g-h-24 g-text-12 g-leading-20',
72
+ 'g-flex-row g-px-12 g-py-2 g-h-24 g-text-12 g-leading-20 g-whitespace-nowrap',
70
73
  'g-rounded-[var(--aidev-radius)] !g-cursor-pointer',
71
74
  props.groupType === tab.id ? [
72
75
  'g-bg-[var(--aidev-main-background)] g-text-[var(--aidev-clickable-color)]',
@@ -1,4 +1,4 @@
1
1
 
2
- .ai-ui-sdk-icon[data-v-y635oo99] {
2
+ .ai-ui-sdk-icon[data-v-b2hdvxk5] {
3
3
  color: var(--aidev-assist-color);
4
4
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-y635oo99";
2
+ script.__scopeId = "data-v-b2hdvxk5";
3
3
  script.__file = "./src/components/render-knowledge/icon/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -28,6 +28,7 @@ function _object_spread(target) {
28
28
  }
29
29
  import Prism from 'prismjs';
30
30
  import CodeSyntaxHighlight from '@toast-ui/editor-plugin-code-syntax-highlight';
31
+ import { createHtmlCustomRenderer } from './html.ts.js';
31
32
  import { createTuiKatexCustomRenderer } from './katex.ts.js';
32
33
  import { MarkDownCodeCopyPlugin } from './mark-down-code-copy.ts.js';
33
34
  import './prism-atom-one-dark.postcss.css';
@@ -70,5 +71,5 @@ export const commonConfig = {
70
71
  customHTMLRenderer: _object_spread({}, createTuiKatexCustomRenderer({
71
72
  autoEscapePercent: true,
72
73
  enableSingleDollar: true
73
- }))
74
+ }), createHtmlCustomRenderer())
74
75
  };
@@ -108,6 +108,22 @@
108
108
  border: 1px solid var(--aidev-form-error-border-color) !important;
109
109
  }
110
110
 
111
+ .full-screen-wrap.is-empty .toastui-editor-defaultUI .ProseMirror {
112
+ position: relative;
113
+ }
114
+
115
+ .full-screen-wrap.is-empty .toastui-editor-defaultUI .ProseMirror::before {
116
+ position: absolute;
117
+ top: 12px;
118
+ right: 16px;
119
+ left: 16px;
120
+ content: attr(data-placeholder);
121
+ line-height: 160%;
122
+ white-space: pre-wrap;
123
+ color: var(--aidev-form-placeholder-color);
124
+ pointer-events: none;
125
+ }
126
+
111
127
  .toastui-editor-contents .placeholder,
112
128
  .toastui-editor-ww-container .placeholder,
113
129
  .toastui-editor-defaultUI .ProseMirror .placeholder,
@@ -79,6 +79,13 @@ export default defineComponent({
79
79
  const value = (editor === null || editor === void 0 ? void 0 : editor.getMarkdown()) || '';
80
80
  emit('update:modelValue', value);
81
81
  };
82
+ // 不使用 toast-ui 自带的 placeholder
83
+ const handleSetPlaceholder = ()=>{
84
+ const root = editorRef.value;
85
+ root === null || root === void 0 ? void 0 : root.querySelectorAll('.ProseMirror').forEach((el)=>{
86
+ el.setAttribute('data-placeholder', props.placeholder || '');
87
+ });
88
+ };
82
89
  const handleInit = ()=>{
83
90
  const defaultMode = props.mode || "wysiwyg";
84
91
  // 切换模式按钮
@@ -146,19 +153,16 @@ export default defineComponent({
146
153
  ]
147
154
  ],
148
155
  [
149
- ...props.isSimpleToolbar ? [] : [
150
- {
151
- name: 'modeSwitch',
152
- el: modeSwitchEl
153
- }
154
- ],
156
+ {
157
+ name: 'modeSwitch',
158
+ el: modeSwitchEl
159
+ },
155
160
  {
156
161
  name: 'fullScreen',
157
162
  el: fullScreenEl
158
163
  }
159
164
  ]
160
165
  ],
161
- placeholder: props.placeholder,
162
166
  initialValue: props.modelValue || '',
163
167
  height: props.height,
164
168
  events: {
@@ -214,13 +218,19 @@ export default defineComponent({
214
218
  });
215
219
  onMounted(()=>{
216
220
  handleInit();
221
+ handleSetPlaceholder();
217
222
  handleDisabled();
218
223
  });
219
224
  onBeforeUnmount(handleDestroy);
220
225
  watch(()=>props.disabled, handleDisabled);
226
+ watch(()=>props.placeholder, handleSetPlaceholder);
221
227
  return ()=>h('section', {
222
228
  ref: editorRef,
223
- class: `full-screen-wrap ${props.disabled ? 'is-disabled' : ''}`,
229
+ class: {
230
+ 'full-screen-wrap': true,
231
+ 'is-disabled': props.disabled,
232
+ 'is-empty': !props.modelValue
233
+ },
224
234
  style: {
225
235
  backgroundColor: props.backgroundColor
226
236
  }
@@ -1,4 +1,5 @@
1
1
  import { filterXss } from '@blueking/xss-filter';
2
+ import { REQUEST_IMAGE_ATTR } from './image.ts.js';
2
3
  const NUMERIC_PROPS = new Set([
3
4
  'height',
4
5
  'top',
@@ -51,7 +52,8 @@ const SAFE_COLOR_KEYWORDS = new Set([
51
52
  ]);
52
53
  const SAFE_ATTRIBUTES = new Set([
53
54
  'data-nodeid',
54
- 'data-clipboard-text'
55
+ 'data-clipboard-text',
56
+ REQUEST_IMAGE_ATTR
55
57
  ]);
56
58
  const isSafeCssValue = (value)=>{
57
59
  return !DANGEROUS_CSS_VALUE_RE.test(value);
@@ -125,13 +127,6 @@ export const filterCSS = (html)=>{
125
127
  export const escapeHtml = (html)=>{
126
128
  return filterCSS(filterXss(html, {
127
129
  whiteList: {
128
- a: [
129
- 'href',
130
- 'target',
131
- 'class',
132
- 'title',
133
- 'rel'
134
- ],
135
130
  section: [
136
131
  'class'
137
132
  ],
@@ -0,0 +1,2 @@
1
+ import type { CustomHTMLRenderer } from '@toast-ui/editor';
2
+ export declare const createHtmlCustomRenderer: () => CustomHTMLRenderer;
@@ -0,0 +1,67 @@
1
+ function _define_property(obj, key, value) {
2
+ if (key in obj) {
3
+ Object.defineProperty(obj, key, {
4
+ value: value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ } else {
10
+ obj[key] = value;
11
+ }
12
+ return obj;
13
+ }
14
+ function _object_spread(target) {
15
+ for(var i = 1; i < arguments.length; i++){
16
+ var source = arguments[i] != null ? arguments[i] : {};
17
+ var ownKeys = Object.keys(source);
18
+ if (typeof Object.getOwnPropertySymbols === "function") {
19
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
20
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
21
+ }));
22
+ }
23
+ ownKeys.forEach(function(key) {
24
+ _define_property(target, key, source[key]);
25
+ });
26
+ }
27
+ return target;
28
+ }
29
+ function ownKeys(object, enumerableOnly) {
30
+ var keys = Object.keys(object);
31
+ if (Object.getOwnPropertySymbols) {
32
+ var symbols = Object.getOwnPropertySymbols(object);
33
+ if (enumerableOnly) {
34
+ symbols = symbols.filter(function(sym) {
35
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
36
+ });
37
+ }
38
+ keys.push.apply(keys, symbols);
39
+ }
40
+ return keys;
41
+ }
42
+ function _object_spread_props(target, source) {
43
+ source = source != null ? source : {};
44
+ if (Object.getOwnPropertyDescriptors) {
45
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
46
+ } else {
47
+ ownKeys(Object(source)).forEach(function(key) {
48
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
49
+ });
50
+ }
51
+ return target;
52
+ }
53
+ const RAW_ANCHOR_TAG_RE = /<\/?a(?=[\s/>])(?:[^>"']|"[^"]*"|'[^']*')*>/gi;
54
+ // 原生 HTML 中的 <a> 只保留内部文本,markdown 链接走 link 节点不受影响
55
+ const stripRawAnchorTag = (_node, { origin })=>{
56
+ const result = origin();
57
+ if (!result) return result;
58
+ return (Array.isArray(result) ? result : [
59
+ result
60
+ ]).map((token)=>token.type === 'html' ? _object_spread_props(_object_spread({}, token), {
61
+ content: token.content.replace(RAW_ANCHOR_TAG_RE, '')
62
+ }) : token);
63
+ };
64
+ export const createHtmlCustomRenderer = ()=>({
65
+ htmlInline: stripRawAnchorTag,
66
+ htmlBlock: stripRawAnchorTag
67
+ });
@@ -0,0 +1,3 @@
1
+ import type { CustomHTMLRenderer } from '@toast-ui/editor';
2
+ export declare const REQUEST_IMAGE_ATTR = "data-request-src";
3
+ export declare const createImageCustomRenderer: (isRequestImage: () => boolean) => CustomHTMLRenderer;
@@ -0,0 +1,98 @@
1
+ function _define_property(obj, key, value) {
2
+ if (key in obj) {
3
+ Object.defineProperty(obj, key, {
4
+ value: value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ } else {
10
+ obj[key] = value;
11
+ }
12
+ return obj;
13
+ }
14
+ function _object_spread(target) {
15
+ for(var i = 1; i < arguments.length; i++){
16
+ var source = arguments[i] != null ? arguments[i] : {};
17
+ var ownKeys = Object.keys(source);
18
+ if (typeof Object.getOwnPropertySymbols === "function") {
19
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
20
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
21
+ }));
22
+ }
23
+ ownKeys.forEach(function(key) {
24
+ _define_property(target, key, source[key]);
25
+ });
26
+ }
27
+ return target;
28
+ }
29
+ function ownKeys(object, enumerableOnly) {
30
+ var keys = Object.keys(object);
31
+ if (Object.getOwnPropertySymbols) {
32
+ var symbols = Object.getOwnPropertySymbols(object);
33
+ if (enumerableOnly) {
34
+ symbols = symbols.filter(function(sym) {
35
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
36
+ });
37
+ }
38
+ keys.push.apply(keys, symbols);
39
+ }
40
+ return keys;
41
+ }
42
+ function _object_spread_props(target, source) {
43
+ source = source != null ? source : {};
44
+ if (Object.getOwnPropertyDescriptors) {
45
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
46
+ } else {
47
+ ownKeys(Object(source)).forEach(function(key) {
48
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
49
+ });
50
+ }
51
+ return target;
52
+ }
53
+ function _object_without_properties(source, excluded) {
54
+ if (source == null) return {};
55
+ var target = _object_without_properties_loose(source, excluded);
56
+ var key, i;
57
+ if (Object.getOwnPropertySymbols) {
58
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
59
+ for(i = 0; i < sourceSymbolKeys.length; i++){
60
+ key = sourceSymbolKeys[i];
61
+ if (excluded.indexOf(key) >= 0) continue;
62
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
63
+ target[key] = source[key];
64
+ }
65
+ }
66
+ return target;
67
+ }
68
+ function _object_without_properties_loose(source, excluded) {
69
+ if (source == null) return {};
70
+ var target = {};
71
+ var sourceKeys = Object.keys(source);
72
+ var key, i;
73
+ for(i = 0; i < sourceKeys.length; i++){
74
+ key = sourceKeys[i];
75
+ if (excluded.indexOf(key) >= 0) continue;
76
+ target[key] = source[key];
77
+ }
78
+ return target;
79
+ }
80
+ export const REQUEST_IMAGE_ATTR = 'data-request-src';
81
+ // <img> 无法携带请求头,先不输出 src,渲染后按 requestOptions 带头拉取
82
+ export const createImageCustomRenderer = (isRequestImage)=>{
83
+ const image = (_node, { origin })=>{
84
+ const result = origin();
85
+ if (!isRequestImage() || !result || Array.isArray(result) || result.type !== 'openTag') return result;
86
+ const _result_attributes = result.attributes, { src } = _result_attributes, attributes = _object_without_properties(_result_attributes, [
87
+ "src"
88
+ ]);
89
+ return _object_spread_props(_object_spread({}, result), {
90
+ attributes: _object_spread_props(_object_spread({}, attributes), {
91
+ [REQUEST_IMAGE_ATTR]: src
92
+ })
93
+ });
94
+ };
95
+ return {
96
+ image
97
+ };
98
+ };