@blueking/ai-ui-sdk 0.3.0-beta.23 → 0.3.0-beta.24

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 (130) hide show
  1. package/dist/components/render-agent/agent-type.vue.css +3 -3
  2. package/dist/components/render-agent/agent-type.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-auto-refresh/index.vue.css +8 -8
  6. package/dist/components/render-auto-refresh/index.vue.js +1 -1
  7. package/dist/components/render-card/agent/prefix-info-tool.vue.css +5 -5
  8. package/dist/components/render-card/agent/prefix-info-tool.vue.js +1 -1
  9. package/dist/components/render-card/base/approval-strategy-popover.script.vue.js.js +198 -0
  10. package/dist/components/render-card/base/approval-strategy-popover.vue.d.ts +19 -0
  11. package/dist/components/render-card/base/approval-strategy-popover.vue.js +3 -0
  12. package/dist/components/render-card/base.vue.css +12 -12
  13. package/dist/components/render-card/base.vue.js +1 -1
  14. package/dist/components/render-card/llm/corner-badge.vue.css +3 -3
  15. package/dist/components/render-card/llm/corner-badge.vue.js +1 -1
  16. package/dist/components/render-card/llm/icons.vue.css +2 -2
  17. package/dist/components/render-card/llm/icons.vue.js +1 -1
  18. package/dist/components/render-card/llm/info.vue.css +1 -1
  19. package/dist/components/render-card/llm/info.vue.js +1 -1
  20. package/dist/components/render-card/llm/tag-prefix.vue.css +3 -3
  21. package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
  22. package/dist/components/render-card/mcp/index.script.vue.js.js +24 -3
  23. package/dist/components/render-card/mcp/index.vue.d.ts +5 -2
  24. package/dist/components/render-card/mcp/name-suffix.vue.css +2 -2
  25. package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
  26. package/dist/components/render-card/mcp/selected-tools-info.script.vue.js.js +156 -0
  27. package/dist/components/render-card/mcp/selected-tools-info.vue.d.ts +26 -0
  28. package/dist/components/render-card/mcp/selected-tools-info.vue.js +3 -0
  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/tag-prefix.vue.css +3 -3
  32. package/dist/components/render-card/skill/tag-prefix.vue.js +1 -1
  33. package/dist/components/render-card/tool/index.script.vue.js.js +12 -4
  34. package/dist/components/render-card/tool/index.vue.d.ts +4 -1
  35. package/dist/components/render-card/tool/prefix-info-tool.script.vue.js.js +70 -20
  36. package/dist/components/render-card/tool/prefix-info-tool.vue.d.ts +4 -0
  37. package/dist/components/render-checkbox/index.vue.css +9 -9
  38. package/dist/components/render-checkbox/index.vue.js +1 -1
  39. package/dist/components/render-choose-tag/index.vue.css +7 -7
  40. package/dist/components/render-choose-tag/index.vue.js +1 -1
  41. package/dist/components/render-collapse/index.vue.css +2 -2
  42. package/dist/components/render-collapse/index.vue.js +1 -1
  43. package/dist/components/render-collection/content/index.vue.css +4 -4
  44. package/dist/components/render-collection/content/index.vue.js +1 -1
  45. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +3 -3
  46. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +1 -1
  47. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.css +1 -1
  48. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.js +1 -1
  49. package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
  50. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.css +1 -1
  51. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.js +1 -1
  52. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  53. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  54. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  55. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  56. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  57. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
  58. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  59. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  60. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
  61. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  62. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
  63. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
  64. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  65. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  66. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
  67. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  68. package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
  69. package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
  70. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  71. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  72. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  73. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  74. package/dist/components/render-dataset-list/index.vue.css +2 -2
  75. package/dist/components/render-dataset-list/index.vue.js +1 -1
  76. package/dist/components/render-dialog/choose-resource.vue.css +3 -3
  77. package/dist/components/render-dialog/choose-resource.vue.js +1 -1
  78. package/dist/components/render-dialog/choose-result.vue.css +14 -14
  79. package/dist/components/render-dialog/choose-result.vue.js +1 -1
  80. package/dist/components/render-dialog/choose-space.vue.css +9 -9
  81. package/dist/components/render-dialog/choose-space.vue.js +1 -1
  82. package/dist/components/render-dialog/index.vue.css +6 -6
  83. package/dist/components/render-dialog/index.vue.js +1 -1
  84. package/dist/components/render-file-card/index.vue.css +11 -11
  85. package/dist/components/render-file-card/index.vue.js +1 -1
  86. package/dist/components/render-file-type-icon/index.vue.css +6 -6
  87. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  88. package/dist/components/render-generate-tag/index.vue.css +5 -5
  89. package/dist/components/render-generate-tag/index.vue.js +1 -1
  90. package/dist/components/render-header/index.vue.css +3 -3
  91. package/dist/components/render-header/index.vue.js +1 -1
  92. package/dist/components/render-knowledge/icon/index.vue.css +1 -1
  93. package/dist/components/render-knowledge/icon/index.vue.js +1 -1
  94. package/dist/components/render-like/index.vue.css +5 -5
  95. package/dist/components/render-like/index.vue.js +1 -1
  96. package/dist/components/render-prompt/content/index.vue.css +1 -1
  97. package/dist/components/render-prompt/content/index.vue.js +1 -1
  98. package/dist/components/render-reference/index.vue.css +2 -2
  99. package/dist/components/render-reference/index.vue.js +1 -1
  100. package/dist/components/render-resource-version/index.vue.css +2 -2
  101. package/dist/components/render-resource-version/index.vue.js +1 -1
  102. package/dist/components/render-router-tab/index.vue.css +3 -3
  103. package/dist/components/render-router-tab/index.vue.js +1 -1
  104. package/dist/components/render-select-plus-extension/index.vue.css +3 -3
  105. package/dist/components/render-select-plus-extension/index.vue.js +1 -1
  106. package/dist/components/render-t-table/index.vue.css +27 -28
  107. package/dist/components/render-t-table/index.vue.js +1 -1
  108. package/dist/components/render-tag-tree/index.vue.css +7 -7
  109. package/dist/components/render-tag-tree/index.vue.js +1 -1
  110. package/dist/components/render-tags/index.vue.css +6 -6
  111. package/dist/components/render-tags/index.vue.js +1 -1
  112. package/dist/components.d.ts +3 -1
  113. package/dist/components.ts.js +3 -1
  114. package/dist/css/fonts/iconcool.eot +0 -0
  115. package/dist/css/fonts/iconcool.ttf +0 -0
  116. package/dist/css/fonts/iconcool.woff +0 -0
  117. package/dist/css/g-utilities.css +81 -0
  118. package/dist/css/g-utilities.manifest.json +20 -0
  119. package/dist/hooks/use-chat.d.ts +4 -0
  120. package/dist/http/helper/agent.d.ts +13 -1
  121. package/dist/http/helper/agent.ts.js +24 -2
  122. package/dist/http/helper/common.d.ts +13 -1
  123. package/dist/http/helper/common.ts.js +16 -0
  124. package/dist/http/helper/mcp.ts.js +5 -5
  125. package/dist/http/helper/tool.ts.js +3 -3
  126. package/dist/types/agent.d.ts +14 -0
  127. package/dist/types/common.d.ts +8 -0
  128. package/dist/types/mcp.d.ts +3 -3
  129. package/dist/types/tool.d.ts +3 -3
  130. package/package.json +2 -2
