@blueking/ai-ui-sdk 0.1.16-beta.1 → 0.1.17-beta.1

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 (82) 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 → index.script.vue.js} +12 -2
  17. package/dist/components/render-dataset/components/dataset-data-level/index.vue.js +1 -1
  18. package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
  19. package/dist/components/render-dataset/components/edit-dataset-data/index.script.vue.js.js +13 -3
  20. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  21. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  22. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  23. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  24. package/dist/components/render-dataset/components/operation-record/table/index.script.vue.js.js +4 -1
  25. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  26. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
  27. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  28. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  29. package/dist/components/render-dataset/components/plus-dataset/dataset-footer.script.vue.js.js +8 -2
  30. package/dist/components/render-dataset/components/plus-dataset/dataset-form.script.vue.js +12 -23
  31. package/dist/components/render-dataset/components/plus-dataset/dataset-form.vue.d.ts +2 -0
  32. package/dist/components/render-dataset/components/plus-dataset/index.script.vue.js.js +8 -2
  33. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
  34. package/dist/components/render-dataset/components/plus-dataset/index.vue.d.ts +2 -0
  35. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  36. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
  37. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
  38. package/dist/components/render-dataset/components/plus-dataset-data/form/file.script.vue.js.js +12 -3
  39. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.script.vue.js.js +8 -2
  40. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  41. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  42. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
  43. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  44. package/dist/components/render-dataset/components/plus-dataset-data/index.script.vue.js.js +4 -1
  45. package/dist/components/render-dataset/components/review-dataset-data/index.script.vue.js.js +21 -5
  46. package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
  47. package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
  48. package/dist/components/render-dataset/index.vue.css +1 -1
  49. package/dist/components/render-dataset/index.vue.js +1 -1
  50. package/dist/components/render-dataset-detail/components/header.script.vue.js.js +5 -1
  51. package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.script.vue.js.js +4 -1
  52. package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +25 -6
  53. package/dist/components/render-dataset-detail-origin-data/index.script.vue.js.js +8 -2
  54. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  55. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  56. package/dist/components/render-dataset-list/components/main.script.vue.js.js +12 -3
  57. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  58. package/dist/components/render-dataset-list/components/main.vue.d.ts +2 -0
  59. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  60. package/dist/components/render-dataset-list/components/table.script.vue.js.js +20 -6
  61. package/dist/components/render-dataset-list/index.script.vue.js.js +8 -2
  62. package/dist/components/render-dataset-list/index.vue.d.ts +2 -0
  63. package/dist/components/render-expand-collapse/index.vue.css +3 -3
  64. package/dist/components/render-expand-collapse/index.vue.js +1 -1
  65. package/dist/components/render-file-card/index.vue.css +11 -11
  66. package/dist/components/render-file-card/index.vue.js +1 -1
  67. package/dist/components/render-file-type-icon/index.vue.css +5 -5
  68. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  69. package/dist/components/render-header/index.vue.css +5 -5
  70. package/dist/components/render-header/index.vue.js +1 -1
  71. package/dist/components/render-router-tab/index.vue.css +3 -3
  72. package/dist/components/render-router-tab/index.vue.js +1 -1
  73. package/dist/hooks/use-chat.d.ts +30 -0
  74. package/dist/hooks/use-form-rule.d.ts +1 -1
  75. package/dist/hooks/use-form-rule.ts.js +101 -0
  76. package/dist/http/helper/tool.ts.js +3 -1
  77. package/dist/types/agent.d.ts +0 -2
  78. package/dist/types/common.d.ts +1 -1
  79. package/dist/types/enum.d.ts +8 -2
  80. package/dist/types/enum.ts.js +6 -0
  81. package/dist/types/tool.d.ts +2 -0
  82. package/package.json +1 -1
@@ -27,7 +27,9 @@ export default /*@__PURE__*/ _defineComponent({
27
27
  type: Boolean
28
28
  },
29
29
  spaceId: {},
30
- tabId: {}
30
+ tabId: {},
31
+ namePlaceholder: {},
32
+ codePlaceholder: {}
31
33
  },
32
34
  emits: [
33
35
  "success-plus-dataset"
@@ -65,7 +67,10 @@ export default /*@__PURE__*/ _defineComponent({
65
67
  default: _withCtx(()=>_cache[2] || (_cache[2] = [
66
68
  _createTextVNode(" 创建数据集 ")
67
69
  ])),
68
- _: 1 /* STABLE */
70
+ _: 1 /* STABLE */ ,
71
+ __: [
72
+ 2
73
+ ]
69
74
  })
70
75
  ]),
