@blueking/ai-ui-sdk 0.1.7 → 0.1.9-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 (61) 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-auto-height-textarea/index.vue.css +11 -11
  4. package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
  5. package/dist/components/render-choose-tag/index.script.vue.js.js +14 -204
  6. package/dist/components/render-choose-tag/index.vue.css +8 -8
  7. package/dist/components/render-choose-tag/index.vue.d.ts +3 -3
  8. package/dist/components/render-choose-tag/index.vue.js +1 -1
  9. package/dist/components/render-collapse/index.vue.css +2 -2
  10. package/dist/components/render-collapse/index.vue.js +1 -1
  11. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  12. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  13. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  14. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  15. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  16. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
  17. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  18. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  19. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
  20. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  21. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  22. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  23. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
  24. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  25. package/dist/components/render-dataset/index.vue.css +1 -1
  26. package/dist/components/render-dataset/index.vue.js +1 -1
  27. package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.css +1 -1
  28. package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.js +1 -1
  29. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  30. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  31. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  32. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  33. package/dist/components/render-expand-collapse/index.vue.css +3 -3
  34. package/dist/components/render-expand-collapse/index.vue.js +1 -1
  35. package/dist/components/render-file-card/index.vue.css +11 -11
  36. package/dist/components/render-file-card/index.vue.js +1 -1
  37. package/dist/components/render-file-type-icon/index.vue.css +5 -5
  38. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  39. package/dist/components/render-header/index.script.vue.js.js +17 -33
  40. package/dist/components/render-header/index.vue.css +5 -5
  41. package/dist/components/render-header/index.vue.d.ts +15 -10
  42. package/dist/components/render-header/index.vue.js +1 -1
  43. package/dist/components/render-router-tab/index.vue.css +3 -3
  44. package/dist/components/render-router-tab/index.vue.js +1 -1
  45. package/dist/hooks/use-meta-http.d.ts +3 -3
  46. package/dist/hooks/use-meta-http.ts.js +6 -5
  47. package/dist/http/helper/meta.d.ts +2 -0
  48. package/dist/http/helper/meta.ts.js +7 -0
  49. package/dist/http/helper/model.d.ts +2 -0
  50. package/dist/http/helper/model.ts.js +15 -0
  51. package/dist/transforms.d.ts +1 -0
  52. package/dist/transforms.ts.js +1 -0
  53. package/dist/types/dataset.d.ts +2 -2
  54. package/dist/types/meta.d.ts +5 -0
  55. package/dist/types/model.d.ts +17 -0
  56. package/dist/types/model.ts.js +1 -0
  57. package/dist/types.d.ts +1 -0
  58. package/dist/types.ts.js +1 -0
  59. package/package.json +1 -1
  60. package/dist/hooks/use-form-rule.ts.js +0 -101
  61. package/dist/types/tag.d.ts +0 -7
@@ -1,15 +1,15 @@
1
1
 