@@ -173,6 +173,14 @@
173
173
  border-radius: 100%;
174
174
  }
175
175
 
176
+ .g-border-t-1 {
177
+ border-top-width: 1px;
178
+ }
179
+
180
+ .g-border-t-F0F1F5 {
181
+ border-top: 1px solid #F0F1F5;
182
+ }
183
+
176
184
  .g-confirm {
177
185
  .bk-pop-confirm-title {
178
186
  padding-bottom: 6px;
@@ -311,6 +319,10 @@
311
319
  align-items: center;
312
320
  }
313
321
 
322
+ .g-flex-shrink-0 {
323
+ flex-shrink: 0;
324
+ }
325
+
314
326
  .g-flex-truncate {
315
327
  overflow: hidden;
316
328
  text-overflow: ellipsis;
@@ -346,6 +358,14 @@
346
358
  gap: 4px;
347
359
  }
348
360
 
361
+ .g-gap-8 {
362
+ gap: 8px;
363
+ }
364
+
365
+ .g-gap-y-4 {
366
+ row-gap: 4px;
367
+ }
368
+
349
369
  .g-gray-header-table {
350
370
  .bk-table-head {
351
371
  th {
@@ -359,6 +379,10 @@
359
379
  height: 16px;
360
380
  }
361
381
 
382
+ .g-h-24 {
383
+ height: 24px;
384
+ }
385
+
362
386
  .g-h-56 {
363
387
  height: 56px;
364
388
  }
@@ -385,6 +409,14 @@
385
409
  align-items: center;
386
410
  }
387
411
 
412
+ .g-items-start {
413
+ align-items: flex-start;
414
+ }
415
+
416
+ .g-justify-between {
417
+ justify-content: space-between;
418
+ }
419
+
388
420
  .g-justify-center {
389
421
  justify-content: center;
390
422
  }
@@ -421,6 +453,14 @@
421
453
  line-height: 32px;
422
454
  }
423
455
 
456
+ .g-m-0 {
457
+ margin: 0px;
458
+ }
459
+
460
+ .g-max-h-260 {
461
+ max-height: 260px;
462
+ }
463
+
424
464
  .g-max-h-400 {
425
465
  max-height: 400px;
426
466
  }
@@ -644,6 +684,10 @@
644
684
  font-variant-numeric: tabular-nums;
645
685
  }
646
686
 
