@blueking/ai-ui-sdk 0.4.3-beta.13 → 0.4.3-beta.15
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/README.md +2258 -2258
- package/dist/assets/svg/lock.svg +43 -43
- package/dist/common/util.ts.js +103 -103
- package/dist/components/render-agent/agent-download.vue.css +2 -2
- package/dist/components/render-agent/agent-type.vue.css +9 -9
- package/dist/components/render-agent/agent-type.vue.js +1 -1
- package/dist/components/render-auth/auth-dialog.script.vue.js.js +3 -6
- package/dist/components/render-auth/auth-dialog.vue.css +2 -2
- package/dist/components/render-auto-height-textarea/index.vue.css +26 -26
- package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
- package/dist/components/render-auto-refresh/index.vue.css +30 -30
- package/dist/components/render-auto-refresh/index.vue.js +1 -1
- package/dist/components/render-card/agent/corner-badge.script.vue.js.js +50 -0
- package/dist/components/render-card/agent/corner-badge.vue.css +9 -0
- package/dist/components/render-card/agent/corner-badge.vue.d.ts +14 -0
- package/dist/components/render-card/agent/corner-badge.vue.js +5 -0
- package/dist/components/render-card/agent/index.script.vue.js.js +12 -1
- package/dist/components/render-card/agent/index.vue.d.ts +1 -1
- package/dist/components/render-card/agent/prefix-info-tool.vue.css +18 -18
- package/dist/components/render-card/agent/prefix-info-tool.vue.js +1 -1
- package/dist/components/render-card/base/collection-icon.script.vue.js.js +3 -16
- package/dist/components/render-card/base/collection-icon.vue.d.ts +0 -1
- package/dist/components/render-card/base.vue.css +30 -30
- package/dist/components/render-card/base.vue.js +1 -1
- package/dist/components/render-card/knowledge/index.vue.d.ts +1 -1
- package/dist/components/render-card/knowledgebase/index.vue.d.ts +1 -1
- package/dist/components/render-card/llm/corner-badge.vue.css +12 -12
- package/dist/components/render-card/llm/corner-badge.vue.js +1 -1
- package/dist/components/render-card/llm/icons.vue.css +3 -3
- package/dist/components/render-card/llm/icons.vue.js +1 -1
- package/dist/components/render-card/llm/index.vue.d.ts +1 -1
- package/dist/components/render-card/llm/info.vue.css +8 -8
- package/dist/components/render-card/llm/info.vue.js +1 -1
- package/dist/components/render-card/llm/tag-prefix.vue.css +5 -5
- package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
- package/dist/components/render-card/mcp/index.script.vue.js.js +1 -1
- package/dist/components/render-card/mcp/index.vue.d.ts +1 -1
- package/dist/components/render-card/mcp/name-suffix.vue.css +7 -7
- package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
- package/dist/components/render-card/mcp/selected-tools-info.vue.d.ts +1 -1
- package/dist/components/render-card/prompt/icons.vue.css +2 -2
- package/dist/components/render-card/prompt/icons.vue.js +1 -1
- package/dist/components/render-card/prompt/index.script.vue.js.js +7 -2
- package/dist/components/render-card/prompt/index.vue.d.ts +2 -1
- package/dist/components/render-card/role/index.script.vue.js.js +7 -2
- package/dist/components/render-card/role/index.vue.d.ts +2 -1
- package/dist/components/render-card/skill/index.script.vue.js.js +1 -1
- package/dist/components/render-card/skill/scanner.vue.css +7 -7
- package/dist/components/render-card/skill/scanner.vue.js +1 -1
- package/dist/components/render-card/tool/index.script.vue.js.js +7 -2
- package/dist/components/render-card/tool/index.vue.d.ts +2 -1
- package/dist/components/render-checkbox/index.vue.css +41 -41
- package/dist/components/render-checkbox/index.vue.js +1 -1
- package/dist/components/render-choose-tag/index.vue.css +29 -29
- package/dist/components/render-choose-tag/index.vue.js +1 -1
- package/dist/components/render-collapse/index.vue.css +6 -6
- package/dist/components/render-collapse/index.vue.js +1 -1
- package/dist/components/render-collection/content/index.vue.css +15 -15
- package/dist/components/render-collection/content/index.vue.js +1 -1
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +10 -10
- package/dist/components/render-dataset/components/batch-delete-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/edit-dataset-data/index.vue.css +9 -9
- 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 +10 -10
- 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 +8 -8
- 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 +8 -8
- 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 +2 -2
- 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 +6 -6
- 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 +3 -3
- 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 +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/manual.vue.css +4 -4
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +21 -21
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset-detail-origin-data/index.vue.css +9 -9
- package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
- package/dist/components/render-dataset-list/components/main.vue.css +9 -9
- package/dist/components/render-dataset-list/components/main.vue.js +1 -1
- package/dist/components/render-dataset-list/index.vue.css +4 -4
- package/dist/components/render-dataset-list/index.vue.js +1 -1
- package/dist/components/render-dialog/choose-resource.vue.css +4 -4
- package/dist/components/render-dialog/choose-resource.vue.js +1 -1
- package/dist/components/render-dialog/choose-result.vue.css +31 -31
- package/dist/components/render-dialog/choose-result.vue.js +1 -1
- package/dist/components/render-dialog/choose-space.vue.css +18 -18
- package/dist/components/render-dialog/choose-space.vue.js +1 -1
- package/dist/components/render-dialog/index.vue.css +12 -12
- package/dist/components/render-dialog/index.vue.js +1 -1
- package/dist/components/render-dropdown/index.vue.css +15 -15
- package/dist/components/render-file-card/index.vue.css +28 -28
- package/dist/components/render-file-card/index.vue.d.ts +1 -1
- package/dist/components/render-file-card/index.vue.js +1 -1
- package/dist/components/render-file-type-icon/index.vue.css +7 -7
- package/dist/components/render-file-type-icon/index.vue.js +1 -1
- package/dist/components/render-generate-tag/index.vue.css +12 -12
- package/dist/components/render-generate-tag/index.vue.js +1 -1
- package/dist/components/render-knowledge/icon/index.vue.css +2 -2
- package/dist/components/render-knowledge/icon/index.vue.js +1 -1
- package/dist/components/render-markdown/edit.postcss.css +92 -92
- package/dist/components/render-markdown/katex.ts.js +8 -8
- package/dist/components/render-markdown/prism-atom-one-dark.postcss.css +192 -192
- package/dist/components/render-markdown/view.postcss.css +99 -99
- package/dist/components/render-permission-tag/index.vue.css +2 -2
- package/dist/components/render-prompt/content/index.vue.css +5 -5
- package/dist/components/render-prompt/content/index.vue.js +1 -1
- package/dist/components/render-reference/index.vue.css +4 -4
- package/dist/components/render-reference/index.vue.js +1 -1
- package/dist/components/render-resource-version/index.vue.css +7 -7
- package/dist/components/render-resource-version/index.vue.js +1 -1
- package/dist/components/render-router-tab/index.vue.css +15 -15
- package/dist/components/render-router-tab/index.vue.js +1 -1
- package/dist/components/render-search-empty/index.script.vue.js.js +2 -3
- package/dist/components/render-search-empty/index.vue.d.ts +1 -1
- package/dist/components/render-search-select/index.vue.d.ts +1 -1
- package/dist/components/render-select-plus-extension/index.vue.css +11 -11
- package/dist/components/render-select-plus-extension/index.vue.js +1 -1
- package/dist/components/render-t-table/index.script.vue.js +5 -8
- package/dist/components/render-t-table/index.vue.css +117 -117
- package/dist/components/render-t-table/index.vue.d.ts +1 -1
- package/dist/components/render-t-table/index.vue.js +1 -1
- package/dist/components/render-tag-tree/index.vue.css +17 -17
- package/dist/components/render-tag-tree/index.vue.js +1 -1
- package/dist/components/render-tags/index.vue.css +12 -12
- package/dist/components/render-tags/index.vue.js +1 -1
- package/dist/components/render-tree/index.vue.css +12 -12
- package/dist/components/render-tree/index.vue.d.ts +1 -1
- package/dist/css/fonts/iconcool.svg +268 -268
- package/dist/css/g-utilities.css +40 -10
- package/dist/css/g-utilities.manifest.json +6 -0
- package/dist/css/style.css +259 -259
- package/dist/hooks/use-agent-http.d.ts +1 -0
- package/dist/hooks/use-agent-http.ts.js +9 -2
- package/dist/hooks/use-ellipsis-tooltip.ts.js +28 -28
- package/dist/hooks/use-loading-version.ts.js +4 -4
- package/dist/http/helper/agent.d.ts +7 -1
- package/dist/http/helper/agent.ts.js +60 -44
- package/dist/http/helper/collection.ts.js +13 -12
- package/dist/http/helper/common.ts.js +44 -44
- package/dist/http/helper/dataset.ts.js +76 -76
- package/dist/http/helper/knowledge.ts.js +45 -45
- package/dist/http/helper/mcp.ts.js +36 -36
- package/dist/http/helper/permission.ts.js +12 -12
- package/dist/http/helper/prompt.ts.js +13 -12
- package/dist/http/helper/skill.ts.js +24 -24
- package/dist/http/helper/space.ts.js +24 -24
- package/dist/http/helper/tool.ts.js +22 -20
- package/dist/types/agent.d.ts +18 -0
- package/dist/types/collection.d.ts +2 -0
- package/dist/types/prompt.d.ts +2 -0
- package/dist/types/tool.d.ts +2 -0
- package/package.json +112 -112
|
@@ -51,7 +51,7 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
53
|
import fetch, { withAbort } from '../http/fetch/index.ts.js';
|
|
54
|
-
import { transferAgentApi2Agent, transferAgentApigwMcpPermissionApi2AgentApigwMcpPermission, transferAgentCommandApi2AgentCommand, transferAgentCount2AgentCountApi, transferAgentForm2AgentFormApi, transferAgentListParam2AgentListParamApi, transferPaginationResponseApi2PaginationResponse, transferReferringAgentApi2ReferringAgent, transferResourceApply2ResourceApplyApi, transferResourceApplyApi2ResourceApply, transferResourceCountApi2ResourceCount } from '../transforms.ts.js';
|
|
54
|
+
import { transferAgentApi2Agent, transferAgentApigwMcpPermissionApi2AgentApigwMcpPermission, transferAgentCommandApi2AgentCommand, transferAgentCount2AgentCountApi, transferAgentForm2AgentFormApi, transferAgentListParam2AgentListParamApi, transferAgentSdkUpgradeApi2AgentSdkUpgrade, transferPaginationResponseApi2PaginationResponse, transferReferringAgentApi2ReferringAgent, transferResourceApply2ResourceApplyApi, transferResourceApplyApi2ResourceApply, transferResourceCountApi2ResourceCount } from '../transforms.ts.js';
|
|
55
55
|
export const useAgentHttp = (apiPrefix, spaceId)=>{
|
|
56
56
|
// 获取 Agent 列表
|
|
57
57
|
const getAgentList = withAbort((signal, param, config)=>fetch.get(`${apiPrefix}/agent/v1/agent/`, transferAgentListParam2AgentListParamApi(param), _object_spread_props(_object_spread({
|
|
@@ -146,6 +146,12 @@ export const useAgentHttp = (apiPrefix, spaceId)=>{
|
|
|
146
146
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
147
147
|
}
|
|
148
148
|
});
|
|
149
|
+
// 获取智能体 SDK 升级信息
|
|
150
|
+
const getAgentSdkUpgrade = (id)=>fetch.get(`${apiPrefix}/agent/v1/agent/${id}/sdk_upgrade/`, undefined, {
|
|
151
|
+
headers: {
|
|
152
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
153
|
+
}
|
|
154
|
+
}).then(transferAgentSdkUpgradeApi2AgentSdkUpgrade);
|
|
149
155
|
return {
|
|
150
156
|
getAgentList,
|
|
151
157
|
getAgent,
|
|
@@ -159,6 +165,7 @@ export const useAgentHttp = (apiPrefix, spaceId)=>{
|
|
|
159
165
|
getAgentReferringAgents,
|
|
160
166
|
getAgentMcpPermission,
|
|
161
167
|
addAgentFavorite,
|
|
162
|
-
removeAgentFavorite
|
|
168
|
+
removeAgentFavorite,
|
|
169
|
+
getAgentSdkUpgrade
|
|
163
170
|
};
|
|
164
171
|
};
|
|
@@ -11,34 +11,34 @@ export const useEllipsisTooltip = ()=>{
|
|
|
11
11
|
};
|
|
12
12
|
const handleInitStyle = ()=>{
|
|
13
13
|
const style = document.createElement('style');
|
|
14
|
-
style.textContent = `
|
|
15
|
-
.tippy-box[data-theme~='ellipsis-tooltip'] .tippy-content {
|
|
16
|
-
font-size: 12px !important;
|
|
17
|
-
padding: 7px 14px !important;
|
|
18
|
-
white-space: pre-wrap !important;
|
|
19
|
-
max-height: 400px;
|
|
20
|
-
overflow-y: auto;
|
|
21
|
-
}
|
|
22
|
-
.tippy-box[data-theme~='ellipsis-tooltip'] .tippy-content::-webkit-scrollbar {
|
|
23
|
-
width: 6px;
|
|
24
|
-
height: 6px;
|
|
25
|
-
}
|
|
26
|
-
.tippy-box[data-theme~='ellipsis-tooltip'] .tippy-content::-webkit-scrollbar-thumb {
|
|
27
|
-
width: 6px;
|
|
28
|
-
height: 6px;
|
|
29
|
-
border-radius: 3px;
|
|
30
|
-
background-color: #dcdee5;
|
|
31
|
-
|
|
32
|
-
&:hover {
|
|
33
|
-
background-color: #979ba5;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
.tippy-box[data-theme~='ellipsis-tooltip'][data-placement^=top]>.tippy-arrow:before {
|
|
37
|
-
bottom: -5px !important;
|
|
38
|
-
}
|
|
39
|
-
.tippy-box[data-theme~='ellipsis-tooltip'][data-placement^=bottom]>.tippy-arrow:before {
|
|
40
|
-
top: -5px !important;
|
|
41
|
-
}
|
|
14
|
+
style.textContent = `
|
|
15
|
+
.tippy-box[data-theme~='ellipsis-tooltip'] .tippy-content {
|
|
16
|
+
font-size: 12px !important;
|
|
17
|
+
padding: 7px 14px !important;
|
|
18
|
+
white-space: pre-wrap !important;
|
|
19
|
+
max-height: 400px;
|
|
20
|
+
overflow-y: auto;
|
|
21
|
+
}
|
|
22
|
+
.tippy-box[data-theme~='ellipsis-tooltip'] .tippy-content::-webkit-scrollbar {
|
|
23
|
+
width: 6px;
|
|
24
|
+
height: 6px;
|
|
25
|
+
}
|
|
26
|
+
.tippy-box[data-theme~='ellipsis-tooltip'] .tippy-content::-webkit-scrollbar-thumb {
|
|
27
|
+
width: 6px;
|
|
28
|
+
height: 6px;
|
|
29
|
+
border-radius: 3px;
|
|
30
|
+
background-color: #dcdee5;
|
|
31
|
+
|
|
32
|
+
&:hover {
|
|
33
|
+
background-color: #979ba5;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
.tippy-box[data-theme~='ellipsis-tooltip'][data-placement^=top]>.tippy-arrow:before {
|
|
37
|
+
bottom: -5px !important;
|
|
38
|
+
}
|
|
39
|
+
.tippy-box[data-theme~='ellipsis-tooltip'][data-placement^=bottom]>.tippy-arrow:before {
|
|
40
|
+
top: -5px !important;
|
|
41
|
+
}
|
|
42
42
|
`;
|
|
43
43
|
document.head.appendChild(style);
|
|
44
44
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
|
-
/**
|
|
3
|
-
* 解决 abort + loading 的竞态问题:
|
|
4
|
-
* 当快速连续调用时,前一次请求被 abort 后其 finally 会错误地将 loading 设为 false,
|
|
5
|
-
* 而新请求仍在进行中。通过版本号确保只有最新一次调用才能结束 loading 状态。
|
|
2
|
+
/**
|
|
3
|
+
* 解决 abort + loading 的竞态问题:
|
|
4
|
+
* 当快速连续调用时,前一次请求被 abort 后其 finally 会错误地将 loading 设为 false,
|
|
5
|
+
* 而新请求仍在进行中。通过版本号确保只有最新一次调用才能结束 loading 状态。
|
|
6
6
|
*/ export const useLoadingVersion = ()=>{
|
|
7
7
|
let version = 0;
|
|
8
8
|
const loading = ref(false);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAgent, IAgentApi, IAgentApigwMcpPermission, IAgentApigwMcpPermissionApi, IAgentCommand, IAgentCommandApi, IAgentCountParam, IAgentCountParamApi, IAgentForm, IAgentFormApi, IAgentListParam, IAgentListParamApi, IApprovalSetting, IApprovalSettingApi, IResourceApply, IResourceApplyApi } from '@/types/agent';
|
|
1
|
+
import type { IAgent, IAgentApi, IAgentApigwMcpPermission, IAgentApigwMcpPermissionApi, IAgentCommand, IAgentCommandApi, IAgentCountParam, IAgentCountParamApi, IAgentForm, IAgentFormApi, IAgentListParam, IAgentListParamApi, IAgentSdkUpgrade, IAgentSdkUpgradeApi, IApprovalSetting, IApprovalSettingApi, IResourceApply, IResourceApplyApi } from '@/types/agent';
|
|
2
2
|
/**
|
|
3
3
|
* 接口转换为ui使用
|
|
4
4
|
* @param data IAgentCommandApi
|
|
@@ -55,6 +55,12 @@ export declare const transferAgentCount2AgentCountApi: (data: IAgentCountParam)
|
|
|
55
55
|
* @returns IAgentApigwMcpPermission
|
|
56
56
|
*/
|
|
57
57
|
export declare const transferAgentApigwMcpPermissionApi2AgentApigwMcpPermission: (data: IAgentApigwMcpPermissionApi) => IAgentApigwMcpPermission;
|
|
58
|
+
/**
|
|
59
|
+
* 接口转换为ui使用(智能体发布页,置顶告知可更新)
|
|
60
|
+
* @param data IAgentSdkUpgradeApi
|
|
61
|
+
* @returns IAgentSdkUpgrade
|
|
62
|
+
*/
|
|
63
|
+
export declare const transferAgentSdkUpgradeApi2AgentSdkUpgrade: (data: IAgentSdkUpgradeApi) => IAgentSdkUpgrade;
|
|
58
64
|
/**
|
|
59
65
|
* ui转换为接口使用(配置审批)
|
|
60
66
|
* @param data IApprovalSetting,
|
|
@@ -55,10 +55,10 @@ import { transferKnowledge, transferKnowledgeApi, transferKnowledgebase, transfe
|
|
|
55
55
|
import { transferMcp2McpApi, transferMcpApi2Mcp } from './mcp.ts.js';
|
|
56
56
|
import { transferSkill2SkillApi, transferSkillApi2Skill } from './skill.ts.js';
|
|
57
57
|
import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
|
|
58
|
-
/**
|
|
59
|
-
* 接口转换为ui使用
|
|
60
|
-
* @param data IAgentCommandApi
|
|
61
|
-
* @returns IAgentCommand
|
|
58
|
+
/**
|
|
59
|
+
* 接口转换为ui使用
|
|
60
|
+
* @param data IAgentCommandApi
|
|
61
|
+
* @returns IAgentCommand
|
|
62
62
|
*/ export const transferAgentCommandApi2AgentCommand = (data)=>{
|
|
63
63
|
return {
|
|
64
64
|
id: data.id,
|
|
@@ -93,10 +93,10 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
|
|
|
93
93
|
}))
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
|
-
/**
|
|
97
|
-
* ui转换为接口使用
|
|
98
|
-
* @param data IAgentCommand
|
|
99
|
-
* @returns IAgentCommandApi
|
|
96
|
+
/**
|
|
97
|
+
* ui转换为接口使用
|
|
98
|
+
* @param data IAgentCommand
|
|
99
|
+
* @returns IAgentCommandApi
|
|
100
100
|
*/ export const transferAgentCommand2AgentCommandApi = (data)=>{
|
|
101
101
|
const result = {
|
|
102
102
|
id: data.id,
|
|
@@ -132,10 +132,10 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
|
|
|
132
132
|
};
|
|
133
133
|
return result;
|
|
134
134
|
};
|
|
135
|
-
/**
|
|
136
|
-
* ui转换为接口使用(表单字段)
|
|
137
|
-
* @param data IAgentForm
|
|
138
|
-
* @returns IAgentFormApi
|
|
135
|
+
/**
|
|
136
|
+
* ui转换为接口使用(表单字段)
|
|
137
|
+
* @param data IAgentForm
|
|
138
|
+
* @returns IAgentFormApi
|
|
139
139
|
*/ export const transferAgentForm2AgentFormApi = (data)=>{
|
|
140
140
|
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;
|
|
141
141
|
var _data_conversationSettings_openingRemark, _data_conversationSettings_predefinedQuestions;
|
|
@@ -198,10 +198,10 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
|
|
|
198
198
|
business_ids: data.businessIds
|
|
199
199
|
});
|
|
200
200
|
};
|
|
201
|
-
/**
|
|
202
|
-
* 接口转换为ui使用(表单字段)
|
|
203
|
-
* @param data IAgentFormApi
|
|
204
|
-
* @returns IAgentForm
|
|
201
|
+
/**
|
|
202
|
+
* 接口转换为ui使用(表单字段)
|
|
203
|
+
* @param data IAgentFormApi
|
|
204
|
+
* @returns IAgentForm
|
|
205
205
|
*/ export const transferAgentFormApi2AgentForm = (data)=>{
|
|
206
206
|
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;
|
|
207
207
|
var _data_conversation_settings_opening_remark, _data_conversation_settings_predefined_questions;
|
|
@@ -264,11 +264,14 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
|
|
|
264
264
|
businessIds: data.business_ids
|
|
265
265
|
});
|
|
266
266
|
};
|
|
267
|
-
/**
|
|
268
|
-
* 接口转换为ui使用(完整资源)
|
|
269
|
-
* @param data IAgentApi
|
|
270
|
-
* @returns IAgent
|
|
267
|
+
/**
|
|
268
|
+
* 接口转换为ui使用(完整资源)
|
|
269
|
+
* @param data IAgentApi
|
|
270
|
+
* @returns IAgent
|
|
271
271
|
*/ export const transferAgentApi2Agent = (data)=>_object_spread_props(_object_spread({}, transferAgentFormApi2AgentForm(data), transferResourceCommonApi2ResourceCommon(data)), {
|
|
272
|
+
needUpgrade: data.need_upgrade,
|
|
273
|
+
agentSdkVersion: data.agent_sdk_version,
|
|
274
|
+
latestSdkVersion: data.latest_sdk_version,
|
|
272
275
|
version: data.version,
|
|
273
276
|
latestVersion: data.latest_version,
|
|
274
277
|
agentUrl: data.agent_url,
|
|
@@ -289,11 +292,14 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
|
|
|
289
292
|
observability: data.paasv3_pages.observability
|
|
290
293
|
} : undefined
|
|
291
294
|
});
|
|
292
|
-
/**
|
|
293
|
-
* ui转换为接口使用(完整资源)
|
|
294
|
-
* @param data IAgent
|
|
295
|
-
* @returns IAgentApi
|
|
295
|
+
/**
|
|
296
|
+
* ui转换为接口使用(完整资源)
|
|
297
|
+
* @param data IAgent
|
|
298
|
+
* @returns IAgentApi
|
|
296
299
|
*/ export const transferAgent2AgentApi = (data)=>_object_spread_props(_object_spread({}, transferAgentForm2AgentFormApi(data), transferResourceCommon2ResourceCommonApi(data)), {
|
|
300
|
+
need_upgrade: data.needUpgrade,
|
|
301
|
+
agent_sdk_version: data.agentSdkVersion,
|
|
302
|
+
latest_sdk_version: data.latestSdkVersion,
|
|
297
303
|
version: data.version,
|
|
298
304
|
latest_version: data.latestVersion,
|
|
299
305
|
agent_url: data.agentUrl,
|
|
@@ -313,10 +319,10 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
|
|
|
313
319
|
observability: data.paasv3Pages.observability
|
|
314
320
|
} : undefined
|
|
315
321
|
});
|
|
316
|
-
/**
|
|
317
|
-
* ui 转换为接口使用
|
|
318
|
-
* @param data IAgentListParam
|
|
319
|
-
* @returns IAgentListParamApi
|
|
322
|
+
/**
|
|
323
|
+
* ui 转换为接口使用
|
|
324
|
+
* @param data IAgentListParam
|
|
325
|
+
* @returns IAgentListParamApi
|
|
320
326
|
*/ export const transferAgentListParam2AgentListParamApi = (data)=>_object_spread_props(_object_spread({}, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi(data), transferISortParam2ISortParamApi(data), transferIPaginationParam2IPaginationParamApi(data)), {
|
|
321
327
|
agent_type: data.agentType,
|
|
322
328
|
fuzzy: data.fuzzy,
|
|
@@ -334,10 +340,10 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
|
|
|
334
340
|
agent_version: data.agentVersion,
|
|
335
341
|
group_type: data.groupType
|
|
336
342
|
});
|
|
337
|
-
/**
|
|
338
|
-
* ui转换为接口使用
|
|
339
|
-
* @param data IResourceApply[]
|
|
340
|
-
* @returns IResourceApplyApi[]
|
|
343
|
+
/**
|
|
344
|
+
* ui转换为接口使用
|
|
345
|
+
* @param data IResourceApply[]
|
|
346
|
+
* @returns IResourceApplyApi[]
|
|
341
347
|
*/ export const transferResourceApply2ResourceApplyApi = (data)=>data.map((item)=>({
|
|
342
348
|
resource_type: item.resourceType,
|
|
343
349
|
resource_code: item.resourceCode
|
|
@@ -354,10 +360,10 @@ export const transferAgentCount2AgentCountApi = (data)=>{
|
|
|
354
360
|
is_published: data.isPublished
|
|
355
361
|
});
|
|
356
362
|
};
|
|
357
|
-
/**
|
|
358
|
-
* 接口转换为ui使用
|
|
359
|
-
* @param data IAgentApigwMcpPermissionApi
|
|
360
|
-
* @returns IAgentApigwMcpPermission
|
|
363
|
+
/**
|
|
364
|
+
* 接口转换为ui使用
|
|
365
|
+
* @param data IAgentApigwMcpPermissionApi
|
|
366
|
+
* @returns IAgentApigwMcpPermission
|
|
361
367
|
*/ export const transferAgentApigwMcpPermissionApi2AgentApigwMcpPermission = (data)=>({
|
|
362
368
|
status: data.status,
|
|
363
369
|
hasPermission: data.has_permission,
|
|
@@ -366,20 +372,30 @@ export const transferAgentCount2AgentCountApi = (data)=>{
|
|
|
366
372
|
url: data.url,
|
|
367
373
|
protocolType: data.protocol_type
|
|
368
374
|
});
|
|
369
|
-
/**
|
|
370
|
-
* ui
|
|
371
|
-
* @param data
|
|
372
|
-
* @returns
|
|
375
|
+
/**
|
|
376
|
+
* 接口转换为ui使用(智能体发布页,置顶告知可更新)
|
|
377
|
+
* @param data IAgentSdkUpgradeApi
|
|
378
|
+
* @returns IAgentSdkUpgrade
|
|
379
|
+
*/ export const transferAgentSdkUpgradeApi2AgentSdkUpgrade = (data)=>({
|
|
380
|
+
currentSdkVersion: data.current_sdk_version,
|
|
381
|
+
latestSdkVersion: data.latest_sdk_version,
|
|
382
|
+
needUpgrade: data.need_upgrade,
|
|
383
|
+
changelog: data.changelog
|
|
384
|
+
});
|
|
385
|
+
/**
|
|
386
|
+
* ui转换为接口使用(配置审批)
|
|
387
|
+
* @param data IApprovalSetting,
|
|
388
|
+
* @returns IApprovalSettingApi
|
|
373
389
|
*/ export const transferIApprovalSetting2IApprovalSettingApi = (data)=>({
|
|
374
390
|
strategy_id: data.strategyId,
|
|
375
391
|
approval_name: data.approvalName,
|
|
376
392
|
approvers: data.approvers,
|
|
377
393
|
is_default: data.isDefault
|
|
378
394
|
});
|
|
379
|
-
/**
|
|
380
|
-
* 接口转换为ui使用(配置审批)
|
|
381
|
-
* @param data IApprovalSettingApi
|
|
382
|
-
* @returns IApprovalSetting
|
|
395
|
+
/**
|
|
396
|
+
* 接口转换为ui使用(配置审批)
|
|
397
|
+
* @param data IApprovalSettingApi
|
|
398
|
+
* @returns IApprovalSetting
|
|
383
399
|
*/ export const transferIApprovalSettingApi2IApprovalSetting = (data)=>({
|
|
384
400
|
strategyId: data.strategy_id,
|
|
385
401
|
approvalName: data.approval_name,
|
|
@@ -51,10 +51,10 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
53
|
import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortParamApi, transferResourceCommonApi2ResourceCommon, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi, transferVariableApi2Variable } from './common.ts.js';
|
|
54
|
-
/**
|
|
55
|
-
* ui转换为接口使用
|
|
56
|
-
* @param data ICollectionListParam
|
|
57
|
-
* @returns ICollectionListParamApi
|
|
54
|
+
/**
|
|
55
|
+
* ui转换为接口使用
|
|
56
|
+
* @param data ICollectionListParam
|
|
57
|
+
* @returns ICollectionListParamApi
|
|
58
58
|
*/ export const transferCollectionListParam2CollectionListParamApi = (data)=>{
|
|
59
59
|
return _object_spread_props(_object_spread({}, transferResourceCommonSearchParams2ResourceCommonSearchParamsApi(data), transferIPaginationParam2IPaginationParamApi(data), transferISortParam2ISortParamApi(data)), {
|
|
60
60
|
fuzzy: data.fuzzy,
|
|
@@ -76,24 +76,25 @@ import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPag
|
|
|
76
76
|
group_type: data.groupType
|
|
77
77
|
});
|
|
78
78
|
};
|
|
79
|
-
/**
|
|
80
|
-
* 接口转换为ui使用(表单字段,Collection 的 Omit<IResourceFormCommon, 'description'> 需手动映射公共字段)
|
|
81
|
-
* @param data ICollectionFormApi
|
|
82
|
-
* @returns ICollectionForm
|
|
79
|
+
/**
|
|
80
|
+
* 接口转换为ui使用(表单字段,Collection 的 Omit<IResourceFormCommon, 'description'> 需手动映射公共字段)
|
|
81
|
+
* @param data ICollectionFormApi
|
|
82
|
+
* @returns ICollectionForm
|
|
83
83
|
*/ export const transferCollectionFormApi2CollectionForm = (data)=>({
|
|
84
84
|
tagNames: data.tag_names,
|
|
85
85
|
generateType: data.generate_type,
|
|
86
86
|
isPublic: data.is_public,
|
|
87
87
|
name: data.collection_name,
|
|
88
88
|
code: data.collection_code,
|
|
89
|
+
icon: data.icon,
|
|
89
90
|
defaultLLMCode: data.default_llm_code,
|
|
90
91
|
variables: data.variables.map(transferVariableApi2Variable),
|
|
91
92
|
content: data.content
|
|
92
93
|
});
|
|
93
|
-
/**
|
|
94
|
-
* 接口转换为ui使用(完整资源)
|
|
95
|
-
* @param data ICollectionApi
|
|
96
|
-
* @returns ICollection
|
|
94
|
+
/**
|
|
95
|
+
* 接口转换为ui使用(完整资源)
|
|
96
|
+
* @param data ICollectionApi
|
|
97
|
+
* @returns ICollection
|
|
97
98
|
*/ export const transferCollectionApi2Collection = (data)=>{
|
|
98
99
|
var _data_collection_id, _ref, _data_ref_count;
|
|
99
100
|
return _object_spread_props(_object_spread({}, transferCollectionFormApi2CollectionForm(data), transferResourceCommonApi2ResourceCommon(data)), {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { transferResourcePermission2ResourcePermissionApi, transferResourcePermissionApi2ResourcePermission } from './permission.ts.js';
|
|
2
|
-
/**
|
|
3
|
-
* 接口转换为ui使用
|
|
4
|
-
* @param data ITagsTreeApi
|
|
5
|
-
* @returns ITagsTree
|
|
2
|
+
/**
|
|
3
|
+
* 接口转换为ui使用
|
|
4
|
+
* @param data ITagsTreeApi
|
|
5
|
+
* @returns ITagsTree
|
|
6
6
|
*/ export const transferTagTreeApi2TagTree = (data)=>{
|
|
7
7
|
return {
|
|
8
8
|
all: data.all,
|
|
9
9
|
tree: data.tree.map(transferTagTreeNodeApi2TagTreeNode)
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
/**
|
|
13
|
-
* 接口转换为ui使用
|
|
14
|
-
* @param data ITagsTreeNodeApi
|
|
15
|
-
* @returns ITagsTreeNode
|
|
12
|
+
/**
|
|
13
|
+
* 接口转换为ui使用
|
|
14
|
+
* @param data ITagsTreeNodeApi
|
|
15
|
+
* @returns ITagsTreeNode
|
|
16
16
|
*/ export const transferTagTreeNodeApi2TagTreeNode = (data)=>{
|
|
17
17
|
var _data_children;
|
|
18
18
|
return {
|
|
@@ -24,50 +24,50 @@ import { transferResourcePermission2ResourcePermissionApi, transferResourcePermi
|
|
|
24
24
|
children: (_data_children = data.children) === null || _data_children === void 0 ? void 0 : _data_children.map(transferTagTreeNodeApi2TagTreeNode)
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
/**
|
|
28
|
-
* ui转换为接口使用
|
|
29
|
-
* @param data IPaginationParam
|
|
30
|
-
* @returns IPaginationParamApi
|
|
27
|
+
/**
|
|
28
|
+
* ui转换为接口使用
|
|
29
|
+
* @param data IPaginationParam
|
|
30
|
+
* @returns IPaginationParamApi
|
|
31
31
|
*/ export const transferIPaginationParam2IPaginationParamApi = (data)=>{
|
|
32
32
|
return {
|
|
33
33
|
page: data === null || data === void 0 ? void 0 : data.page,
|
|
34
34
|
page_size: data === null || data === void 0 ? void 0 : data.pageSize
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
|
-
/**
|
|
38
|
-
* ui转换为接口使用
|
|
39
|
-
* @param data ISortParam
|
|
40
|
-
* @returns ISortParamApi
|
|
37
|
+
/**
|
|
38
|
+
* ui转换为接口使用
|
|
39
|
+
* @param data ISortParam
|
|
40
|
+
* @returns ISortParamApi
|
|
41
41
|
*/ export const transferISortParam2ISortParamApi = (data)=>{
|
|
42
42
|
return {
|
|
43
43
|
order_by: data === null || data === void 0 ? void 0 : data.orderBy,
|
|
44
44
|
order_method: data === null || data === void 0 ? void 0 : data.orderMethod
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
|
-
/**
|
|
48
|
-
* 接口转换为ui使用(表单公共字段)
|
|
49
|
-
* @param data IResourceFormCommonApi
|
|
50
|
-
* @returns IResourceFormCommon
|
|
47
|
+
/**
|
|
48
|
+
* 接口转换为ui使用(表单公共字段)
|
|
49
|
+
* @param data IResourceFormCommonApi
|
|
50
|
+
* @returns IResourceFormCommon
|
|
51
51
|
*/ export const transferResourceFormCommonApi2ResourceFormCommon = (data)=>({
|
|
52
52
|
tagNames: data.tag_names,
|
|
53
53
|
generateType: data.generate_type,
|
|
54
54
|
isPublic: data.is_public,
|
|
55
55
|
description: data.description
|
|
56
56
|
});
|
|
57
|
-
/**
|
|
58
|
-
* ui转换为接口使用(表单公共字段)
|
|
59
|
-
* @param data IResourceFormCommon
|
|
60
|
-
* @returns IResourceFormCommonApi
|
|
57
|
+
/**
|
|
58
|
+
* ui转换为接口使用(表单公共字段)
|
|
59
|
+
* @param data IResourceFormCommon
|
|
60
|
+
* @returns IResourceFormCommonApi
|
|
61
61
|
*/ export const transferResourceFormCommon2ResourceFormCommonApi = (data)=>({
|
|
62
62
|
tag_names: data.tagNames,
|
|
63
63
|
generate_type: data.generateType,
|
|
64
64
|
is_public: data.isPublic,
|
|
65
65
|
description: data.description
|
|
66
66
|
});
|
|
67
|
-
/**
|
|
68
|
-
* 接口转换为ui使用(列表/详情公共字段,只转换 IResourceCommon 自己的字段)
|
|
69
|
-
* @param data IResourceCommonApi
|
|
70
|
-
* @returns IResourceCommon
|
|
67
|
+
/**
|
|
68
|
+
* 接口转换为ui使用(列表/详情公共字段,只转换 IResourceCommon 自己的字段)
|
|
69
|
+
* @param data IResourceCommonApi
|
|
70
|
+
* @returns IResourceCommon
|
|
71
71
|
*/ export const transferResourceCommonApi2ResourceCommon = (data)=>({
|
|
72
72
|
id: data.id,
|
|
73
73
|
createdBy: data.created_by,
|
|
@@ -82,10 +82,10 @@ import { transferResourcePermission2ResourcePermissionApi, transferResourcePermi
|
|
|
82
82
|
favoriteCount: data.favorite_count,
|
|
83
83
|
permission: transferResourcePermissionApi2ResourcePermission(data.permission)
|
|
84
84
|
});
|
|
85
|
-
/**
|
|
86
|
-
* ui转换为接口使用(完整资源)
|
|
87
|
-
* @param data IResourceCommon
|
|
88
|
-
* @returns IResourceCommonApi
|
|
85
|
+
/**
|
|
86
|
+
* ui转换为接口使用(完整资源)
|
|
87
|
+
* @param data IResourceCommon
|
|
88
|
+
* @returns IResourceCommonApi
|
|
89
89
|
*/ export const transferResourceCommon2ResourceCommonApi = (data)=>({
|
|
90
90
|
id: data.id,
|
|
91
91
|
created_by: data.createdBy,
|
|
@@ -100,10 +100,10 @@ import { transferResourcePermission2ResourcePermissionApi, transferResourcePermi
|
|
|
100
100
|
favorite_count: data.favoriteCount,
|
|
101
101
|
permission: transferResourcePermission2ResourcePermissionApi(data.permission)
|
|
102
102
|
});
|
|
103
|
-
/**
|
|
104
|
-
* 分页接口响应转换为ui使用,通过传入的转换函数逐项转换列表数据
|
|
105
|
-
* @param transferItem 单项转换函数,将接口类型 A 转换为ui类型 U
|
|
106
|
-
* @returns 将 IPaginationResponseApi<A> 转换为 IPaginationResponse<U> 的函数
|
|
103
|
+
/**
|
|
104
|
+
* 分页接口响应转换为ui使用,通过传入的转换函数逐项转换列表数据
|
|
105
|
+
* @param transferItem 单项转换函数,将接口类型 A 转换为ui类型 U
|
|
106
|
+
* @returns 将 IPaginationResponseApi<A> 转换为 IPaginationResponse<U> 的函数
|
|
107
107
|
*/ export const transferPaginationResponseApi2PaginationResponse = (transferItem)=>(data)=>({
|
|
108
108
|
count: data.count,
|
|
109
109
|
results: data.results.map(transferItem)
|
|
@@ -172,18 +172,18 @@ export const transferIResourceReferenceApi2IResourceReference = (data)=>{
|
|
|
172
172
|
spaceId: data.space_id
|
|
173
173
|
};
|
|
174
174
|
};
|
|
175
|
-
/**
|
|
176
|
-
* ui转换为接口使用(配置审批策略)
|
|
177
|
-
* @param data IApprovalSettingValue,
|
|
178
|
-
* @returns IApprovalSettingValueApi
|
|
175
|
+
/**
|
|
176
|
+
* ui转换为接口使用(配置审批策略)
|
|
177
|
+
* @param data IApprovalSettingValue,
|
|
178
|
+
* @returns IApprovalSettingValueApi
|
|
179
179
|
*/ export const transferIApprovalSettingValue2IApprovalSettingValueApi = (data)=>({
|
|
180
180
|
approval_enabled: data.approvalEnabled,
|
|
181
181
|
approval_strategy_id: data.approvalStrategyId
|
|
182
182
|
});
|
|
183
|
-
/**
|
|
184
|
-
* 接口转换为ui使用(配置审批策略)
|
|
185
|
-
* @param data IApprovalSettingValueApi
|
|
186
|
-
* @returns IApprovalSettingValue
|
|
183
|
+
/**
|
|
184
|
+
* 接口转换为ui使用(配置审批策略)
|
|
185
|
+
* @param data IApprovalSettingValueApi
|
|
186
|
+
* @returns IApprovalSettingValue
|
|
187
187
|
*/ export const transferIApprovalSettingValueApi2IApprovalSettingValue = (data)=>({
|
|
188
188
|
approvalEnabled: data.approval_enabled,
|
|
189
189
|
approvalStrategyId: data.approval_strategy_id
|