2
- .origin-data-content[data-v-m9nmyhys] {
2
+ .origin-data-content[data-v-n52p63v2] {
3
3
  padding: 24px;
4
4
  height: calc(100% - 52px - 44px);
5
5
  }
6
- .origin-data-panel[data-v-m9nmyhys] {
6
+ .origin-data-panel[data-v-n52p63v2] {
7
7
  height: 100%;
8
8
  padding: 20px;
9
9
  background: #ffffff;
10
10
  box-shadow: 0 2px 4px 0 #1919290d;
11
11
  border-radius: 2px;
12
12
  }
13
- .origin-data-panel .toolbar-search[data-v-m9nmyhys] {
13
+ .origin-data-panel .toolbar-search[data-v-n52p63v2] {
14
14
  width: 6.17rem;
15
15
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-m9nmyhys";
2
+ script.__scopeId = "data-v-n52p63v2";
3
3
  script.__file = "./src/components/render-dataset-detail-origin-data/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,15 +1,15 @@
1
1
 
2
- .main-content[data-v-1nup2jyd] {
2
+ .main-content[data-v-qsgihx0v] {
3
3
  padding: 20px 24px;
4
4
  height: calc(100% - 52px);
5
5
  }
6
- .main-panel[data-v-1nup2jyd] {
6
+ .main-panel[data-v-qsgihx0v] {
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-1nup2jyd] {
13
+ .main-search[data-v-qsgihx0v] {
14
14
  width: 6.17rem;
15
15
  }
@@ -1,5 +1,5 @@
1
1
  import script from './main.script.vue.js.js';
2
- script.__scopeId = "data-v-1nup2jyd";
2
+ script.__scopeId = "data-v-qsgihx0v";
3
3
  script.__file = "./src/components/render-dataset-list/components/main.vue";
4
4
  import './main.vue.css';
5
5
  export default script;
@@ -1,5 +1,5 @@
1
1
 
2
- .expend-collapse-home[data-v-sj8q41z6] {
2
+ .expend-collapse-home[data-v-s21uv18w] {
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-sj8q41z6]:hover {
18
+ .expend-collapse-home[data-v-s21uv18w]:hover {
19
19
  background: #979BA5;
20
20
  }
21
- .expend-collapse-home.is-close[data-v-sj8q41z6] {
21
+ .expend-collapse-home.is-close[data-v-s21uv18w] {
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-sj8q41z6";
2
+ script.__scopeId = "data-v-s21uv18w";
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-ebakpul1] {
2
+ .upload-file-home[data-v-eallzmbh] {
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-ebakpul1]:hover {
9
+ .upload-file-home[data-v-eallzmbh]:hover {
10
10
  border: 1px solid #3A84FF;
11
11
  }
12
- .upload-file-home:hover .file-icons[data-v-ebakpul1] {
12
+ .upload-file-home:hover .file-icons[data-v-eallzmbh] {
13
13
  display: flex;
14
14
  }
15
- .upload-file-home .file-icon[data-v-ebakpul1] {
15
+ .upload-file-home .file-icon[data-v-eallzmbh] {
16
16
  font-size: 32px;
17
17
  }
18
- .upload-file-home .file-content[data-v-ebakpul1] {
18
+ .upload-file-home .file-content[data-v-eallzmbh] {
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-ebakpul1] {
26
+ .upload-file-home .file-content .file-name[data-v-eallzmbh] {
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-ebakpul1] {
31
+ .upload-file-home .file-content .file-size[data-v-eallzmbh] {
32
32
  font-size: 12px;
33
33
  color: #979BA5;
34
34
  line-height: 20px;
35
35
  }
36
- .upload-file-home .file-icons[data-v-ebakpul1] {
36
+ .upload-file-home .file-icons[data-v-eallzmbh] {
37
37
  display: none;
38
38
  color: #979BA5;
39
39
  }
40
- .upload-file-home .file-icons .bkaidev-icon[data-v-ebakpul1] {
40
+ .upload-file-home .file-icons .bkaidev-icon[data-v-eallzmbh] {
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-ebakpul1]:hover {
45
+ .upload-file-home .file-icons .bkaidev-icon[data-v-eallzmbh]:hover {
46
46
  color: #3A84FF;
47
47
  }
48
- .upload-file-home .file-icons .bkaidev-delete[data-v-ebakpul1] {
48
+ .upload-file-home .file-icons .bkaidev-delete[data-v-eallzmbh] {
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-ebakpul1";
2
+ script.__scopeId = "data-v-eallzmbh";
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-g34tiw1p] {
2
+ .ai-ui-sdk-icon.ai-ui-sdk-pdf[data-v-452nrtv0] {
3
3
  color: #EA3636;
4
4
  }
5
- .ai-ui-sdk-icon.ai-ui-sdk-doc-2[data-v-g34tiw1p], .ai-ui-sdk-icon.ai-ui-sdk-ppt-2[data-v-g34tiw1p], .ai-ui-sdk-icon.ai-ui-sdk-markdown[data-v-g34tiw1p] {
5
+ .ai-ui-sdk-icon.ai-ui-sdk-doc-2[data-v-452nrtv0], .ai-ui-sdk-icon.ai-ui-sdk-ppt-2[data-v-452nrtv0], .ai-ui-sdk-icon.ai-ui-sdk-markdown[data-v-452nrtv0] {
6
6
  color: #3A84FF;
7
7
  }
8
- .ai-ui-sdk-icon.ai-ui-sdk-folder-fill[data-v-g34tiw1p] {
8
+ .ai-ui-sdk-icon.ai-ui-sdk-folder-fill[data-v-452nrtv0] {
9
9
  color: #C4C6CC;
10
10
  }
11
- .ai-ui-sdk-icon.ai-ui-sdk-excel[data-v-g34tiw1p] {
11
+ .ai-ui-sdk-icon.ai-ui-sdk-excel[data-v-452nrtv0] {
12
12
  color: #2DCB56;
13
13
  }
14
- .ai-ui-sdk-icon.ai-ui-sdk-wangye[data-v-g34tiw1p] {
14
+ .ai-ui-sdk-icon.ai-ui-sdk-wangye[data-v-452nrtv0] {
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-g34tiw1p";
2
+ script.__scopeId = "data-v-452nrtv0";
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
  import { defineComponent as _defineComponent } from 'vue';
2
- import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createBlock as _createBlock, withCtx as _withCtx, createCommentVNode as _createCommentVNode } from "vue";
2
+ import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock } from "vue";
3
3
  const _hoisted_1 = {
4
4
  class: "header-home"
5
5
  };
@@ -13,9 +13,12 @@ const _hoisted_3 = {
13
13
  export default /*@__PURE__*/ _defineComponent({
14
14
  props: {
15
15
  title: String,
16
- tags: Array,
17
- tagNames: Array,
16
+ tagName: String,
18
17
  search: String,
18
+ showTag: {
19
+ type: Boolean,
20
+ default: false
21
+ },
19
22
  showSearch: {
20
23
  type: Boolean,
21
24
  default: true
@@ -26,21 +29,18 @@ export default /*@__PURE__*/ _defineComponent({
26
29
  }
27
30
  },
28
31
  emits: [
29
- 'update:tagNames',
32
+ 'update:tagName',
30
33
  'update:search'
31
34
  ],
32
35
  setup (__props, { emit: __emit }) {
33
36
  const emit = __emit;
34
37
  const handleTagChange = (val)=>{
35
- emit('update:tagNames', val);
38
+ emit('update:tagName', val);
36
39
  };
37
40
  const handleSearchChange = (val)=>{
38
41
  emit('update:search', val);
39
42
  };
40
43
  return (_ctx, _cache)=>{
41
- var __props_tags;
42
- const _component_bk_option = _resolveComponent("bk-option");
43
- const _component_bk_select = _resolveComponent("bk-select");
44
44
  const _component_bk_input = _resolveComponent("bk-input");
45
45
  return _openBlock(), _createElementBlock("section", _hoisted_1, [
46
46
  _renderSlot(_ctx.$slots, "title", {}, ()=>[
@@ -48,32 +48,16 @@ export default /*@__PURE__*/ _defineComponent({
48
48
  ], true),
49
49
  !__props.isCodeReviewHistory ? (_openBlock(), _createElementBlock("section", _hoisted_3, [
50
50
  _renderSlot(_ctx.$slots, "search", {}, undefined, true),
51
- ((__props_tags = __props.tags) === null || __props_tags === void 0 ? void 0 : __props_tags.length) ? (_openBlock(), _createBlock(_component_bk_select, {
51
+ __props.showTag ? (_openBlock(), _createBlock(_component_bk_input, {
52
52
  key: 0,
53
- multiple: "",
54
- filterable: "",
55
- "collapse-tags": "",
56
- placeholder: "标签",
57
- "multiple-mode": "tag",
58
- class: "header-select",
59
- "input-search": false,
60
- "model-value": __props.tagNames,
61
- onChange: handleTagChange
62
- }, {
63
- default: _withCtx(()=>[
64
- (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(__props.tags, (tag, index)=>{
65
- return _openBlock(), _createBlock(_component_bk_option, {
66
- id: tag.name,
67
- name: tag.name,
68
- key: index
69
- }, null, 8 /* PROPS */ , [
70
- "id",
71
- "name"
72
- ]);
73
- }), 128 /* KEYED_FRAGMENT */ ))
74
- ]),
75
- _: 1 /* STABLE */
76
- }, 8 /* PROPS */ , [
53
+ class: "header-input",
54
+ type: "search",
55
+ placeholder: "请输入标签",
56
+ clearable: true,
57
+ "model-value": __props.tagName,
58
+ onChange: handleTagChange,
59
+ onInput: handleTagChange
60
+ }, null, 8 /* PROPS */ , [
77
61
  "model-value"
78
62
  ])) : _createCommentVNode("v-if", true),
79
63
  __props.showSearch ? (_openBlock(), _createBlock(_component_bk_input, {
@@ -1,5 +1,5 @@
1
1
 
2
- .header-home[data-v-i91x800g] {
2
+ .header-home[data-v-n7q2d5uk] {
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-i91x800g] {
10
+ .header-title[data-v-n7q2d5uk] {
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-i91x800g] {
17
+ .header-main[data-v-n7q2d5uk] {
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-i91x800g] {
25
+ .header-select[data-v-n7q2d5uk] {
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-i91x800g] {
31
+ .header-input[data-v-n7q2d5uk] {
32
32
  width: 300px;
33
33
  font-size: 12px;
34
34
  }
@@ -1,18 +1,19 @@
1
- import { PropType } from 'vue';
2
- import type { ITag } from '@/types/tag';
3
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_26: {};
1
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_23: {};
4
2
  type __VLS_Slots = {} & {
5
3
  title?: (props: typeof __VLS_1) => any;
6
4
  } & {
7
5
  search?: (props: typeof __VLS_3) => any;
8
6
  } & {
9
- default?: (props: typeof __VLS_26) => any;
7
+ default?: (props: typeof __VLS_23) => any;
10
8
  };
11
9
  declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
12
10
  title: StringConstructor;
13
- tags: PropType<ITag[]>;
14
- tagNames: PropType<string[]>;
11
+ tagName: StringConstructor;
15
12
  search: StringConstructor;
13
+ showTag: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
16
17
  showSearch: {
17
18
  type: BooleanConstructor;
18
19
  default: boolean;
@@ -22,13 +23,16 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
22
23
  default: boolean;
23
24
  };
24
25
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
- "update:tagNames": (...args: any[]) => void;
26
+ "update:tagName": (...args: any[]) => void;
26
27
  "update:search": (...args: any[]) => void;
27
28
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
28
29
  title: StringConstructor;
29
- tags: PropType<ITag[]>;
30
- tagNames: PropType<string[]>;
30
+ tagName: StringConstructor;
31
31
  search: StringConstructor;
32
+ showTag: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
32
36
  showSearch: {
33
37
  type: BooleanConstructor;
34
38
  default: boolean;
@@ -38,9 +42,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
38
42
  default: boolean;
39
43
  };
40
44
  }>> & Readonly<{
41
- "onUpdate:tagNames"?: (...args: any[]) => any;
45
+ "onUpdate:tagName"?: (...args: any[]) => any;
42
46
  "onUpdate:search"?: (...args: any[]) => any;
43
47
  }>, {
48
+ showTag: boolean;
44
49
  showSearch: boolean;
45
50
  isCodeReviewHistory: boolean;
46
51
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-i91x800g";
2
+ script.__scopeId = "data-v-n7q2d5uk";
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-h87dqd24] {
2
+ .router-tab[data-v-m7824c5r] {
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-h87dqd24] {
9
+ .router-tab a[data-v-m7824c5r] {
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-h87dqd24] {
18
+ .router-tab a.router-link-exact-active[data-v-m7824c5r] {
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-h87dqd24";
2
+ script.__scopeId = "data-v-m7824c5r";
3
3
  script.__file = "./src/components/render-router-tab/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -10,7 +10,7 @@ export declare const useMetaHttp: (apiPrefix: string, spaceId?: Ref<string>) =>
10
10
  data: boolean;
11
11
  message: string;
12
12
  }>;
13
- getTags: () => Promise<string[]>;
14
- plusTag: (tagName: string) => Promise<ITagApi>;
15
- checkTag: (tagName: string) => Promise<boolean>;
13
+ getTags: () => Promise<import("@/types/meta").ITag[]>;
14
+ plusTag: (tagNames: string[][]) => Promise<ITagApi>;
15
+ checkTag: (tagNames: string[][]) => Promise<boolean>;
16
16
  };
@@ -27,6 +27,7 @@ function _object_spread(target) {
27
27
  return target;
28
28
  }
29
29
  import fetch from '../http/fetch/index.ts.js';
30
+ import { transferTagApi2Tag } from '../http/helper/meta.ts.js';
30
31
  const metaPerfix = 'meta/v1';
31
32
  export const useMetaHttp = (apiPrefix, spaceId)=>{
32
33
  // 名称校验
@@ -54,10 +55,10 @@ export const useMetaHttp = (apiPrefix, spaceId)=>{
54
55
  headers: {
55
56
  'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
56
57
  }
57
- }).then((result)=>result.map((item)=>item.tag_name));
58
+ }).then((result)=>result.map(transferTagApi2Tag));
58
59
  // 新增 tag
59
- const plusTag = (tagName)=>fetch.post(`${apiPrefix}/${metaPerfix}/tag/`, {
60
- tag_name: tagName
60
+ const plusTag = (tagNames)=>fetch.post(`${apiPrefix}/${metaPerfix}/tag/`, {
61
+ tag_names: tagNames
61
62
  }, {
62
63
  globalError: false,
63
64
  headers: {
@@ -65,8 +66,8 @@ export const useMetaHttp = (apiPrefix, spaceId)=>{
65
66
  }
66
67
  });
67
68
  // check tag
68
- const checkTag = (tagName)=>fetch.get(`${apiPrefix}/${metaPerfix}/tag/check/`, {
69
- tag_name: tagName
69
+ const checkTag = (tagNames)=>fetch.get(`${apiPrefix}/${metaPerfix}/tag/check/`, {
70
+ tag_names: tagNames
70
71
  }, {
71
72
  globalError: false,
72
73
  headers: {
@@ -0,0 +1,2 @@
1
+ import type { ITag, ITagApi } from '@/types/meta';
2
+ export declare const transferTagApi2Tag: (data: ITagApi) => ITag;
@@ -0,0 +1,7 @@
1
+ export const transferTagApi2Tag = (data)=>{
2
+ var _data_children;
3
+ return {
4
+ tagName: data.tag_name,
5
+ children: (_data_children = data.children) === null || _data_children === void 0 ? void 0 : _data_children.map(transferTagApi2Tag)
6
+ };
7
+ };
@@ -0,0 +1,2 @@
1
+ import type { IModel, IModelApi } from '@/types/model';
2
+ export declare const transferModelApi2Model: (data: IModelApi) => IModel;
@@ -0,0 +1,15 @@
1
+ export const transferModelApi2Model = (data)=>({
2
+ llmCode: data.llm_code,
3
+ llmName: data.llm_name,
4
+ llmType: data.llm_type,
5
+ property: {
6
+ onlyUserAssistant: data.property.only_user_assistant,
7
+ supportTools: data.property.support_tools,
8
+ supportWindow: data.property.support_window,
9
+ supportVision: data.property.support_vision,
10
+ supportThinking: data.property.support_thinking,
11
+ supportThinkingQuick: data.property.support_thinking_quick,
12
+ default: data.property.default,
13
+ isSelfHost: data.property.is_self_host
14
+ }
15
+ });
@@ -2,3 +2,4 @@ export * from './http/helper/session';
2
2
  export * from './http/helper/knowledge';
3
3
  export * from './http/helper/permission';
4
4
  export * from './http/helper/tool';
5
+ export * from './http/helper/model';
@@ -2,3 +2,4 @@ export * from './http/helper/session.ts.js';
2
2
  export * from './http/helper/knowledge.ts.js';
3
3
  export * from './http/helper/permission.ts.js';
4
4
  export * from './http/helper/tool.ts.js';
5
+ export * from './http/helper/model.ts.js';
@@ -8,7 +8,7 @@ export interface IDatasetInfo {
8
8
  }
9
9
  export interface IDatasetFormApi {
10
10
  component_ids: number[];
11
- tag_names: string[];
11
+ tag_names: string[][];
12
12
  company_id: string;
13
13
  dataset_code: string;
14
14
  dataset_name: string;
@@ -17,7 +17,7 @@ export interface IDatasetFormApi {
17
17
  }
18
18
  export interface IDatasetForm {
19
19
  componentIds: number[];
20
- tagNames: string[];
20
+ tagNames: string[][];
21
21
  companyId?: string;
22
22
  datasetName: string;
23
23
  datasetCode: string;
@@ -1,3 +1,8 @@
1
1
  export interface ITagApi {
2
2
  tag_name: string;
3
+ children?: ITagApi[];
4
+ }
5
+ export interface ITag {
6
+ tagName: string;
7
+ children?: ITag[];
3
8
  }
@@ -8,7 +8,24 @@ export interface IModel {
8
8
  supportTools?: boolean;
9
9
  supportWindow?: boolean;
10
10
  supportVision?: boolean;
11
+ supportThinking?: boolean;
12
+ supportThinkingQuick?: boolean;
11
13
  default?: boolean;
12
14
  isSelfHost?: boolean;
13
15
  };
14
16
  }
17
+ export interface IModelApi {
18
+ llm_code: string;
19
+ llm_name: string;
20
+ llm_type: LLMSupport;
21
+ property: {
22
+ only_user_assistant?: boolean;
23
+ support_tools?: boolean;
24
+ support_window?: boolean;
25
+ support_vision?: boolean;
26
+ support_thinking?: boolean;
27
+ support_thinking_quick?: boolean;
28
+ default?: boolean;
29
+ is_self_host?: boolean;
30
+ };
31
+ }
@@ -0,0 +1 @@
1
+ export { };
package/dist/types.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './types/knowledge';
4
4
  export * from './types/permission';
5
5
  export * from './types/tool';
6
6
  export * from './types/dataset';
7
+ export * from './types/model';
package/dist/types.ts.js CHANGED
@@ -4,3 +4,4 @@ export * from './types/knowledge.ts.js';
4
4
  export * from './types/permission.ts.js';
5
5
  export * from './types/tool.ts.js';
6
6
  export * from './types/dataset.ts.js';
7
+ export * from './types/model.ts.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/ai-ui-sdk",
3
- "version": "0.1.7",
3
+ "version": "0.1.9-beta.1",
4
4
  "description": "蓝鲸AI UI SDK",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",