@blueking/ai-ui-sdk 0.3.0-beta.31 → 0.3.0-beta.33
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.
- package/dist/common/util.d.ts +1 -1
- package/dist/common/util.ts.js +48 -11
- package/dist/components/render-agent/agent-type.vue.css +3 -3
- package/dist/components/render-agent/agent-type.vue.js +1 -1
- package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
- package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
- package/dist/components/render-auto-refresh/index.script.vue.js.js +2 -2
- package/dist/components/render-auto-refresh/index.vue.css +8 -8
- package/dist/components/render-auto-refresh/index.vue.js +1 -1
- package/dist/components/render-card/agent/actions.script.vue.js.js +0 -3
- package/dist/components/render-card/agent/actions.vue.d.ts +0 -2
- package/dist/components/render-card/agent/index.script.vue.js.js +0 -2
- package/dist/components/render-card/agent/prefix-info-tool.vue.css +5 -5
- package/dist/components/render-card/agent/prefix-info-tool.vue.js +1 -1
- package/dist/components/render-card/base/approval-strategy-popover.script.vue.js.js +209 -0
- package/dist/components/render-card/base/approval-strategy-popover.vue.d.ts +19 -0
- package/dist/components/render-card/base/approval-strategy-popover.vue.js +3 -0
- package/dist/components/render-card/base.vue.css +12 -12
- package/dist/components/render-card/base.vue.js +1 -1
- package/dist/components/render-card/llm/actions.script.vue.js.js +0 -3
- package/dist/components/render-card/llm/actions.vue.d.ts +0 -2
- package/dist/components/render-card/llm/corner-badge.vue.css +3 -3
- package/dist/components/render-card/llm/corner-badge.vue.js +1 -1
- package/dist/components/render-card/llm/icons.vue.css +2 -2
- package/dist/components/render-card/llm/icons.vue.js +1 -1
- package/dist/components/render-card/llm/index.script.vue.js.js +0 -2
- package/dist/components/render-card/llm/info.vue.css +1 -1
- package/dist/components/render-card/llm/info.vue.js +1 -1
- package/dist/components/render-card/llm/tag-prefix.vue.css +3 -3
- package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
- package/dist/components/render-card/mcp/actions.script.vue.js.js +4 -4
- package/dist/components/render-card/mcp/actions.vue.d.ts +0 -2
- package/dist/components/render-card/mcp/index.script.vue.js.js +24 -5
- package/dist/components/render-card/mcp/index.vue.d.ts +5 -2
- package/dist/components/render-card/mcp/name-suffix.vue.css +2 -2
- package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
- package/dist/components/render-card/mcp/selected-tools-info.script.vue.js.js +156 -0
- package/dist/components/render-card/mcp/selected-tools-info.vue.d.ts +26 -0
- package/dist/components/render-card/mcp/selected-tools-info.vue.js +3 -0
- package/dist/components/render-card/prompt/icons.vue.css +1 -1
- package/dist/components/render-card/prompt/icons.vue.js +1 -1
- package/dist/components/render-card/role/index.vue.d.ts +1 -1
- package/dist/components/render-card/skill/index.script.vue.js.js +0 -2
- package/dist/components/render-card/skill/tag-prefix.vue.css +3 -3
- package/dist/components/render-card/skill/tag-prefix.vue.js +1 -1
- package/dist/components/render-card/tool/actions.script.vue.js.js +1 -4
- package/dist/components/render-card/tool/actions.vue.d.ts +0 -2
- package/dist/components/render-card/tool/index.script.vue.js.js +13 -7
- package/dist/components/render-card/tool/index.vue.d.ts +4 -1
- package/dist/components/render-card/tool/prefix-info-tool.script.vue.js.js +70 -20
- package/dist/components/render-card/tool/prefix-info-tool.vue.d.ts +4 -0
- package/dist/components/render-checkbox/index.vue.css +9 -9
- package/dist/components/render-checkbox/index.vue.js +1 -1
- package/dist/components/render-choose-tag/index.vue.css +7 -7
- package/dist/components/render-choose-tag/index.vue.js +1 -1
- package/dist/components/render-collapse/index.vue.css +2 -2
- package/dist/components/render-collapse/index.vue.js +1 -1
- package/dist/components/render-collection/actions/index.vue.d.ts +2 -2
- package/dist/components/render-collection/content/index.vue.css +4 -4
- package/dist/components/render-collection/content/index.vue.js +1 -1
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +3 -3
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.css +1 -1
- package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
- package/dist/components/render-dataset/components/dataset-data-valid/index.vue.css +1 -1
- package/dist/components/render-dataset/components/dataset-data-valid/index.vue.js +1 -1
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
- package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset/index.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset-detail-origin-data/index.script.vue.js.js +1 -1
- package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
- package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
- package/dist/components/render-dataset-list/components/main.vue.css +3 -3
- package/dist/components/render-dataset-list/components/main.vue.js +1 -1
- package/dist/components/render-dataset-list/index.vue.css +2 -2
- package/dist/components/render-dataset-list/index.vue.js +1 -1
- package/dist/components/render-dialog/choose-resource.vue.css +3 -3
- package/dist/components/render-dialog/choose-resource.vue.js +1 -1
- package/dist/components/render-dialog/choose-result.vue.css +14 -14
- package/dist/components/render-dialog/choose-result.vue.js +1 -1
- package/dist/components/render-dialog/choose-space.vue.css +9 -9
- package/dist/components/render-dialog/choose-space.vue.js +1 -1
- package/dist/components/render-dialog/index.vue.css +6 -6
- package/dist/components/render-dialog/index.vue.js +1 -1
- package/dist/components/render-file-card/index.vue.css +11 -11
- package/dist/components/render-file-card/index.vue.js +1 -1
- package/dist/components/render-file-type-icon/index.vue.css +6 -6
- package/dist/components/render-file-type-icon/index.vue.js +1 -1
- package/dist/components/render-generate-tag/index.vue.css +5 -5
- package/dist/components/render-generate-tag/index.vue.js +1 -1
- package/dist/components/render-header/index.vue.css +3 -3
- package/dist/components/render-header/index.vue.js +1 -1
- package/dist/components/render-knowledge/icon/index.vue.css +1 -1
- package/dist/components/render-knowledge/icon/index.vue.js +1 -1
- package/dist/components/render-like/index.vue.css +5 -5
- package/dist/components/render-like/index.vue.js +1 -1
- package/dist/components/render-mcp/install/index.script.vue.js.js +1 -1
- package/dist/components/render-prompt/content/index.vue.css +1 -1
- package/dist/components/render-prompt/content/index.vue.js +1 -1
- package/dist/components/render-reference/index.vue.css +2 -2
- package/dist/components/render-reference/index.vue.js +1 -1
- package/dist/components/render-resource-version/index.vue.css +2 -2
- package/dist/components/render-resource-version/index.vue.js +1 -1
- package/dist/components/render-router-tab/index.vue.css +3 -3
- package/dist/components/render-router-tab/index.vue.js +1 -1
- package/dist/components/render-search-select/index.script.vue.js.js +31 -12
- package/dist/components/render-search-select/index.vue.d.ts +2 -0
- package/dist/components/render-select-plus-extension/index.vue.css +3 -3
- package/dist/components/render-select-plus-extension/index.vue.js +1 -1
- package/dist/components/render-skill/actions/index.script.vue.js.js +0 -3
- package/dist/components/render-skill/actions/index.vue.d.ts +0 -2
- package/dist/components/render-t-table/index.vue.css +27 -28
- package/dist/components/render-t-table/index.vue.js +1 -1
- package/dist/components/render-tag-tree/index.vue.css +7 -7
- package/dist/components/render-tag-tree/index.vue.js +1 -1
- package/dist/components/render-tags/index.vue.css +6 -6
- package/dist/components/render-tags/index.vue.js +1 -1
- package/dist/components.d.ts +3 -1
- package/dist/components.ts.js +3 -1
- package/dist/css/fonts/iconcool.eot +0 -0
- package/dist/css/fonts/iconcool.ttf +0 -0
- package/dist/css/fonts/iconcool.woff +0 -0
- package/dist/css/g-utilities.css +81 -0
- package/dist/css/g-utilities.manifest.json +20 -0
- package/dist/hooks/use-chat.d.ts +4 -0
- package/dist/hooks/use-click-proxy.ts.js +1 -3
- package/dist/http/helper/agent.d.ts +13 -1
- package/dist/http/helper/agent.ts.js +24 -2
- package/dist/http/helper/common.d.ts +13 -1
- package/dist/http/helper/common.ts.js +16 -0
- package/dist/http/helper/dataset.ts.js +1 -0
- package/dist/http/helper/mcp.ts.js +5 -5
- package/dist/http/helper/tool.ts.js +3 -3
- package/dist/types/agent.d.ts +14 -0
- package/dist/types/common.d.ts +8 -0
- package/dist/types/dataset.d.ts +4 -0
- package/dist/types/mcp.d.ts +3 -3
- package/dist/types/tool.d.ts +3 -3
- package/package.json +2 -2
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
"!g-z-9999",
|
|
39
39
|
"g-absolute",
|
|
40
40
|
"g-border-radio-100",
|
|
41
|
+
"g-border-t-1",
|
|
42
|
+
"g-border-t-F0F1F5",
|
|
41
43
|
"g-confirm",
|
|
42
44
|
"g-confirm-delete",
|
|
43
45
|
"g-cursor-grab",
|
|
@@ -59,8 +61,11 @@
|
|
|
59
61
|
"g-font-normal",
|
|
60
62
|
"g-gap",
|
|
61
63
|
"g-gap-4",
|
|
64
|
+
"g-gap-8",
|
|
65
|
+
"g-gap-y-4",
|
|
62
66
|
"g-gray-header-table",
|
|
63
67
|
"g-h-16",
|
|
68
|
+
"g-h-24",
|
|
64
69
|
"g-h-42",
|
|
65
70
|
"g-h-56",
|
|
66
71
|
"g-h-60",
|
|
@@ -71,6 +76,8 @@
|
|
|
71
76
|
"g-inline",
|
|
72
77
|
"g-inline-flex-row",
|
|
73
78
|
"g-items-center",
|
|
79
|
+
"g-items-start",
|
|
80
|
+
"g-justify-between",
|
|
74
81
|
"g-justify-center",
|
|
75
82
|
"g-justify-end",
|
|
76
83
|
"g-last-form-item",
|
|
@@ -80,6 +87,8 @@
|
|
|
80
87
|
"g-leading-24",
|
|
81
88
|
"g-leading-28",
|
|
82
89
|
"g-leading-32",
|
|
90
|
+
"g-m-0",
|
|
91
|
+
"g-max-h-260",
|
|
83
92
|
"g-max-h-400",
|
|
84
93
|
"g-max-h-80vh",
|
|
85
94
|
"g-max-truncate",
|
|
@@ -127,33 +136,41 @@
|
|
|
127
136
|
"g-mx-16",
|
|
128
137
|
"g-no-permission-resource",
|
|
129
138
|
"g-number-font",
|
|
139
|
+
"g-p-0",
|
|
130
140
|
"g-p-12",
|
|
131
141
|
"g-p-2",
|
|
132
142
|
"g-pb-12",
|
|
133
143
|
"g-pb-14",
|
|
134
144
|
"g-pb-20",
|
|
145
|
+
"g-pb-4",
|
|
135
146
|
"g-pb-8",
|
|
136
147
|
"g-permission-cursor-element",
|
|
137
148
|
"g-pl-12",
|
|
149
|
+
"g-pl-16",
|
|
138
150
|
"g-pl-8",
|
|
139
151
|
"g-popover-confirm",
|
|
152
|
+
"g-pr-16",
|
|
140
153
|
"g-pr-24",
|
|
141
154
|
"g-pr-8",
|
|
142
155
|
"g-pt-12",
|
|
143
156
|
"g-pt-14",
|
|
144
157
|
"g-pt-16",
|
|
158
|
+
"g-pt-8",
|
|
145
159
|
"g-px-24",
|
|
160
|
+
"g-px-4",
|
|
146
161
|
"g-radio-group",
|
|
147
162
|
"g-relative",
|
|
148
163
|
"g-resource-description",
|
|
149
164
|
"g-resource-main",
|
|
150
165
|
"g-resource-name",
|
|
166
|
+
"g-rotate--90",
|
|
151
167
|
"g-rotate-infinite",
|
|
152
168
|
"g-rounded-2",
|
|
153
169
|
"g-scrollbar",
|
|
154
170
|
"g-scrollbar-page",
|
|
155
171
|
"g-short-form",
|
|
156
172
|
"g-show-dialog",
|
|
173
|
+
"g-shrink-0",
|
|
157
174
|
"g-small-form",
|
|
158
175
|
"g-small-gap-form",
|
|
159
176
|
"g-t-table-filter",
|
|
@@ -179,6 +196,7 @@
|
|
|
179
196
|
"g-text-light-gray",
|
|
180
197
|
"g-text-normal",
|
|
181
198
|
"g-text-red",
|
|
199
|
+
"g-transition-transform",
|
|
182
200
|
"g-truncate",
|
|
183
201
|
"g-w-16",
|
|
184
202
|
"g-w-200",
|
|
@@ -190,6 +208,8 @@
|
|
|
190
208
|
"hover:!g-bg-light-blue",
|
|
191
209
|
"hover:!g-border-blue",
|
|
192
210
|
"hover:!g-text-blue",
|
|
211
|
+
"hover:g-bg-[#f5f7fa]",
|
|
212
|
+
"hover:g-cursor-pointer",
|
|
193
213
|
"hover:g-rounded-full",
|
|
194
214
|
"hover:g-text-danger-red",
|
|
195
215
|
"hover:g-text-normal"
|
package/dist/hooks/use-chat.d.ts
CHANGED
|
@@ -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?: {
|
|
@@ -53,9 +53,7 @@ export const useClickProxy = (disabledClassName)=>{
|
|
|
53
53
|
// 复制
|
|
54
54
|
if (target === null || target === void 0 ? void 0 : target.classList.contains('click-copy')) {
|
|
55
55
|
const text = target === null || target === void 0 ? void 0 : target.getAttribute('data-clipboard-text');
|
|
56
|
-
|
|
57
|
-
handleCopy(decodeURIComponent(text));
|
|
58
|
-
}
|
|
56
|
+
handleCopy(decodeURIComponent(text || ''));
|
|
59
57
|
}
|
|
60
58
|
// 下载
|
|
61
59
|
if (target === null || target === void 0 ? void 0 : target.classList.contains('click-download')) {
|
|
@@ -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
|
});
|
|
@@ -389,3 +391,23 @@ export const transferAgentCount2AgentCountApi = (data)=>{
|
|
|
389
391
|
url: data.url,
|
|
390
392
|
protocolType: data.protocol_type
|
|
391
393
|
});
|
|
394
|
+
/**
|
|
395
|
+
* ui转换为接口使用(配置审批)
|
|
396
|
+
* @param data IApprovalSetting,
|
|
397
|
+
* @returns IApprovalSettingApi
|
|
398
|
+
*/ export const transferIApprovalSetting2IApprovalSettingApi = (data)=>({
|
|
399
|
+
strategy_id: data.strategyId,
|
|
400
|
+
approval_name: data.approvalName,
|
|
401
|
+
approvers: data.approvers,
|
|
402
|
+
is_default: data.isDefault
|
|
403
|
+
});
|
|
404
|
+
/**
|
|
405
|
+
* 接口转换为ui使用(配置审批)
|
|
406
|
+
* @param data IApprovalSettingApi
|
|
407
|
+
* @returns IApprovalSetting
|
|
408
|
+
*/ export const transferIApprovalSettingApi2IApprovalSetting = (data)=>({
|
|
409
|
+
strategyId: data.strategy_id,
|
|
410
|
+
approvalName: data.approval_name,
|
|
411
|
+
approvers: data.approvers,
|
|
412
|
+
isDefault: data.is_default
|
|
413
|
+
});
|
|
@@ -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
|
+
});
|
|
@@ -312,6 +312,7 @@ import { transferResourcePermissionApi2ResourcePermission } from './permission.t
|
|
|
312
312
|
* @returns IOperatRecordParamApi
|
|
313
313
|
*/ export const transferOperatRecordParam2OperatRecordParamApi = (data)=>{
|
|
314
314
|
return _object_spread_props(_object_spread({}, transferIPaginationParam2IPaginationParamApi(data)), {
|
|
315
|
+
fuzzy: data.fuzzy,
|
|
315
316
|
id: data.id,
|
|
316
317
|
instance_id: data.instanceId,
|
|
317
318
|
resource_type_id: data.resourceTypeId,
|
|
@@ -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
|
/**
|
package/dist/types/agent.d.ts
CHANGED
|
@@ -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;
|
|
@@ -356,3 +358,15 @@ export interface IAgentCountParamApi extends IBaseCountParamApi {
|
|
|
356
358
|
agent_type?: AgentType;
|
|
357
359
|
is_published?: boolean;
|
|
358
360
|
}
|
|
361
|
+
export interface IApprovalSetting {
|
|
362
|
+
strategyId: string;
|
|
363
|
+
approvalName: string;
|
|
364
|
+
approvers: string[];
|
|
365
|
+
isDefault: boolean;
|
|
366
|
+
}
|
|
367
|
+
export interface IApprovalSettingApi {
|
|
368
|
+
strategy_id: string;
|
|
369
|
+
approval_name: string;
|
|
370
|
+
approvers: string[];
|
|
371
|
+
is_default: boolean;
|
|
372
|
+
}
|
package/dist/types/common.d.ts
CHANGED
|
@@ -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
|
+
}
|
package/dist/types/dataset.d.ts
CHANGED
|
@@ -151,6 +151,7 @@ export interface IDatasetData extends IDatasetDataForm {
|
|
|
151
151
|
id: number;
|
|
152
152
|
}
|
|
153
153
|
export interface IDatasetDataParam extends IPaginationParam, ISortParam {
|
|
154
|
+
fuzzy?: string;
|
|
154
155
|
datasetId?: number;
|
|
155
156
|
createdBy?: string;
|
|
156
157
|
modelType?: string;
|
|
@@ -162,6 +163,7 @@ export interface IDatasetDataParam extends IPaginationParam, ISortParam {
|
|
|
162
163
|
reviewStatuses?: DatasetDataReviewStatus[];
|
|
163
164
|
}
|
|
164
165
|
export interface IDatasetDataParamApi extends IPaginationParamApi, ISortParamApi {
|
|
166
|
+
fuzzy?: string;
|
|
165
167
|
dataset_id?: number;
|
|
166
168
|
created_by?: string;
|
|
167
169
|
model_type?: string;
|
|
@@ -219,6 +221,7 @@ export interface ISchema {
|
|
|
219
221
|
schema: Record<string, string>;
|
|
220
222
|
}
|
|
221
223
|
export interface IOperatRecordParam extends IPaginationParam {
|
|
224
|
+
fuzzy?: string;
|
|
222
225
|
id?: number;
|
|
223
226
|
instanceId?: number;
|
|
224
227
|
parentId?: number;
|
|
@@ -233,6 +236,7 @@ export interface IOperatRecordParam extends IPaginationParam {
|
|
|
233
236
|
instanceData?: string;
|
|
234
237
|
}
|
|
235
238
|
export interface IOperatRecordParamApi extends IPaginationParamApi {
|
|
239
|
+
fuzzy?: string;
|
|
236
240
|
id?: number;
|
|
237
241
|
instance_id?: number;
|
|
238
242
|
parent_id?: number;
|
package/dist/types/mcp.d.ts
CHANGED
|
@@ -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, McpInstallTargetType, 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;
|
package/dist/types/tool.d.ts
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "0.3.0-beta.33",
|
|
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.
|
|
106
|
+
"@blueking/aidev-g-utilities": "0.1.0-beta.11",
|
|
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",
|