@blueking/ai-ui-sdk 0.1.12-beta.53 → 0.1.12-beta.55

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 (78) hide show
  1. package/dist/components/render-aside/index.vue.css +9 -9
  2. package/dist/components/render-aside/index.vue.js +1 -1
  3. package/dist/components/render-auth/auth-dialog.script.vue.js.js +8 -2
  4. package/dist/components/render-auto-height-textarea/index.script.vue.js.js +1 -1
  5. package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
  6. package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
  7. package/dist/components/render-auto-refresh/index.vue.css +8 -8
  8. package/dist/components/render-auto-refresh/index.vue.js +1 -1
  9. package/dist/components/render-checkbox/index.vue.css +9 -9
  10. package/dist/components/render-checkbox/index.vue.js +1 -1
  11. package/dist/components/render-choose-tag/index.vue.css +7 -7
  12. package/dist/components/render-choose-tag/index.vue.js +1 -1
  13. package/dist/components/render-collapse/index.vue.css +2 -2
  14. package/dist/components/render-collapse/index.vue.js +1 -1
  15. package/dist/components/render-dataset/components/batch-review-dataset-data/index.script.vue.js.js +24 -6
  16. package/dist/components/render-dataset/components/dataset-data-level/index.script.vue.js.js +1 -1
  17. package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
  18. package/dist/components/render-dataset/components/edit-dataset-data/index.script.vue.js.js +13 -3
  19. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  20. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  21. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  22. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  23. package/dist/components/render-dataset/components/operation-record/table/index.script.vue.js.js +4 -1
  24. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  25. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
  26. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  27. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  28. package/dist/components/render-dataset/components/plus-dataset/dataset-footer.script.vue.js.js +8 -2
  29. package/dist/components/render-dataset/components/plus-dataset/dataset-form.script.vue.js +12 -23
  30. package/dist/components/render-dataset/components/plus-dataset/dataset-form.vue.d.ts +2 -0
  31. package/dist/components/render-dataset/components/plus-dataset/index.script.vue.js.js +7 -1
  32. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
  33. package/dist/components/render-dataset/components/plus-dataset/index.vue.d.ts +2 -0
  34. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  35. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
  36. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
  37. package/dist/components/render-dataset/components/plus-dataset-data/form/file.script.vue.js.js +12 -3
  38. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.script.vue.js.js +8 -2
  39. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  40. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  41. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
  42. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  43. package/dist/components/render-dataset/components/plus-dataset-data/index.script.vue.js.js +4 -1
  44. package/dist/components/render-dataset/components/review-dataset-data/index.script.vue.js.js +21 -5
  45. package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
  46. package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
  47. package/dist/components/render-dataset/index.vue.css +1 -1
  48. package/dist/components/render-dataset/index.vue.js +1 -1
  49. package/dist/components/render-dataset-detail/components/header.script.vue.js.js +5 -1
  50. package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.script.vue.js.js +4 -1
  51. package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +25 -6
  52. package/dist/components/render-dataset-detail-origin-data/index.script.vue.js.js +8 -2
  53. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  54. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  55. package/dist/components/render-dataset-list/components/main.script.vue.js.js +12 -3
  56. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  57. package/dist/components/render-dataset-list/components/main.vue.d.ts +2 -0
  58. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  59. package/dist/components/render-dataset-list/components/table.script.vue.js.js +20 -6
  60. package/dist/components/render-dataset-list/index.script.vue.js.js +8 -2
  61. package/dist/components/render-dataset-list/index.vue.d.ts +2 -0
  62. package/dist/components/render-expand-collapse/index.vue.css +3 -3
  63. package/dist/components/render-expand-collapse/index.vue.js +1 -1
  64. package/dist/components/render-file-card/index.vue.css +11 -11
  65. package/dist/components/render-file-card/index.vue.js +1 -1
  66. package/dist/components/render-file-type-icon/index.vue.css +5 -5
  67. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  68. package/dist/components/render-header/index.vue.css +5 -5
  69. package/dist/components/render-header/index.vue.js +1 -1
  70. package/dist/components/render-router-tab/index.vue.css +3 -3
  71. package/dist/components/render-router-tab/index.vue.js +1 -1
  72. package/dist/hooks/use-form-rule.d.ts +1 -1
  73. package/dist/hooks/use-form-rule.ts.js +101 -0
  74. package/dist/types/agent.d.ts +0 -2
  75. package/dist/types/common.d.ts +1 -1
  76. package/dist/types/enum.d.ts +6 -1
  77. package/dist/types/enum.ts.js +5 -0
  78. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import script from './main.script.vue.js.js';