71
76
  _createVNode(RenderSearchDataset, {
@@ -104,12 +109,16 @@ export default /*@__PURE__*/ _defineComponent({
104
109
  "api-prefix": _ctx.apiPrefix,
105
110
  "space-id": _ctx.spaceId,
106
111
  "is-internal": _ctx.isInternal,
112
+ "name-placeholder": _ctx.namePlaceholder,
113
+ "code-placeholder": _ctx.codePlaceholder,
107
114
  onSuccessPlus: handleSuccessPlusDataset
108
115
  }, null, 8 /* PROPS */ , [
109
116
  "modelValue",
110
117
  "api-prefix",
111
118
  "space-id",
112
- "is-internal"
119
+ "is-internal",
120
+ "name-placeholder",
121
+ "code-placeholder"
113
122
  ])
114
123
  ]);
115
124
  };
@@ -1,15 +1,15 @@
1
1
 
2
- .main-content[data-v-nj70xxub] {
2
+ .main-content[data-v-za32xkfb] {
3
3
  padding: 20px 24px;
4
4
  height: calc(100% - 52px);
5
5
  }
6
- .main-panel[data-v-nj70xxub] {
6
+ .main-panel[data-v-za32xkfb] {
7
7
  height: 100%;
8
8
  padding: 20px 24px 0;
9
9
  background: #ffffff;
10
10
  box-shadow: 0 2px 4px 0 #1919290d;
11
11
  border-radius: 2px;
12
12
  }
13
- .main-search[data-v-nj70xxub] {
13
+ .main-search[data-v-za32xkfb] {
14
14
  width: 6.17rem;
15
15
  }
@@ -6,6 +6,8 @@ interface IProps {
6
6
  reviewDataset?: boolean;
7
7
  spaceId?: string;
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
  import script from './main.script.vue.js.js';
2
- script.__scopeId = "data-v-nj70xxub";
2
+ script.__scopeId = "data-v-za32xkfb";
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-fks7j1ri] {
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-fks7j1ri]:hover {
19
19
  background: #979BA5;
20
20
  }
21
- .expend-collapse-home.is-close[data-v-lr5lr77r] {
21
+ .expend-collapse-home.is-close[data-v-fks7j1ri] {
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-fks7j1ri";
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-lx807u11] {
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-lx807u11]: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-lx807u11] {
13
13
  display: flex;
14
14
  }
15
- .upload-file-home .file-icon[data-v-n965np4x] {
15
+ .upload-file-home .file-icon[data-v-lx807u11] {
16
16
  font-size: 32px;
17
17
  }
18
- .upload-file-home .file-content[data-v-n965np4x] {
18
+ .upload-file-home .file-content[data-v-lx807u11] {
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-lx807u11] {
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-lx807u11] {
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-lx807u11] {
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-lx807u11] {
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-lx807u11]: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-lx807u11] {
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-lx807u11";
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-jj1s8hn1] {
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-jj1s8hn1], .ai-ui-sdk-icon.ai-ui-sdk-ppt-2[data-v-jj1s8hn1], .ai-ui-sdk-icon.ai-ui-sdk-markdown[data-v-jj1s8hn1] {
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-jj1s8hn1] {
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-jj1s8hn1] {
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-jj1s8hn1] {
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-jj1s8hn1";
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-3bl4nnu1] {
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-3bl4nnu1] {
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-3bl4nnu1] {
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-3bl4nnu1] {
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-3bl4nnu1] {
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-3bl4nnu1";
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-pyrbp9hg] {
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-pyrbp9hg] {
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-pyrbp9hg] {
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-pyrbp9hg";
3
3
  script.__file = "./src/components/render-router-tab/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -73,6 +73,21 @@ export declare const useChat: ({ handleStart, handleText, handleReferenceDoc, ha
73
73
  }[];
74
74
  };
75
75
  }[];
76
+ path?: {
77
+ name: string;
78
+ required: boolean;
79
+ type: import("../types/enum").ApiValueType;
80
+ default: string | number | boolean;
81
+ description: string;
82
+ validate: {
83
+ enable: boolean;
84
+ rules: {
85
+ func: string;
86
+ message: string;
87
+ value: string;
88
+ }[];
89
+ };
90
+ }[];
76
91
  creator: string;
77
92
  createTime: string;
78
93
  updateTime: string;
@@ -509,6 +524,21 @@ export declare const useChat: ({ handleStart, handleText, handleReferenceDoc, ha
509
524
  }[];
510
525
  };
511
526
  }[];
527
+ path?: {
528
+ name: string;
529
+ required: boolean;
530
+ type: import("../types/enum").ApiValueType;
531
+ default: string | number | boolean;
532
+ description: string;
533
+ validate: {
534
+ enable: boolean;
535
+ rules: {
536
+ func: string;
537
+ message: string;
538
+ value: string;
539
+ }[];
540
+ };
541
+ }[];
512
542
  creator: string;
513
543
  createTime: string;
514
544
  updateTime: string;
@@ -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
+ };
@@ -7,6 +7,7 @@ import { transferResourcePermission } from './permission.ts.js';
7
7
  header: data.property.header,
