@blueking/ai-ui-sdk 0.3.0-beta.24 → 0.3.0-beta.25
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/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.vue.css +8 -8
- package/dist/components/render-auto-refresh/index.vue.js +1 -1
- 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.vue.css +12 -12
- package/dist/components/render-card/base.vue.js +1 -1
- 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.script.vue.js.js +22 -2
- 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/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 +6 -2
- package/dist/components/render-card/mcp/index.script.vue.js.js +3 -24
- package/dist/components/render-card/mcp/index.vue.d.ts +2 -5
- 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/prompt/icons.vue.css +1 -1
- package/dist/components/render-card/prompt/icons.vue.js +1 -1
- 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/index.script.vue.js.js +4 -12
- package/dist/components/render-card/tool/index.vue.d.ts +1 -4
- package/dist/components/render-card/tool/prefix-info-tool.script.vue.js.js +20 -70
- package/dist/components/render-card/tool/prefix-info-tool.vue.d.ts +0 -4
- 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/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.script.vue.js.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset/index.vue.css +1 -5
- 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.script.vue.js.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +1 -4
- 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.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.script.vue.js.js +2 -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-markdown/filter-css.ts.js +7 -2
- package/dist/components/render-mcp/install/index.script.vue.js.js +65 -36
- package/dist/components/render-mcp/install/index.vue.d.ts +4 -2
- package/dist/components/render-mcp/install/install-guide.script.vue.js.js +60 -0
- package/dist/components/render-mcp/install/install-guide.vue.d.ts +11 -0
- package/dist/components/render-mcp/install/install-guide.vue.js +3 -0
- 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-select-plus-extension/index.vue.css +3 -3
- package/dist/components/render-select-plus-extension/index.vue.js +1 -1
- package/dist/components/render-t-table/index.vue.css +28 -27
- 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 +1 -3
- package/dist/components.ts.js +1 -3
- 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 +9 -77
- package/dist/css/g-utilities.manifest.json +3 -20
- package/dist/hooks/use-chat.d.ts +0 -4
- package/dist/hooks/use-mcp-http.d.ts +5 -1
- package/dist/hooks/use-mcp-http.ts.js +16 -2
- package/dist/http/helper/agent.d.ts +1 -13
- package/dist/http/helper/agent.ts.js +2 -24
- package/dist/http/helper/common.d.ts +1 -13
- package/dist/http/helper/common.ts.js +0 -16
- package/dist/http/helper/mcp.d.ts +3 -1
- package/dist/http/helper/mcp.ts.js +16 -6
- package/dist/http/helper/model.ts.js +1 -0
- package/dist/http/helper/tool.ts.js +3 -3
- package/dist/types/agent.d.ts +0 -14
- package/dist/types/common.d.ts +0 -8
- package/dist/types/enum.d.ts +4 -0
- package/dist/types/enum.ts.js +5 -0
- package/dist/types/mcp.d.ts +24 -4
- package/dist/types/model.d.ts +2 -0
- package/dist/types/tool.d.ts +3 -3
- package/package.json +2 -2
- package/dist/components/render-card/base/approval-strategy-popover.script.vue.js.js +0 -198
- package/dist/components/render-card/base/approval-strategy-popover.vue.d.ts +0 -19
- package/dist/components/render-card/base/approval-strategy-popover.vue.js +0 -3
- package/dist/components/render-card/mcp/selected-tools-info.script.vue.js.js +0 -156
- package/dist/components/render-card/mcp/selected-tools-info.vue.d.ts +0 -26
- package/dist/components/render-card/mcp/selected-tools-info.vue.js +0 -3
package/dist/types/enum.d.ts
CHANGED
|
@@ -105,6 +105,10 @@ export declare enum SkillInstallTaskStatus {
|
|
|
105
105
|
Failed = "failed",
|
|
106
106
|
Cancelled = "cancelled"
|
|
107
107
|
}
|
|
108
|
+
export declare enum McpInstallTargetType {
|
|
109
|
+
Cursor = "cursor",
|
|
110
|
+
Openclaw = "openclaw"
|
|
111
|
+
}
|
|
108
112
|
export declare enum KnowledgePathType {
|
|
109
113
|
File = "file",
|
|
110
114
|
Folder = "folder"
|
package/dist/types/enum.ts.js
CHANGED
|
@@ -117,6 +117,11 @@ export var SkillInstallTaskStatus;
|
|
|
117
117
|
SkillInstallTaskStatus["Failed"] = "failed";
|
|
118
118
|
SkillInstallTaskStatus["Cancelled"] = "cancelled";
|
|
119
119
|
})(SkillInstallTaskStatus || (SkillInstallTaskStatus = {}));
|
|
120
|
+
export var McpInstallTargetType;
|
|
121
|
+
(function(McpInstallTargetType) {
|
|
122
|
+
McpInstallTargetType["Cursor"] = "cursor";
|
|
123
|
+
McpInstallTargetType["Openclaw"] = "openclaw";
|
|
124
|
+
})(McpInstallTargetType || (McpInstallTargetType = {}));
|
|
120
125
|
export var KnowledgePathType;
|
|
121
126
|
(function(KnowledgePathType) {
|
|
122
127
|
KnowledgePathType["File"] = "file";
|
package/dist/types/mcp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { EnumCharacter, McpType, Module, ToolCrdentialType } from './enum';
|
|
1
|
+
import type { IBaseCountParam, IBaseCountParamApi, IPaginationParam, IPaginationParamApi, IResourceCommon, IResourceCommonApi, IResourceCommonSearchParams, IResourceCommonSearchParamsApi, IResourceFormCommon, IResourceFormCommonApi, ISortParam, ISortParamApi } from './common';
|
|
2
|
+
import { EnumCharacter, McpInstallTargetType, McpType, Module, ToolCrdentialType } from './enum';
|
|
3
3
|
export interface IMcpListParamApi extends IPaginationParamApi, IResourceCommonSearchParamsApi, ISortParamApi {
|
|
4
4
|
created_by?: string;
|
|
5
5
|
updated_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 {
|
|
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 {
|
|
95
95
|
toolName: string;
|
|
96
96
|
toolCode: string;
|
|
97
97
|
toolDescription: string;
|
|
@@ -148,7 +148,27 @@ export interface IApplicationMcpApi extends IMcpApi {
|
|
|
148
148
|
}
|
|
149
149
|
export interface IMcpCountParam extends IBaseCountParam {
|
|
150
150
|
withApigwMcp: boolean;
|
|
151
|
+
agentCode?: string;
|
|
151
152
|
}
|
|
152
153
|
export interface IMcpCountParamApi extends IBaseCountParamApi {
|
|
153
154
|
with_apigw_mcp: boolean;
|
|
155
|
+
agent_code?: string;
|
|
156
|
+
}
|
|
157
|
+
export interface IMcpInstallGuideParamApi {
|
|
158
|
+
target_type: string;
|
|
159
|
+
mcp_type: McpType;
|
|
160
|
+
mcp_id: number;
|
|
161
|
+
}
|
|
162
|
+
export interface IMcpInstallGuideParam {
|
|
163
|
+
targetType: string;
|
|
164
|
+
mcpType: McpType;
|
|
165
|
+
mcpId: number;
|
|
166
|
+
}
|
|
167
|
+
export interface IMcpInstallTargetApi {
|
|
168
|
+
target_type: McpInstallTargetType;
|
|
169
|
+
display_name: string;
|
|
170
|
+
}
|
|
171
|
+
export interface IMcpInstallTarget {
|
|
172
|
+
targetType: McpInstallTargetType;
|
|
173
|
+
displayName: string;
|
|
154
174
|
}
|
package/dist/types/model.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface IModel {
|
|
|
18
18
|
like?: boolean;
|
|
19
19
|
dislikeCount?: number;
|
|
20
20
|
dislike?: boolean;
|
|
21
|
+
refCount?: number;
|
|
21
22
|
spaceAuthMode?: ModelSpaceAuthMode;
|
|
22
23
|
property?: {
|
|
23
24
|
onlyUserAssistant?: boolean;
|
|
@@ -76,6 +77,7 @@ export interface IModelApi {
|
|
|
76
77
|
like?: boolean;
|
|
77
78
|
dislike_count?: number;
|
|
78
79
|
dislike?: boolean;
|
|
80
|
+
ref_count?: number;
|
|
79
81
|
space_auth_mode?: ModelSpaceAuthMode;
|
|
80
82
|
property?: {
|
|
81
83
|
only_user_assistant?: boolean;
|
package/dist/types/tool.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { 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'> {
|
|
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 {
|
|
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.25",
|
|
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.9",
|
|
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",
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
-
import { normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, createElementVNode as _createElementVNode, withDirectives as _withDirectives, resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, withCtx as _withCtx, unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode } from "vue";
|
|
3
|
-
const _hoisted_1 = {
|
|
4
|
-
class: "g-pt-12 g-pr-16 g-pl-12 g-flex g-items-center g-justify-between g-mb-12"
|
|
5
|
-
};
|
|
6
|
-
const _hoisted_2 = {
|
|
7
|
-
class: "g-flex g-items-center g-gap-4"
|
|
8
|
-
};
|
|
9
|
-
const _hoisted_3 = {
|
|
10
|
-
key: 1,
|
|
11
|
-
class: "g-pl-16 g-pr-16 g-pb-12"
|
|
12
|
-
};
|
|
13
|
-
const _hoisted_4 = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "g-flex g-flex-col g-items-start g-gap-8 g-mt-12"
|
|
16
|
-
};
|
|
17
|
-
const _hoisted_5 = {
|
|
18
|
-
class: "g-flex g-flex-wrap g-gap-4"
|
|
19
|
-
};
|
|
20
|
-
const _hoisted_6 = {
|
|
21
|
-
key: 2,
|
|
22
|
-
class: "g-pl-16 g-text-12 g-text-normal g-mb-12"
|
|
23
|
-
};
|
|
24
|
-
const _hoisted_7 = {
|
|
25
|
-
class: "g-font-bold"
|
|
26
|
-
};
|
|
27
|
-
import { ref } from 'vue';
|
|
28
|
-
import { isEmpty } from '../../../common/util.ts.js';
|
|
29
|
-
export default /*@__PURE__*/ _defineComponent({
|
|
30
|
-
props: {
|
|
31
|
-
approvalEnabled: {
|
|
32
|
-
type: Boolean
|
|
33
|
-
},
|
|
34
|
-
approvalStrategyId: {},
|
|
35
|
-
approvalSettings: {},
|
|
36
|
-
toolName: {},
|
|
37
|
-
disabled: {
|
|
38
|
-
type: Boolean
|
|
39
|
-
},
|
|
40
|
-
disabledText: {},
|
|
41
|
-
placement: {},
|
|
42
|
-
extCls: {}
|
|
43
|
-
},
|
|
44
|
-
emits: [
|
|
45
|
-
"confirm"
|
|
46
|
-
],
|
|
47
|
-
setup (__props, { emit: __emit }) {
|
|
48
|
-
const props = __props;
|
|
49
|
-
const emits = __emit;
|
|
50
|
-
const renderEnabled = ref();
|
|
51
|
-
const renderApprovalStrategyId = ref();
|
|
52
|
-
const getTooltipContent = ()=>{
|
|
53
|
-
if (props.disabled) return props.disabledText;
|
|
54
|
-
return '配置审批策略';
|
|
55
|
-
};
|
|
56
|
-
const getIconClass = ()=>{
|
|
57
|
-
const baseClass = 'g-text-16 g-flex-shrink-0';
|
|
58
|
-
const extCls = props.extCls || '';
|
|
59
|
-
if (props.disabled) {
|
|
60
|
-
return `${baseClass} ai-ui-sdk-icon ai-ui-sdk-shenpi g-text-gray !g-disabled ${extCls}`;
|
|
61
|
-
}
|
|
62
|
-
if (props.approvalEnabled) {
|
|
63
|
-
return `${baseClass} ai-ui-sdk-icon ai-ui-sdk-yishenpi g-cursor-pointer g-text-green ${extCls}`;
|
|
64
|
-
}
|
|
65
|
-
return `${baseClass} ai-ui-sdk-icon ai-ui-sdk-shenpi g-text-gray g-cursor-pointer hover:!g-text-blue ${extCls}`;
|
|
66
|
-
};
|
|
67
|
-
const getSelectedApprovers = ()=>{
|
|
68
|
-
var _props_approvalSettings;
|
|
69
|
-
const strategy = (_props_approvalSettings = props.approvalSettings) === null || _props_approvalSettings === void 0 ? void 0 : _props_approvalSettings.find((approvalStrategySetting)=>approvalStrategySetting.strategyId === renderApprovalStrategyId.value);
|
|
70
|
-
return strategy === null || strategy === void 0 ? void 0 : strategy.approvers;
|
|
71
|
-
};
|
|
72
|
-
const getDefaultStrategyId = ()=>{
|
|
73
|
-
var _props_approvalSettings;
|
|
74
|
-
const defaultStrategy = (_props_approvalSettings = props.approvalSettings) === null || _props_approvalSettings === void 0 ? void 0 : _props_approvalSettings.find((approvalStrategySetting)=>approvalStrategySetting.isDefault);
|
|
75
|
-
return defaultStrategy === null || defaultStrategy === void 0 ? void 0 : defaultStrategy.strategyId;
|
|
76
|
-
};
|
|
77
|
-
const handleShow = ()=>{
|
|
78
|
-
renderEnabled.value = !!props.approvalEnabled;
|
|
79
|
-
renderApprovalStrategyId.value = props.approvalStrategyId || getDefaultStrategyId();
|
|
80
|
-
};
|
|
81
|
-
const handleConfirm = ()=>{
|
|
82
|
-
emits('confirm', {
|
|
83
|
-
approvalEnabled: renderEnabled.value,
|
|
84
|
-
approvalStrategyId: renderEnabled.value ? renderApprovalStrategyId.value : ''
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
return (_ctx, _cache)=>{
|
|
88
|
-
const _component_bk_switcher = _resolveComponent("bk-switcher");
|
|
89
|
-
const _component_bk_alert = _resolveComponent("bk-alert");
|
|
90
|
-
const _component_bk_option = _resolveComponent("bk-option");
|
|
91
|
-
const _component_bk_select = _resolveComponent("bk-select");
|
|
92
|
-
const _component_bk_tag = _resolveComponent("bk-tag");
|
|
93
|
-
const _component_bk_pop_confirm = _resolveComponent("bk-pop-confirm");
|
|
94
|
-
const _directive_bk_tooltips = _resolveDirective("bk-tooltips");
|
|
95
|
-
return _openBlock(), _createBlock(_component_bk_pop_confirm, {
|
|
96
|
-
"ext-cls": "empty-padding g-popover-confirm",
|
|
97
|
-
theme: "light",
|
|
98
|
-
trigger: "click",
|
|
99
|
-
arrow: "true",
|
|
100
|
-
width: "422",
|
|
101
|
-
placement: __props.placement,
|
|
102
|
-
disabled: props.disabled,
|
|
103
|
-
onConfirm: handleConfirm,
|
|
104
|
-
onAfterShow: handleShow
|
|
105
|
-
}, {
|
|
106
|
-
content: _withCtx(()=>[
|
|
107
|
-
_createElementVNode("section", _hoisted_1, [
|
|
108
|
-
_cache[3] || (_cache[3] = _createElementVNode("span", {
|
|
109
|
-
class: "g-text-14 g-font-bold g-text-black"
|
|
110
|
-
}, "配置审批策略", -1 /* CACHED */ )),
|
|
111
|
-
_createElementVNode("section", _hoisted_2, [
|
|
112
|
-
_createVNode(_component_bk_switcher, {
|
|
113
|
-
modelValue: renderEnabled.value,
|
|
114
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>renderEnabled.value = $event),
|
|
115
|
-
size: "small",
|
|
116
|
-
theme: "primary"
|
|
117
|
-
}, null, 8 /* PROPS */ , [
|
|
118
|
-
"modelValue"
|
|
119
|
-
]),
|
|
120
|
-
_cache[2] || (_cache[2] = _createElementVNode("span", {
|
|
121
|
-
class: "g-text-12 g-text-gray"
|
|
122
|
-
}, "开启审批", -1 /* CACHED */ ))
|
|
123
|
-
])
|
|
124
|
-
]),
|
|
125
|
-
renderEnabled.value ? (_openBlock(), _createBlock(_component_bk_alert, {
|
|
126
|
-
key: 0,
|
|
127
|
-
class: "g-ml-16 g-mr-16 g-mb-12",
|
|
128
|
-
closable: "",
|
|
129
|
-
theme: "info",
|
|
130
|
-
title: "资源被调用时,自动生成相关审批单,审批通过后可继续执行"
|
|
131
|
-
})) : _createCommentVNode("v-if", true),
|
|
132
|
-
renderEnabled.value ? (_openBlock(), _createElementBlock("section", _hoisted_3, [
|
|
133
|
-
_createVNode(_component_bk_select, {
|
|
134
|
-
modelValue: renderApprovalStrategyId.value,
|
|
135
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event)=>renderApprovalStrategyId.value = $event),
|
|
136
|
-
class: "g-flex-1 !g-w-full",
|
|
137
|
-
prefix: "策略",
|
|
138
|
-
clearable: false
|
|
139
|
-
}, {
|
|
140
|
-
default: _withCtx(()=>[
|
|
141
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(__props.approvalSettings, (strategy)=>{
|
|
142
|
-
return _openBlock(), _createBlock(_component_bk_option, {
|
|
143
|
-
key: strategy.strategyId,
|
|
144
|
-
label: strategy.approvalName,
|
|
145
|
-
value: strategy.strategyId
|
|
146
|
-
}, null, 8 /* PROPS */ , [
|
|
147
|
-
"label",
|
|
148
|
-
"value"
|
|
149
|
-
]);
|
|
150
|
-
}), 128 /* KEYED_FRAGMENT */ ))
|
|
151
|
-
]),
|
|
152
|
-
_: 1 /* STABLE */
|
|
153
|
-
}, 8 /* PROPS */ , [
|
|
154
|
-
"modelValue"
|
|
155
|
-
]),
|
|
156
|
-
!_unref(isEmpty)(getSelectedApprovers()) ? (_openBlock(), _createElementBlock("section", _hoisted_4, [
|
|
157
|
-
_cache[4] || (_cache[4] = _createElementVNode("label", {
|
|
158
|
-
class: "g-flex-shrink-0 g-text-12 g-text-black"
|
|
159
|
-
}, "审批人:", -1 /* CACHED */ )),
|
|
160
|
-
_createElementVNode("section", _hoisted_5, [
|
|
161
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(getSelectedApprovers(), (approver)=>{
|
|
162
|
-
return _openBlock(), _createBlock(_component_bk_tag, {
|
|
163
|
-
key: approver
|
|
164
|
-
}, {
|
|
165
|
-
default: _withCtx(()=>[
|
|
166
|
-
_createTextVNode(_toDisplayString(approver), 1 /* TEXT */ )
|
|
167
|
-
]),
|
|
168
|
-
_: 2 /* DYNAMIC */
|
|
169
|
-
}, 1024 /* DYNAMIC_SLOTS */ );
|
|
170
|
-
}), 128 /* KEYED_FRAGMENT */ ))
|
|
171
|
-
])
|
|
172
|
-
])) : _createCommentVNode("v-if", true)
|
|
173
|
-
])) : (_openBlock(), _createElementBlock("section", _hoisted_6, [
|
|
174
|
-
_createElementVNode("span", _hoisted_7, _toDisplayString(__props.toolName), 1 /* TEXT */ ),
|
|
175
|
-
_cache[5] || (_cache[5] = _createTextVNode("未开启审批功能 ", -1 /* CACHED */ ))
|
|
176
|
-
]))
|
|
177
|
-
]),
|
|
178
|
-
default: _withCtx(()=>[
|
|
179
|
-
_withDirectives(_createElementVNode("i", {
|
|
180
|
-
class: _normalizeClass(getIconClass())
|
|
181
|
-
}, null, 2 /* CLASS */ ), [
|
|
182
|
-
[
|
|
183
|
-
_directive_bk_tooltips,
|
|
184
|
-
{
|
|
185
|
-
content: getTooltipContent(),
|
|
186
|
-
placement: 'top'
|
|
187
|
-
}
|
|
188
|
-
]
|
|
189
|
-
])
|
|
190
|
-
]),
|
|
191
|
-
_: 1 /* STABLE */
|
|
192
|
-
}, 8 /* PROPS */ , [
|
|
193
|
-
"placement",
|
|
194
|
-
"disabled"
|
|
195
|
-
]);
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { IApprovalSetting } from '@/types/agent';
|
|
2
|
-
import type { IApprovalSettingValue } from '@/types/common';
|
|
3
|
-
interface IProps {
|
|
4
|
-
approvalEnabled?: boolean;
|
|
5
|
-
approvalStrategyId?: string;
|
|
6
|
-
approvalSettings: IApprovalSetting[];
|
|
7
|
-
toolName?: string;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
disabledText?: string;
|
|
10
|
-
placement?: string;
|
|
11
|
-
extCls?: string;
|
|
12
|
-
}
|
|
13
|
-
declare const __VLS_export: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
-
confirm: (data: IApprovalSettingValue) => any;
|
|
15
|
-
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
|
16
|
-
onConfirm?: (data: IApprovalSettingValue) => any;
|
|
17
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
-
declare const _default: typeof __VLS_export;
|
|
19
|
-
export default _default;
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
function _define_property(obj, key, value) {
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value: value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
|
-
function _object_spread(target) {
|
|
15
|
-
for(var i = 1; i < arguments.length; i++){
|
|
16
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
-
var ownKeys = Object.keys(source);
|
|
18
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
ownKeys.forEach(function(key) {
|
|
24
|
-
_define_property(target, key, source[key]);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return target;
|
|
28
|
-
}
|
|
29
|
-
function ownKeys(object, enumerableOnly) {
|
|
30
|
-
var keys = Object.keys(object);
|
|
31
|
-
if (Object.getOwnPropertySymbols) {
|
|
32
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
33
|
-
if (enumerableOnly) {
|
|
34
|
-
symbols = symbols.filter(function(sym) {
|
|
35
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
keys.push.apply(keys, symbols);
|
|
39
|
-
}
|
|
40
|
-
return keys;
|
|
41
|
-
}
|
|
42
|
-
function _object_spread_props(target, source) {
|
|
43
|
-
source = source != null ? source : {};
|
|
44
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
45
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
46
|
-
} else {
|
|
47
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
48
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return target;
|
|
52
|
-
}
|
|
53
|
-
import { defineComponent as _defineComponent } from 'vue';
|
|
54
|
-
import { unref as _unref, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, createCommentVNode as _createCommentVNode } from "vue";
|
|
55
|
-
const _hoisted_1 = {
|
|
56
|
-
key: 0,
|
|
57
|
-
class: "g-border-t-F0F1F5 g-mt-12 g-border-t-1"
|
|
58
|
-
};
|
|
59
|
-
const _hoisted_2 = {
|
|
60
|
-
class: "g-text-12 g-text-normal"
|
|
61
|
-
};
|
|
62
|
-
const _hoisted_3 = {
|
|
63
|
-
class: "mcp-tool-name g-text-12 g-text-black g-flex-1 g-ellipsis"
|
|
64
|
-
};
|
|
65
|
-
import { ref } from 'vue';
|
|
66
|
-
import RenderApprovalStrategyPopover from '../base/approval-strategy-popover.vue.js';
|
|
67
|
-
import { isEmpty } from '../../../common/util.ts.js';
|
|
68
|
-
export default /*@__PURE__*/ _defineComponent({
|
|
69
|
-
props: {
|
|
70
|
-
mcp: {},
|
|
71
|
-
approvalSettings: {},
|
|
72
|
-
disabled: {
|
|
73
|
-
type: Boolean
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
emits: [
|
|
77
|
-
"update:mcp"
|
|
78
|
-
],
|
|
79
|
-
setup (__props, { emit: __emit }) {
|
|
80
|
-
const props = __props;
|
|
81
|
-
const emits = __emit;
|
|
82
|
-
const isExpanded = ref(false);
|
|
83
|
-
const handleToggleCollapse = ()=>{
|
|
84
|
-
isExpanded.value = !isExpanded.value;
|
|
85
|
-
};
|
|
86
|
-
const handleApprovalConfirm = (tool, data)=>{
|
|
87
|
-
var _props_mcp;
|
|
88
|
-
const selectedTools = (((_props_mcp = props.mcp) === null || _props_mcp === void 0 ? void 0 : _props_mcp.selectedTools) || []).map((selectedTool)=>{
|
|
89
|
-
if (selectedTool.toolName === tool.toolName) {
|
|
90
|
-
return _object_spread_props(_object_spread({}, selectedTool), {
|
|
91
|
-
approvalEnabled: data.approvalEnabled,
|
|
92
|
-
approvalStrategyId: data.approvalStrategyId
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
return selectedTool;
|
|
96
|
-
});
|
|
97
|
-
emits('update:mcp', _object_spread_props(_object_spread({}, props.mcp), {
|
|
98
|
-
selectedTools
|
|
99
|
-
}));
|
|
100
|
-
};
|
|
101
|
-
return (_ctx, _cache)=>{
|
|
102
|
-
var _props_mcp_selectedTools, _props_mcp_selectedTools1;
|
|
103
|
-
return !_unref(isEmpty)(props.mcp.selectedTools) ? (_openBlock(), _createElementBlock("section", _hoisted_1, [
|
|
104
|
-
_createElementVNode("section", {
|
|
105
|
-
class: "g-pt-8 g-pb-4 g-flex g-items-center g-cursor-pointer",
|
|
106
|
-
onClick: handleToggleCollapse
|
|
107
|
-
}, [
|
|
108
|
-
_createElementVNode("i", {
|
|
109
|
-
class: _normalizeClass({
|
|
110
|
-
'g-transition-transform ai-ui-sdk-icon ai-ui-sdk-angle-up-fill-3 g-text-12 g-text-normal g-mr-4': true,
|
|
111
|
-
'g-rotate--90': !isExpanded.value
|
|
112
|
-
})
|
|
113
|
-
}, null, 2 /* CLASS */ ),
|
|
114
|
-
_createElementVNode("span", _hoisted_2, "工具(" + _toDisplayString((_props_mcp_selectedTools = props.mcp.selectedTools) === null || _props_mcp_selectedTools === void 0 ? void 0 : _props_mcp_selectedTools.length) + ")", 1 /* TEXT */ )
|
|
115
|
-
]),
|
|
116
|
-
isExpanded.value ? (_openBlock(), _createElementBlock("ul", {
|
|
117
|
-
key: 0,
|
|
118
|
-
class: _normalizeClass({
|
|
119
|
-
'g-m-0 g-p-0 g-gap-y-4 g-flex-col': true,
|
|
120
|
-
'g-max-h-260 g-scrollbar': ((_props_mcp_selectedTools1 = props.mcp.selectedTools) === null || _props_mcp_selectedTools1 === void 0 ? void 0 : _props_mcp_selectedTools1.length) > 10
|
|
121
|
-
})
|
|
122
|
-
}, [
|
|
123
|
-
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(props.mcp.selectedTools, (tool)=>{
|
|
124
|
-
return _openBlock(), _createElementBlock("li", {
|
|
125
|
-
key: tool.toolName,
|
|
126
|
-
class: _normalizeClass([
|
|
127
|
-
'g-flex g-items-center g-justify-between g-h-24 g-px-4',
|
|
128
|
-
'hover:g-bg-[#f5f7fa] hover:g-cursor-pointer'
|
|
129
|
-
])
|
|
130
|
-
}, [
|
|
131
|
-
_cache[0] || (_cache[0] = _createElementVNode("span", {
|
|
132
|
-
class: "g-text-16 g-font-bold g-mr-8"
|
|
133
|
-
}, " · ", -1 /* CACHED */ )),
|
|
134
|
-
_createElementVNode("span", _hoisted_3, _toDisplayString(tool.toolName), 1 /* TEXT */ ),
|
|
135
|
-
_createVNode(RenderApprovalStrategyPopover, {
|
|
136
|
-
placement: "top",
|
|
137
|
-
"ext-cls": "g-flex-shrink-0 g-ml-8",
|
|
138
|
-
"approval-enabled": tool.approvalEnabled,
|
|
139
|
-
"approval-strategy-id": tool.approvalStrategyId,
|
|
140
|
-
"approval-settings": __props.approvalSettings,
|
|
141
|
-
"tool-name": tool.toolName,
|
|
142
|
-
onConfirm: (data)=>handleApprovalConfirm(tool, data)
|
|
143
|
-
}, null, 8 /* PROPS */ , [
|
|
144
|
-
"approval-enabled",
|
|
145
|
-
"approval-strategy-id",
|
|
146
|
-
"approval-settings",
|
|
147
|
-
"tool-name",
|
|
148
|
-
"onConfirm"
|
|
149
|
-
])
|
|
150
|
-
]);
|
|
151
|
-
}), 128 /* KEYED_FRAGMENT */ ))
|
|
152
|
-
], 2 /* CLASS */ )) : _createCommentVNode("v-if", true)
|
|
153
|
-
])) : _createCommentVNode("v-if", true);
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { IApprovalSetting } from '@/types/agent';
|
|
2
|
-
import type { IMcp } from '@/types/mcp';
|
|
3
|
-
declare const __VLS_export: <T extends IMcp>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
5
|
-
mcp: T;
|
|
6
|
-
approvalSettings: IApprovalSetting[];
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
} & {
|
|
9
|
-
"onUpdate:mcp"?: (mcp: T) => any;
|
|
10
|
-
}> & (typeof globalThis extends {
|
|
11
|
-
__VLS_PROPS_FALLBACK: infer P;
|
|
12
|
-
} ? P : {});
|
|
13
|
-
expose: (exposed: {}) => void;
|
|
14
|
-
attrs: any;
|
|
15
|
-
slots: {};
|
|
16
|
-
emit: (e: "update:mcp", mcp: T) => void;
|
|
17
|
-
}>) => import("vue").VNode & {
|
|
18
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
19
|
-
};
|
|
20
|
-
declare const _default: typeof __VLS_export;
|
|
21
|
-
export default _default;
|
|
22
|
-
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
23
|
-
[K in keyof T]: T[K];
|
|
24
|
-
} : {
|
|
25
|
-
[K in keyof T as K]: T[K];
|
|
26
|
-
}) & {};
|