2
- script.__scopeId = "data-v-nj70xxub";
2
+ script.__scopeId = "data-v-fi21nb7k";
3
3
  script.__file = "./src/components/render-dataset-list/components/main.vue";
4
4
  import './main.vue.css';
5
5
  export default script;
@@ -383,7 +383,10 @@ export default /*@__PURE__*/ _defineComponent({
383
383
  default: _withCtx(()=>_cache[3] || (_cache[3] = [
384
384
  _createTextVNode(" 查看详情 ")
385
385
  ])),
386
- _: 2 /* DYNAMIC */
386
+ _: 2 /* DYNAMIC */ ,
387
+ __: [
388
+ 3
389
+ ]
387
390
  }, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
388
391
  "class",
389
392
  "onMouseenter",
@@ -422,7 +425,10 @@ export default /*@__PURE__*/ _defineComponent({
422
425
  default: _withCtx(()=>_cache[4] || (_cache[4] = [
423
426
  _createTextVNode(" 编辑数据集 ")
424
427
  ])),
425
- _: 2 /* DYNAMIC */
428
+ _: 2 /* DYNAMIC */ ,
429
+ __: [
430
+ 4
431
+ ]
426
432
  }, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
427
433
  "class",
428
434
  "onMouseenter",
@@ -447,7 +453,10 @@ export default /*@__PURE__*/ _defineComponent({
447
453
  default: _withCtx(()=>_cache[5] || (_cache[5] = [
448
454
  _createTextVNode(" 操作记录 ")
449
455
  ])),
450
- _: 2 /* DYNAMIC */
456
+ _: 2 /* DYNAMIC */ ,
457
+ __: [
458
+ 5
459
+ ]
451
460
  }, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
452
461
  "class",
453
462
  "onMouseenter",
@@ -487,9 +496,14 @@ export default /*@__PURE__*/ _defineComponent({
487
496
  ], 2 /* CLASS */ )
488
497
  ]),
489
498
  default: _withCtx(()=>[
490
- _cache[6] || (_cache[6] = _createElementVNode("i", {
491
- class: "ai-ui-sdk-icon ai-ui-sdk-gengduo-2 g-text-16 g-ml-12 g-cursor-pointer"
492
- }, null, -1 /* HOISTED */ ))
499
+ _createElementVNode("i", {
500
+ class: _normalizeClass([
501
+ 'ai-ui-sdk-icon ai-ui-sdk-gengduo-2',
502
+ 'g-text-16 g-p-2 g-ml-12 g-cursor-pointer',
503
+ 'g-hover-bg-light-gray g-hover-round',
504
+ isDatasetManagePermission(row) ? 'g-text-blue' : ''
505
+ ])
506
+ }, null, 2 /* CLASS */ )
493
507
  ]),
494
508
  _: 2 /* DYNAMIC */
495
509
  }, 1536 /* NEED_PATCH, DYNAMIC_SLOTS */ )