687
+ .g-p-0 {
688
+ padding: 0px;
689
+ }
690
+
647
691
  .g-p-12 {
648
692
  padding: 12px;
649
693
  }
@@ -664,6 +708,10 @@
664
708
  padding-bottom: 20px;
665
709
  }
666
710
 
711
+ .g-pb-4 {
712
+ padding-bottom: 4px;
713
+ }
714
+
667
715
  .g-pb-8 {
668
716
  padding-bottom: 8px;
669
717
  }
@@ -678,6 +726,10 @@
678
726
  padding-left: 12px;
679
727
  }
680
728
 
729
+ .g-pl-16 {
730
+ padding-left: 16px;
731
+ }
732
+
681
733
  .g-pl-8 {
682
734
  padding-left: 8px;
683
735
  }
@@ -703,6 +755,10 @@ padding: 0px !important;
703
755
  }
704
756
  }
705
757
 
758
+ .g-pr-16 {
759
+ padding-right: 16px;
760
+ }
761
+
706
762
  .g-pr-24 {
707
763
  padding-right: 24px;
708
764
  }
@@ -719,6 +775,15 @@ padding: 0px !important;
719
775
  padding-top: 14px;
720
776
  }
721
777
 
778
+ .g-pt-8 {
779
+ padding-top: 8px;
780
+ }
781
+
782
+ .g-px-4 {
783
+ padding-left: 4px;
784
+ padding-right: 4px;
785
+ }
786
+
722
787
  .g-radio-group {
723
788
  width: 100%;
724
789
 
@@ -758,6 +823,10 @@ padding: 0px !important;
758
823
  position: relative;
759
824
  }
760
825
 
826
+ .g-rotate--90 {
827
+ transform: rotate(-90deg);
828
+ }
829
+
761
830
  .g-rotate-infinite {
762
831
  animation: rotate 2s linear infinite;
763
832
  }
@@ -998,6 +1067,10 @@ padding: 0px !important;
998
1067
  color: #ea3636;
999
1068
  }
1000
1069
 
1070
+ .g-transition-transform {
1071
+ transition: transform .3s cubic-bezier(.4, 0, .2, 1), -webkit-transform .3s cubic-bezier(.4, 0, .2, 1);
1072
+ }
1073
+
1001
1074
  .g-truncate {
1002
1075
  overflow: hidden;
1003
1076
  text-overflow: ellipsis;
@@ -1042,6 +1115,14 @@ padding: 0px !important;
1042
1115
  color: #3a84ff !important;
1043
1116
  }
1044
1117
 
1118
+ .hover\:g-bg-\[\#f5f7fa\]:hover {
1119
+ background-color: #f5f7fa;
1120
+ }
1121
+
1122
+ .hover\:g-cursor-pointer:hover {
1123
+ cursor: pointer;
1124
+ }
1125
+
1045
1126
  .hover\:g-text-danger-red:hover {
1046
1127
  color: #ff4d4f;
1047
1128
  }
@@ -37,6 +37,8 @@
37
37
  "!g-w-full",
38
38
  "g-absolute",
39
39
  "g-border-radio-100",
40
+ "g-border-t-1",
41
+ "g-border-t-F0F1F5",
40
42
  "g-confirm",
41
43
  "g-confirm-delete",
42
44
  "g-cursor-grab",
@@ -51,6 +53,7 @@
51
53
  "g-flex-col",
52
54
  "g-flex-main-text",
53
55
  "g-flex-row",
56
+ "g-flex-shrink-0",
54
57
  "g-flex-truncate",
55
58
  "g-flex-wrap",
56
59
  "g-float-left",
@@ -58,14 +61,19 @@
58
61
  "g-font-normal",
59
62
  "g-gap",
60
63
  "g-gap-4",
64
+ "g-gap-8",
65
+ "g-gap-y-4",
61
66
  "g-gray-header-table",
62
67
  "g-h-16",
68
+ "g-h-24",
63
69
  "g-h-56",
64
70
  "g-h-70",
65
71
  "g-hidden",
66
72
  "g-inline",
67
73
  "g-inline-flex-row",
68
74
  "g-items-center",
75
+ "g-items-start",
76
+ "g-justify-between",
69
77
  "g-justify-center",
70
78
  "g-justify-end",
71
79
  "g-last-form-item",
@@ -75,6 +83,8 @@
75
83
  "g-leading-24",
76
84
  "g-leading-28",
77
85
  "g-leading-32",
86
+ "g-m-0",
87
+ "g-max-h-260",
78
88
  "g-max-h-400",
79
89
  "g-max-h-80vh",
80
90
  "g-max-truncate",
@@ -121,25 +131,32 @@
121
131
  "g-mx-16",
122
132
  "g-no-permission-resource",
123
133
  "g-number-font",
134
+ "g-p-0",
124
135
  "g-p-12",
125
136
  "g-p-2",
126
137
  "g-pb-12",
127
138
  "g-pb-14",
128
139
  "g-pb-20",