8
8
  query: data.property.query,
9
9
  body: data.property.body,
10
+ path: data.property.path,
10
11
  creator: data.created_by,
11
12
  createTime: data.created_at,
12
13
  updateTime: data.updated_at,
@@ -48,6 +49,7 @@ import { transferResourcePermission } from './permission.ts.js';
48
49
  property: {
49
50
  header: data.header,
50
51
  query: data.query,
51
- body: data.body
52
+ body: data.body,
53
+ path: data.path
52
54
  }
53
55
  });
@@ -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;
@@ -81,7 +81,8 @@ export declare enum FileStatus {
81
81
  }
82
82
  export declare enum ResourceStatus {
83
83
  Deleted = "deleted",
84
- NoPermission = "no_permission"
84
+ NoPermission = "no_permission",
85
+ PermissionPending = "permission-pending"
85
86
  }
86
87
  export declare enum KnowledgePathType {
87
88
  File = "file",
@@ -141,8 +142,13 @@ export declare enum Modules {
141
142
  Tool = "tool",
142
143
  Collection = "collection",
143
144
  Agent = "agent",
145
+ AgentCommand = "agent_command",
146
+ AgentCommandComponent = "agent_command_component",
144
147
  LLM = "llm",
145
- Tag = "tag"
148
+ Tag = "tag",
149
+ Mcp = "mcp",
150
+ Default = "default",
151
+ PromptVariables = "prompt_variables"
146
152
  }
147
153
  export declare enum ResourcePermissionAction {
148
154
  AccessModel = "access_model",
@@ -91,6 +91,7 @@ export var ResourceStatus;
91
91
  (function(ResourceStatus) {
92
92
  ResourceStatus["Deleted"] = "deleted";
93
93
  ResourceStatus["NoPermission"] = "no_permission";
94
+ ResourceStatus["PermissionPending"] = "permission-pending";
94
95
  })(ResourceStatus || (ResourceStatus = {}));
95
96
  export var KnowledgePathType;
96
97
  (function(KnowledgePathType) {
@@ -161,8 +162,13 @@ export var Modules;
161
162
  Modules["Tool"] = "tool";
162
163
  Modules["Collection"] = "collection";
163
164
  Modules["Agent"] = "agent";
165
+ Modules["AgentCommand"] = "agent_command";
166
+ Modules["AgentCommandComponent"] = "agent_command_component";
164
167
  Modules["LLM"] = "llm";
165
168
  Modules["Tag"] = "tag";
169
+ Modules["Mcp"] = "mcp";
170
+ Modules["Default"] = "default";
171
+ Modules["PromptVariables"] = "prompt_variables";
166
172
  })(Modules || (Modules = {}));
167
173
  export var ResourcePermissionAction;
168
174
  (function(ResourcePermissionAction) {
@@ -21,6 +21,7 @@ export interface IToolApi {
21
21
  header: IToolParam[];
22
22
  query?: IToolParam[];
23
23
  body?: IToolParam[];
24
+ path?: IToolParam[];
24
25
  };
25
26
  space_id?: string;
26
27
  created_by: string;
@@ -45,6 +46,7 @@ export interface ITool {
45
46
  header: IToolParam[];
46
47
  query?: IToolParam[];
47
48
  body?: IToolParam[];
49
+ path?: IToolParam[];
48
50
  creator: string;
49
51
  createTime: string;
50
52
  updateTime: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/ai-ui-sdk",
3
- "version": "0.1.16-beta.1",
3
+ "version": "0.1.17-beta.1",
4
4
  "description": "蓝鲸AI UI SDK",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",