@@ -12,7 +12,9 @@ export default /*@__PURE__*/ _defineComponent({
12
12
  reviewDataset: {
13
13
  type: Boolean
14
14
  },
15
- tabId: {}
15
+ tabId: {},
16
+ namePlaceholder: {},
17
+ codePlaceholder: {}
16
18
  },
17
19
  emits: [
18
20
  "success-plus-dataset"
@@ -31,13 +33,17 @@ export default /*@__PURE__*/ _defineComponent({
31
33
  "is-internal": _ctx.isInternal,
32
34
  "review-dataset": _ctx.reviewDataset,
33
35
  "tab-id": _ctx.tabId,
36
+ "name-placeholder": _ctx.namePlaceholder,
37
+ "code-placeholder": _ctx.codePlaceholder,
34
38
  onSuccessPlusDataset: handleSuccessPlusDataset
35
39
  }, null, 8 /* PROPS */ , [
36
40
  "api-prefix",
37
41
  "space-id",
38
42
  "is-internal",
39
43
  "review-dataset",
40
- "tab-id"
44
+ "tab-id",
45
+ "name-placeholder",
46
+ "code-placeholder"
41
47
  ])
42
48
  ], 64 /* STABLE_FRAGMENT */ );
43
49
  };
@@ -6,6 +6,8 @@ interface IProps {
6
6
  isInternal?: boolean;
7
7
  reviewDataset?: boolean;
8
8
  tabId: EnumCharacter;
9
+ namePlaceholder?: string;
10
+ codePlaceholder?: string;
9
11
  }
10
12
  declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
11
13
  "success-plus-dataset": (data: IDataset) => any;
@@ -1,5 +1,5 @@
1
1
 