140
+ "g-pb-4",
129
141
  "g-pb-8",
130
142
  "g-permission-cursor-element",
131
143
  "g-pl-12",
144
+ "g-pl-16",
132
145
  "g-pl-8",
133
146
  "g-popover-confirm",
147
+ "g-pr-16",
134
148
  "g-pr-24",
135
149
  "g-pr-8",
136
150
  "g-pt-12",
137
151
  "g-pt-14",
152
+ "g-pt-8",
153
+ "g-px-4",
138
154
  "g-radio-group",
139
155
  "g-relative",
140
156
  "g-resource-description",
141
157
  "g-resource-main",
142
158
  "g-resource-name",
159
+ "g-rotate--90",
143
160
  "g-rotate-infinite",
144
161
  "g-rounded-2",
145
162
  "g-scrollbar",
@@ -171,6 +188,7 @@
171
188
  "g-text-light-gray",
172
189
  "g-text-normal",
173
190
  "g-text-red",
191
+ "g-transition-transform",
174
192
  "g-truncate",
175
193
  "g-w-16",
176
194
  "g-w-200",
@@ -181,6 +199,8 @@
181
199
  "hover:!g-bg-light-blue",
182
200
  "hover:!g-border-blue",
183
201
  "hover:!g-text-blue",
202
+ "hover:g-bg-[#f5f7fa]",
203
+ "hover:g-cursor-pointer",
184
204
  "hover:g-text-danger-red",
185
205
  "hover:g-text-normal"
186
206
  ]
@@ -152,6 +152,8 @@ export declare const useChat: ({ handleStart, handleText, handleReferenceDoc, ha
152
152
  viewMcp?: boolean;
153
153
  useMcp?: boolean;
154
154
  };
155
+ approvalEnabled?: boolean;
156
+ approvalStrategyId?: string;
155
157
  }[];