2
- .expend-collapse-home[data-v-lr5lr77r] {
2
+ .expend-collapse-home[data-v-uy4in21y] {
3
3
  width: 16px;
4
4
  height: 64px;
5
5
  background: #DCDEE5;
@@ -15,9 +15,9 @@
15
15
  cursor: pointer;
16
16
  z-index: 1550;
17
17
  }
18
- .expend-collapse-home[data-v-lr5lr77r]:hover {
18
+ .expend-collapse-home[data-v-uy4in21y]:hover {
19
19
  background: #979BA5;
20
20
  }
21
- .expend-collapse-home.is-close[data-v-lr5lr77r] {
21
+ .expend-collapse-home.is-close[data-v-uy4in21y] {
22
22
  left: 0;
23
23
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-lr5lr77r";
2
+ script.__scopeId = "data-v-uy4in21y";
3
3
  script.__file = "./src/components/render-expand-collapse/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-n965np4x] {
2
+ .upload-file-home[data-v-72ieopve] {
3
3
  position: relative;
4
4
  background: #FFFFFF;
5
5
  border: 1px solid #DCDEE5;
6
6
  border-radius: 4px;
7
7
  padding: 12px 12px 10px 12px;
8
8
  }
9
- .upload-file-home[data-v-n965np4x]:hover {
9
+ .upload-file-home[data-v-72ieopve]:hover {
10
10
  border: 1px solid #3A84FF;
11
11
  }
12
- .upload-file-home:hover .file-icons[data-v-n965np4x] {
12
+ .upload-file-home:hover .file-icons[data-v-72ieopve] {
13
13
  display: flex;
14
14
  }
15
- .upload-file-home .file-icon[data-v-n965np4x] {
15
+ .upload-file-home .file-icon[data-v-72ieopve] {
16
16
  font-size: 32px;
17
17
  }
18
- .upload-file-home .file-content[data-v-n965np4x] {
18
+ .upload-file-home .file-content[data-v-72ieopve] {
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-n965np4x] {
26
+ .upload-file-home .file-content .file-name[data-v-72ieopve] {
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-n965np4x] {
31
+ .upload-file-home .file-content .file-size[data-v-72ieopve] {
32
32
  font-size: 12px;
33
33
  color: #979BA5;
34
34
  line-height: 20px;
35
35
  }
36
- .upload-file-home .file-icons[data-v-n965np4x] {
36
+ .upload-file-home .file-icons[data-v-72ieopve] {
37
37
  display: none;
38
38
  color: #979BA5;
39
39
  }
40
- .upload-file-home .file-icons .bkaidev-icon[data-v-n965np4x] {
40
+ .upload-file-home .file-icons .bkaidev-icon[data-v-72ieopve] {
41
41
  cursor: pointer;
42
42
  margin-right: 15px;
43
43
  font-size: 16px;
44
44
  }
45
- .upload-file-home .file-icons .bkaidev-icon[data-v-n965np4x]:hover {
45
+ .upload-file-home .file-icons .bkaidev-icon[data-v-72ieopve]:hover {
46
46
  color: #3A84FF;
47
47
  }
48
- .upload-file-home .file-icons .bkaidev-delete[data-v-n965np4x] {
48
+ .upload-file-home .file-icons .bkaidev-delete[data-v-72ieopve] {
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-n965np4x";
2
+ script.__scopeId = "data-v-72ieopve";
3
3
  script.__file = "./src/components/render-file-card/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,16 +1,16 @@
1
1
 
2
- .ai-ui-sdk-icon.ai-ui-sdk-pdf[data-v-uu15s2v5] {
2
+ .ai-ui-sdk-icon.ai-ui-sdk-pdf[data-v-pekeqtv5] {
3
3
  color: #EA3636;
4
4
  }
5
- .ai-ui-sdk-icon.ai-ui-sdk-doc-2[data-v-uu15s2v5], .ai-ui-sdk-icon.ai-ui-sdk-ppt-2[data-v-uu15s2v5], .ai-ui-sdk-icon.ai-ui-sdk-markdown[data-v-uu15s2v5] {
5
+ .ai-ui-sdk-icon.ai-ui-sdk-doc-2[data-v-pekeqtv5], .ai-ui-sdk-icon.ai-ui-sdk-ppt-2[data-v-pekeqtv5], .ai-ui-sdk-icon.ai-ui-sdk-markdown[data-v-pekeqtv5] {
6
6
  color: #3A84FF;
7
7
  }
8
- .ai-ui-sdk-icon.ai-ui-sdk-folder-fill[data-v-uu15s2v5] {
8
+ .ai-ui-sdk-icon.ai-ui-sdk-folder-fill[data-v-pekeqtv5] {
9
9
  color: #C4C6CC;
10
10
  }
11
- .ai-ui-sdk-icon.ai-ui-sdk-excel[data-v-uu15s2v5] {
11
+ .ai-ui-sdk-icon.ai-ui-sdk-excel[data-v-pekeqtv5] {
12
12
  color: #2DCB56;
13
13
  }
14
- .ai-ui-sdk-icon.ai-ui-sdk-wangye[data-v-uu15s2v5] {
14
+ .ai-ui-sdk-icon.ai-ui-sdk-wangye[data-v-pekeqtv5] {
15
15
  color: #14A568;
16
16
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-uu15s2v5";
2
+ script.__scopeId = "data-v-pekeqtv5";
3
3
  script.__file = "./src/components/render-file-type-icon/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,5 +1,5 @@
1
1
 
2
- .header-home[data-v-r2bz25rx] {
2
+ .header-home[data-v-c2zthly0] {
3
3
  width: 100%;
4
4
  height: 52px;
5
5
  background: #FFFFFF;
@@ -7,14 +7,14 @@
7
7
  position: relative;
8
8
  z-index: 2;
9
9
  }
10
- .header-title[data-v-r2bz25rx] {
10
+ .header-title[data-v-c2zthly0] {
11
11
  position: absolute;
12
12
  left: 24px;
13
13
  top: 14px;
14
14
  font-size: 16px;
15
15
  color: #313238;
16
16
  }
17
- .header-main[data-v-r2bz25rx] {
17
+ .header-main[data-v-c2zthly0] {
18
18
  display: flex;
19
19
  align-items: center;
20
20
  justify-content: flex-end;
@@ -22,13 +22,13 @@
22
22
  height: 100%;
23
23
  margin: 0 auto;
24
24
  }
25
- .header-select[data-v-r2bz25rx] {
25
+ .header-select[data-v-c2zthly0] {
26
26
  width: 300px;
27
27
  margin-right: 8px;
28
28
  z-index: 9;
29
29
  font-size: 12px;
30
30
  }
31
- .header-input[data-v-r2bz25rx] {
31
+ .header-input[data-v-c2zthly0] {
32
32
  width: 300px;
33
33
  font-size: 12px;
34
34
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-r2bz25rx";
2
+ script.__scopeId = "data-v-c2zthly0";
3
3
  script.__file = "./src/components/render-header/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,12 +1,12 @@
1
1
 
2
- .router-tab[data-v-qusfutql] {
2
+ .router-tab[data-v-8y92od1h] {
3
3
  margin-top: 2px;
4
4
  height: 42px;
5
5
  background: #FFFFFF;
6
6
  box-shadow: 0 2px 4px 0 #1919290d;
7
7
  padding: 0 45px;
8
8
  }
9
- .router-tab a[data-v-qusfutql] {
9
+ .router-tab a[data-v-8y92od1h] {
10
10
  padding: 0 8px;
11
11
  margin-right: 24px;
12
12
  font-size: 14px;
@@ -15,7 +15,7 @@
15
15
  color: #4D4F56;
16
16
  box-sizing: border-box;
17
17
  }
18
- .router-tab a.router-link-exact-active[data-v-qusfutql] {
18
+ .router-tab a.router-link-exact-active[data-v-8y92od1h] {
19
19
  color: #3A84FF;
20
20
  border-bottom: 2px solid #3A84FF;
21
21
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-qusfutql";
2
+ script.__scopeId = "data-v-8y92od1h";
3
3
  script.__file = "./src/components/render-router-tab/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -16,7 +16,7 @@ export declare const useFormRule: (apiPrefix: string, spaceId?: Ref<string>) =>
16
16
  message: () => string;
17
17
  trigger: string;
18
18
  };
19
- getCodeRule: (type: Modules, getIsEdit: () => boolean, getData?: () => Record<string, unknown>) => {
19
+ getCodeRule: (type: Modules, getIsEdit?: () => boolean, getData?: () => Record<string, unknown>) => {
20
20
  validator: (value: string) => Promise<boolean>;
21
21
  message: () => string;
22
22
  trigger: string;
@@ -0,0 +1,101 @@
1
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
2
+ try {
3
+ var info = gen[key](arg);
4
+ var value = info.value;
5
+ } catch (error) {
6
+ reject(error);
7
+ return;
8
+ }
9
+ if (info.done) {
10
+ resolve(value);
11
+ } else {
12
+ Promise.resolve(value).then(_next, _throw);
13
+ }
14
+ }
15
+ function _async_to_generator(fn) {
16
+ return function() {
17
+ var self = this, args = arguments;
18
+ return new Promise(function(resolve, reject) {
19
+ var gen = fn.apply(self, args);
20
+ function _next(value) {
21
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
22
+ }
23
+ function _throw(err) {
24
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
25
+ }
26
+ _next(undefined);
27
+ });
28
+ };
29
+ }
30
+ import { useMetaHttp } from './use-meta-http.ts.js';
31
+ export const useFormRule = (apiPrefix, spaceId)=>{
32
+ const { nameValidator, codeValidator } = useMetaHttp(apiPrefix, spaceId);
33
+ let nameErrorMessage = '';
34
+ let codeErrorMessage = '';
35
+ const codeRule = {
36
+ validator: (value)=>/^[a-zA-Z0-9-]+$/.test(value),
37
+ message: '需要是英文字符、数字、中划线',
38
+ trigger: 'change'
39
+ };
40
+ const getNameRule = (type)=>({
41
+ validator: function() {
42
+ var _ref = _async_to_generator(function*(value) {
43
+ try {
44
+ nameErrorMessage = '';
45
+ const res = yield nameValidator(value, type)();
46
+ return res.data;
47
+ } catch (error) {
48
+ nameErrorMessage = error.message;
49
+ return false;
50
+ }
51
+ });
52
+ return function(value) {
53
+ return _ref.apply(this, arguments);
54
+ };
55
+ }(),
56
+ message: ()=>nameErrorMessage,
57
+ trigger: 'change'
58
+ });
59
+ const getCodeRule = (type, getIsEdit, getData)=>({
60
+ validator: function() {
61
+ var _ref = _async_to_generator(function*(value) {
62
+ try {
63
+ codeErrorMessage = '';
64
+ // 编辑态不校验code
65
+ const isEdit = getIsEdit === null || getIsEdit === void 0 ? void 0 : getIsEdit();
66
+ if (isEdit) {
67
+ return true;
68
+ }
69
+ // 新建态校验code
70
+ const res = yield codeValidator(value, type, getData === null || getData === void 0 ? void 0 : getData())();
71
+ return res.data;
72
+ } catch (error) {
73
+ codeErrorMessage = error.message;
74
+ return false;
75
+ }
76
+ });
77
+ return function(value) {
78
+ return _ref.apply(this, arguments);
79
+ };
80
+ }(),
81
+ message: ()=>codeErrorMessage,
82
+ trigger: 'change'
83
+ });
84
+ const getLengthRule = (label, num)=>({
85
+ validator: (value)=>value.length <= num,
86
+ message: `${label}长度不能超过${num}`,
87
+ trigger: 'change'
88
+ });
89
+ const getApiUrlRule = ()=>({
90
+ validator: (value)=>/https?:\/\//.test(value),
91
+ message: '需要是http://或者https://开头的字符串',
92
+ trigger: 'change'
93
+ });
94
+ return {
95
+ codeRule,
96
+ getApiUrlRule,
97
+ getNameRule,
98
+ getCodeRule,
99
+ getLengthRule
100
+ };
101
+ };
@@ -21,7 +21,6 @@ export interface IAgentCommandApi {
21
21
  content: string | null;
22
22
  agent_id: number;
23
23
  status: string;
24
- selectedText?: string | null;
25
24
  }
26
25
  export interface IAgentInfoApi {
27
26
  conversation_settings?: {
@@ -49,7 +48,6 @@ export interface IAgentCommandComponent {
49
48
  max?: number | null;
50
49
  options?: any;
51
50
  hide?: boolean;
52
- selectedText?: string | null;
53
51
  }
54
52
  export interface IAgentCommand {
55
53
  id: string;
@@ -9,7 +9,7 @@ export interface IPage {
9
9
  page?: number;
10
10
  }
11
11
  export interface ISearchSelectItem {
12
- id: string | number;
12
+ id: string | number | boolean;
13
13
  name: string;
14
14
  async?: boolean;
15
15
  valueType?: string;
@@ -141,8 +141,13 @@ export declare enum Modules {
141
141
  Tool = "tool",
142
142
  Collection = "collection",
143
143
  Agent = "agent",
144
+ AgentCommand = "agent_command",
145
+ AgentCommandComponent = "agent_command_component",
144
146
  LLM = "llm",
145
- Tag = "tag"
147
+ Tag = "tag",
148
+ Mcp = "mcp",
149
+ Default = "default",
150
+ PromptVariables = "prompt_variables"
146
151
  }
147
152
  export declare enum ResourcePermissionAction {
148
153
  AccessModel = "access_model",
@@ -161,8 +161,13 @@ export var Modules;
161
161
  Modules["Tool"] = "tool";
162
162
  Modules["Collection"] = "collection";
163
163
  Modules["Agent"] = "agent";
164
+ Modules["AgentCommand"] = "agent_command";
165
+ Modules["AgentCommandComponent"] = "agent_command_component";
164
166
  Modules["LLM"] = "llm";
165
167
  Modules["Tag"] = "tag";
168
+ Modules["Mcp"] = "mcp";
169
+ Modules["Default"] = "default";
170
+ Modules["PromptVariables"] = "prompt_variables";
166
171
  })(Modules || (Modules = {}));
167
172
  export var ResourcePermissionAction;
168
173
  (function(ResourcePermissionAction) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/ai-ui-sdk",
3
- "version": "0.1.12-beta.53",
3
+ "version": "0.1.12-beta.55",
4
4
  "description": "蓝鲸AI UI SDK",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",