156
158
  anchorPathResources?: {
157
159
  knowledges?: {
@@ -660,6 +662,8 @@ export declare const useChat: ({ handleStart, handleText, handleReferenceDoc, ha
660
662
  viewMcp?: boolean;
661
663
  useMcp?: boolean;
662
664
  };
665
+ approvalEnabled?: boolean;
666
+ approvalStrategyId?: string;
663
667
  }[];
664
668
  anchorPathResources?: {
665
669
  knowledges?: {
@@ -1,4 +1,4 @@
1
- import type { IAgent, IAgentApi, IAgentApigwMcpPermission, IAgentApigwMcpPermissionApi, IAgentCommand, IAgentCommandApi, IAgentCountParam, IAgentCountParamApi, IAgentForm, IAgentFormApi, IAgentInfo, IAgentInfoApi, IAgentListParam, IAgentListParamApi, IResourceApply, IResourceApplyApi } from '@/types/agent';
1
+ import type { IAgent, IAgentApi, IAgentApigwMcpPermission, IAgentApigwMcpPermissionApi, IAgentCommand, IAgentCommandApi, IAgentCountParam, IAgentCountParamApi, IAgentForm, IAgentFormApi, IAgentInfo, IAgentInfoApi, IAgentListParam, IAgentListParamApi, IApprovalSetting, IApprovalSettingApi, IResourceApply, IResourceApplyApi } from '@/types/agent';
2
2
  /**
3
3
  * 转换agentapi为agent
4
4
  * @param data IAgentInfoApi
@@ -61,3 +61,15 @@ export declare const transferAgentCount2AgentCountApi: (data: IAgentCountParam)
61
61
  * @returns IAgentApigwMcpPermission
62
62
  */
63
63
  export declare const transferAgentApigwMcpPermissionApi2AgentApigwMcpPermission: (data: IAgentApigwMcpPermissionApi) => IAgentApigwMcpPermission;
64
+ /**
65
+ * ui转换为接口使用(配置审批)
66
+ * @param data IApprovalSetting,
67
+ * @returns IApprovalSettingApi
68
+ */
69
+ export declare const transferIApprovalSetting2IApprovalSettingApi: (data: IApprovalSetting) => IApprovalSettingApi;
70
+ /**
71
+ * 接口转换为ui使用(配置审批)
72
+ * @param data IApprovalSettingApi
73
+ * @returns IApprovalSetting
74
+ */
75
+ export declare const transferIApprovalSettingApi2IApprovalSetting: (data: IApprovalSettingApi) => IApprovalSetting;
@@ -163,7 +163,7 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
163
163
  * @param data IAgentForm
164
164
  * @returns IAgentFormApi
165
165
  */ export const transferAgentForm2AgentFormApi = (data)=>{
166
- var _data_conversationSettings, _data_conversationSettings1, _data_conversationSettings_commands, _data_conversationSettings2, _data_conversationSettings3, _data_conversationSettings4, _data_promptSetting_collectionVariables, _data_relatedTools_tools, _data_relatedTools_mcps;
166
+ var _data_conversationSettings, _data_conversationSettings1, _data_conversationSettings_commands, _data_conversationSettings2, _data_conversationSettings3, _data_conversationSettings4, _data_promptSetting_collectionVariables, _data_relatedTools_tools, _data_relatedTools_mcps, _data_approvalSettings;
167
167
  var _data_conversationSettings_openingRemark, _data_conversationSettings_predefinedQuestions;
168
168
  return _object_spread_props(_object_spread({}, transferResourceFormCommon2ResourceFormCommonApi(data)), {
169
169
  agent_code: data.agentCode,
@@ -219,6 +219,7 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
219
219
  related_skills: data.relatedSkills ? {
220
220
  skills: data.relatedSkills.skills.map(transferSkill2SkillApi)
221
221
  } : undefined,
222
+ approval_settings: (_data_approvalSettings = data.approvalSettings) === null || _data_approvalSettings === void 0 ? void 0 : _data_approvalSettings.map(transferIApprovalSetting2IApprovalSettingApi),
222
223
  is_bind_credential: data.isBindCredential,
223
224
  business_ids: data.businessIds
224
225
  });
@@ -228,7 +229,7 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
228
229
  * @param data IAgentFormApi
229
230
  * @returns IAgentForm
230
231
  */ export const transferAgentFormApi2AgentForm = (data)=>{
231
- var _data_conversation_settings, _data_conversation_settings1, _data_conversation_settings_commands, _data_conversation_settings2, _data_conversation_settings3, _data_conversation_settings4, _data_prompt_setting_collection_variables, _data_related_tools_tools, _data_related_tools_mcps, _data_related_skills_skills;
232
+ var _data_conversation_settings, _data_conversation_settings1, _data_conversation_settings_commands, _data_conversation_settings2, _data_conversation_settings3, _data_conversation_settings4, _data_prompt_setting_collection_variables, _data_related_tools_tools, _data_related_tools_mcps, _data_related_skills_skills, _data_approval_settings;
232
233
  var _data_conversation_settings_opening_remark, _data_conversation_settings_predefined_questions;
233
234
  return _object_spread_props(_object_spread({}, transferResourceFormCommonApi2ResourceFormCommon(data)), {
234
235
  agentCode: data.agent_code,
@@ -284,6 +285,7 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
284
285
  relatedSkills: data.related_skills ? {
285
286
  skills: (_data_related_skills_skills = data.related_skills.skills) === null || _data_related_skills_skills === void 0 ? void 0 : _data_related_skills_skills.map(transferSkillApi2Skill)
286
287
  } : undefined,
288
+ approvalSettings: (_data_approval_settings = data.approval_settings) === null || _data_approval_settings === void 0 ? void 0 : _data_approval_settings.map(transferIApprovalSettingApi2IApprovalSetting),
287
289
  isBindCredential: data.is_bind_credential,
288
290
  businessIds: data.business_ids
289
291
  });
@@ -388,3 +390,23 @@ export const transferAgentCount2AgentCountApi = (data)=>{
388
390
  url: data.url,
389
391
  protocolType: data.protocol_type
390
392
  });
393
+ /**
394
+ * ui转换为接口使用(配置审批)
395
+ * @param data IApprovalSetting,
396
+ * @returns IApprovalSettingApi
397
+ */ export const transferIApprovalSetting2IApprovalSettingApi = (data)=>({
398
+ strategy_id: data.strategyId,
399
+ approval_name: data.approvalName,
400
+ approvers: data.approvers,
401
+ is_default: data.isDefault
402
+ });
403
+ /**
404
+ * 接口转换为ui使用(配置审批)
405
+ * @param data IApprovalSettingApi
406
+ * @returns IApprovalSetting
407
+ */ export const transferIApprovalSettingApi2IApprovalSetting = (data)=>({
408
+ strategyId: data.strategy_id,
409
+ approvalName: data.approval_name,
410
+ approvers: data.approvers,
411
+ isDefault: data.is_default
412
+ });
@@ -1,5 +1,5 @@
1
1
  import { ResourceStatus } from '@/enums';
2
- import type { IBaseCountParam, IBaseCountParamApi, IPaginationParam, IPaginationParamApi, IPaginationResponse, IPaginationResponseApi, IReferringAgent, IReferringAgentApi, IResourceCommon, IResourceCommonApi, IResourceCommonSearchParams, IResourceCommonSearchParamsApi, IResourceCount, IResourceCountApi, IResourceFormCommon, IResourceFormCommonApi, IResourceReference, IResourceReferenceApi, ISortParam, ISortParamApi, ITagTree, ITagTreeApi, ITagTreeNode, ITagTreeNodeApi, IVariable, IVariableApi } from '@/types/common';
2
+ import type { IBaseCountParam, IBaseCountParamApi, IPaginationParam, IPaginationParamApi, IPaginationResponse, IPaginationResponseApi, IReferringAgent, IReferringAgentApi, IResourceCommon, IResourceCommonApi, IResourceCommonSearchParams, IResourceCommonSearchParamsApi, IResourceCount, IResourceCountApi, IResourceFormCommon, IResourceFormCommonApi, IResourceReference, IResourceReferenceApi, ISortParam, ISortParamApi, ITagTree, ITagTreeApi, ITagTreeNode, ITagTreeNodeApi, IVariable, IVariableApi, IApprovalSettingValue, IApprovalSettingValueApi } from '@/types/common';
3
3
  /**
4
4
  * 接口转换为ui使用
5
5
  * @param data ITagsTreeApi
@@ -61,3 +61,15 @@ export declare const transferBaseCountParam2BaseCountParamApi: (data: IBaseCount
61
61
  export declare const transferResourceCountApi2ResourceCount: (data: IResourceCountApi) => IResourceCount;
62
62
  export declare const transferReferringAgentApi2ReferringAgent: (data: IReferringAgentApi) => IReferringAgent;
63
63
  export declare const transferIResourceReferenceApi2IResourceReference: (data: IResourceReferenceApi) => IResourceReference;
64
+ /**
65
+ * ui转换为接口使用(配置审批策略)
66
+ * @param data IApprovalSettingValue,
67
+ * @returns IApprovalSettingValueApi
68
+ */
69
+ export declare const transferIApprovalSettingValue2IApprovalSettingValueApi: (data: IApprovalSettingValue) => IApprovalSettingValueApi;
70
+ /**
71
+ * 接口转换为ui使用(配置审批策略)
72
+ * @param data IApprovalSettingValueApi
73
+ * @returns IApprovalSettingValue
74
+ */
75
+ export declare const transferIApprovalSettingValueApi2IApprovalSettingValue: (data: IApprovalSettingValueApi) => IApprovalSettingValue;
@@ -168,3 +168,19 @@ export const transferIResourceReferenceApi2IResourceReference = (data)=>{
168
168
  spaceId: data.space_id
169
169
  };
170
170
  };
171
+ /**
172
+ * ui转换为接口使用(配置审批策略)
173
+ * @param data IApprovalSettingValue,
174
+ * @returns IApprovalSettingValueApi
175
+ */ export const transferIApprovalSettingValue2IApprovalSettingValueApi = (data)=>({
176
+ approval_enabled: data.approvalEnabled,
177
+ approval_strategy_id: data.approvalStrategyId
178
+ });
179
+ /**
180
+ * 接口转换为ui使用(配置审批策略)
181
+ * @param data IApprovalSettingValueApi
182
+ * @returns IApprovalSettingValue
183
+ */ export const transferIApprovalSettingValueApi2IApprovalSettingValue = (data)=>({
184
+ approvalEnabled: data.approval_enabled,
185
+ approvalStrategyId: data.approval_strategy_id
186
+ });
@@ -50,7 +50,7 @@ function _object_spread_props(target, source) {
50
50
  }
51
51
  return target;
52
52
  }
53
- import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortParamApi, transferResourceCommon2ResourceCommonApi, transferResourceCommonApi2ResourceCommon, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi, transferResourceFormCommon2ResourceFormCommonApi, transferResourceFormCommonApi2ResourceFormCommon } from './common.ts.js';
53
+ import { transferBaseCountParam2BaseCountParamApi, transferIApprovalSettingValue2IApprovalSettingValueApi, transferIApprovalSettingValueApi2IApprovalSettingValue, transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortParamApi, transferResourceCommon2ResourceCommonApi, transferResourceCommonApi2ResourceCommon, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi, transferResourceFormCommon2ResourceFormCommonApi, transferResourceFormCommonApi2ResourceFormCommon } from './common.ts.js';
54
54
  /**
55
55
  * ui转换为接口使用
56
56
  * @param data IMcpListParam
@@ -98,14 +98,14 @@ import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPag
98
98
  * API to UI (MCP Tool)
99
99
  */ export const transferMcpToolApi2McpTool = (mcpTool)=>{
100
100
  var _mcpTool_input_params, _mcpTool_output_params;
101
- return {
101
+ return _object_spread({
102
102
  toolName: mcpTool.tool_name,
103
103
  toolCode: mcpTool.tool_code,
104
104
  toolDescription: mcpTool.tool_description,
105
105
  inputParams: ((_mcpTool_input_params = mcpTool.input_params) === null || _mcpTool_input_params === void 0 ? void 0 : _mcpTool_input_params.map(transferMcpToolInputParamApi2McpToolInputParam)) || [],
106
106
  outputParams: ((_mcpTool_output_params = mcpTool.output_params) === null || _mcpTool_output_params === void 0 ? void 0 : _mcpTool_output_params.map(transferMcpToolOutputParamApi2McpToolOutputParam)) || [],
107
107
  arguments: mcpTool.arguments
108
- };
108
+ }, transferIApprovalSettingValueApi2IApprovalSettingValue(mcpTool));
109
109
  };
110
110
  /**
111
111
  * ui转换为接口使用(MCP工具输入参数)
@@ -134,14 +134,14 @@ import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPag
134
134
  * UI to API (MCP Tool)
135
135
  */ export const transferMcpTool2McpToolApi = (mcpTool)=>{
136
136
  var _mcpTool_inputParams, _mcpTool_outputParams;
137
- return {
137
+ return _object_spread({
138
138
  tool_name: mcpTool.toolName,
139
139
  tool_code: mcpTool.toolCode,
140
140
  tool_description: mcpTool.toolDescription,
141
141
  input_params: ((_mcpTool_inputParams = mcpTool.inputParams) === null || _mcpTool_inputParams === void 0 ? void 0 : _mcpTool_inputParams.map(transferMcpToolInputParam2McpToolInputParamApi)) || [],
142
142
  output_params: ((_mcpTool_outputParams = mcpTool.outputParams) === null || _mcpTool_outputParams === void 0 ? void 0 : _mcpTool_outputParams.map(transferMcpToolOutputParam2McpToolOutputParamApi)) || [],
143
143
  arguments: mcpTool.arguments
144
- };
144
+ }, transferIApprovalSettingValue2IApprovalSettingValueApi(mcpTool));
145
145
  };
146
146
  /**
147
147
  * 接口转换为ui使用(表单字段)
@@ -50,7 +50,7 @@ function _object_spread_props(target, source) {
50
50
  }
51
51
  return target;
52
52
  }
53
- import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortParamApi, transferResourceCommon2ResourceCommonApi, transferResourceCommonApi2ResourceCommon, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi, transferResourceFormCommon2ResourceFormCommonApi, transferResourceFormCommonApi2ResourceFormCommon } from './common.ts.js';
53
+ import { transferBaseCountParam2BaseCountParamApi, transferIApprovalSettingValue2IApprovalSettingValueApi, transferIApprovalSettingValueApi2IApprovalSettingValue, transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortParamApi, transferResourceCommon2ResourceCommonApi, transferResourceCommonApi2ResourceCommon, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi, transferResourceFormCommon2ResourceFormCommonApi, transferResourceFormCommonApi2ResourceFormCommon } from './common.ts.js';
54
54
  /**
55
55
  * ui转换为接口使用(表单字段)
56
56
  * @param data IToolForm
@@ -93,7 +93,7 @@ import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPag
93
93
  * @returns ITool
94
94
  */ export const transferToolApi2Tool = (data)=>_object_spread_props(_object_spread({}, transferToolFormApi2ToolForm(data), transferResourceCommonApi2ResourceCommon(_object_spread_props(_object_spread({}, data), {
95
95
  id: data.tool_id
96
- }))), {
96
+ })), transferIApprovalSettingValueApi2IApprovalSettingValue(data)), {
97
97
  id: data.tool_id,
98
98
  refCount: data.ref_count
99
99
  });
@@ -101,7 +101,7 @@ import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPag
101
101
  * ui转换为接口使用(完整资源)
102
102
  * @param data ITool
103
103
  * @returns IToolApi
104
- */ export const transferTool2ToolApi = (data)=>_object_spread_props(_object_spread({}, transferToolForm2ToolFormApi(data), transferResourceCommon2ResourceCommonApi(data)), {
104
+ */ export const transferTool2ToolApi = (data)=>_object_spread_props(_object_spread({}, transferToolForm2ToolFormApi(data), transferResourceCommon2ResourceCommonApi(data), transferIApprovalSettingValue2IApprovalSettingValueApi(data)), {
105
105
  tool_id: data.id
106
106
  });
107
107
  /**
@@ -174,6 +174,7 @@ export interface IAgentFormApi extends IResourceFormCommonApi {
174
174
  agents: IAgentApi[];
175
175
  };
176
176
  business_ids?: number[];
177
+ approval_settings?: IApprovalSettingApi[];
177
178
  }
178
179
  export interface IAgentForm extends IResourceFormCommon {
179
180
  agentCode: string;
@@ -231,6 +232,7 @@ export interface IAgentForm extends IResourceFormCommon {
231
232
  agents: IAgent[];
232
233
  };
233
234
  businessIds?: number[];
235
+ approvalSettings?: IApprovalSetting[];
234
236
  }
235
237
  export interface IAgent extends IAgentForm, IResourceCommon {
236
238
  version: string;
@@ -354,3 +356,15 @@ export interface IAgentCountParamApi extends IBaseCountParamApi {
354
356
  agent_type?: AgentType;
355
357
  is_published?: boolean;
356
358
  }
359
+ export interface IApprovalSetting {
360
+ strategyId: string;
361
+ approvalName: string;
362
+ approvers: string[];
363
+ isDefault: boolean;
364
+ }
365
+ export interface IApprovalSettingApi {
366
+ strategy_id: string;
367
+ approval_name: string;
368
+ approvers: string[];
369
+ is_default: boolean;
370
+ }
@@ -226,3 +226,11 @@ export interface IResourceReferenceApi {
226
226
  mcp_id: number;
227
227
  mcp_name: string;
228
228
  }
229
+ export interface IApprovalSettingValue {
230
+ approvalEnabled?: boolean;
231
+ approvalStrategyId?: string;
232
+ }
233
+ export interface IApprovalSettingValueApi {
234
+ approval_enabled?: boolean;
235
+ approval_strategy_id?: string;
236
+ }
@@ -1,4 +1,4 @@
1
- import type { IBaseCountParam, IBaseCountParamApi, IPaginationParam, IPaginationParamApi, IResourceCommon, IResourceCommonApi, IResourceCommonSearchParams, IResourceCommonSearchParamsApi, IResourceFormCommon, IResourceFormCommonApi, ISortParam, ISortParamApi } from './common';
1
+ import type { IApprovalSettingValue, IApprovalSettingValueApi, IBaseCountParam, IBaseCountParamApi, IPaginationParam, IPaginationParamApi, IResourceCommon, IResourceCommonApi, IResourceCommonSearchParams, IResourceCommonSearchParamsApi, IResourceFormCommon, IResourceFormCommonApi, ISortParam, ISortParamApi } from './common';
2
2
  import { EnumCharacter, McpType, Module, ToolCrdentialType } from './enum';
3
3
  export interface IMcpListParamApi extends IPaginationParamApi, IResourceCommonSearchParamsApi, ISortParamApi {
4
4
  created_by?: string;
@@ -62,7 +62,7 @@ export interface IMcpToolOutputParamApi {
62
62
  param_desc?: string;
63
63
  children?: IMcpToolOutputParamApi[];
64
64
  }
65
- export interface IMcpToolApi {
65
+ export interface IMcpToolApi extends IApprovalSettingValueApi {
66
66
  tool_name: string;
67
67
  tool_code: string;
68
68
  tool_description: string;
@@ -91,7 +91,7 @@ export interface IMcpToolInputParam extends IMcpToolOutputParam {
91
91
  isRequired: boolean;
92
92
  children?: IMcpToolInputParam[];
93
93
  }
94
- export interface IMcpTool {
94
+ export interface IMcpTool extends IApprovalSettingValue {
95
95
  toolName: string;
96
96
  toolCode: string;
97
97
  toolDescription: string;
@@ -1,4 +1,4 @@
1
- import type { IBaseCountParam, IBaseCountParamApi, IPaginationParam, IPaginationParamApi, IResourceCommon, IResourceCommonApi, IResourceCommonSearchParams, IResourceCommonSearchParamsApi, IResourceFormCommon, IResourceFormCommonApi, ISortParam, ISortParamApi } from './common';
1
+ import type { IApprovalSettingValue, IApprovalSettingValueApi, IBaseCountParam, IBaseCountParamApi, IPaginationParam, IPaginationParamApi, IResourceCommon, IResourceCommonApi, IResourceCommonSearchParams, IResourceCommonSearchParamsApi, IResourceFormCommon, IResourceFormCommonApi, ISortParam, ISortParamApi } from './common';
2
2
  import { ApiValueType, EnumCharacter, IsSensitiveParam, Module, ToolCrdentialType } from './enum';
3
3
  export interface IToolRule {
4
4
  func: string;
@@ -32,7 +32,7 @@ export interface IToolFormApi extends IResourceFormCommonApi {
32
32
  credential_id?: number;
33
33
  credential_type?: ToolCrdentialType;
34
34
  }
35
- export interface IToolApi extends IToolFormApi, Omit<IResourceCommonApi, 'id'> {
35
+ export interface IToolApi extends IToolFormApi, Omit<IResourceCommonApi, 'id'>, IApprovalSettingValueApi {
36
36
  tool_id: number;
37
37
  ref_count?: number;
38
38
  }
@@ -49,7 +49,7 @@ export interface IToolForm extends IResourceFormCommon {
49
49
  credentialId?: number;
50
50
  credentialType?: ToolCrdentialType;
51
51
  }
52
- export interface ITool extends IToolForm, IResourceCommon {
52
+ export interface ITool extends IToolForm, IResourceCommon, IApprovalSettingValue {
53
53
  refCount?: number;
54
54
  }
55
55
  export interface IApplicationTool extends ITool {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/ai-ui-sdk",
3
- "version": "0.3.0-beta.23",
3
+ "version": "0.3.0-beta.24",
4
4
  "description": "蓝鲸AI UI SDK",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",
@@ -103,7 +103,7 @@
103
103
  "vue-router": "^4.2.4"
104
104
  },
105
105
  "devDependencies": {
106
- "@blueking/aidev-g-utilities": "0.1.0-beta.7",
106
+ "@blueking/aidev-g-utilities": "0.1.0-beta.8",
107
107
  "@blueking/babel-preset-bk": "2.1.0",
108
108
  "@blueking/cli-service": "0.1.0-beta.31",
109
109
  "@blueking/eslint-config-bk": "2.1.0",