@blueking/ai-ui-sdk 0.3.0-beta.24 → 0.3.0-beta.26
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 +6 -0
- package/dist/common/util.ts.js +16 -0
- 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/reference-icon.script.vue.js.js +12 -5
- 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 +5 -7
- 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 +18 -0
- package/dist/components/render-card/llm/info.script.vue.js.js +4 -3
- 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 +13 -77
- package/dist/css/g-utilities.manifest.json +4 -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 +4 -1
- 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 +6 -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
|
@@ -50,7 +50,7 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import { transferBaseCountParam2BaseCountParamApi,
|
|
53
|
+
import { transferBaseCountParam2BaseCountParamApi, 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, transferIApprovalSettingValue
|
|
|
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 {
|
|
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
|
+
};
|
|
109
109
|
};
|
|
110
110
|
/**
|
|
111
111
|
* ui转换为接口使用(MCP工具输入参数)
|
|
@@ -134,14 +134,14 @@ import { transferBaseCountParam2BaseCountParamApi, transferIApprovalSettingValue
|
|
|
134
134
|
* UI to API (MCP Tool)
|
|
135
135
|
*/ export const transferMcpTool2McpToolApi = (mcpTool)=>{
|
|
136
136
|
var _mcpTool_inputParams, _mcpTool_outputParams;
|
|
137
|
-
return
|
|
137
|
+
return {
|
|
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
|
+
};
|
|
145
145
|
};
|
|
146
146
|
/**
|
|
147
147
|
* 接口转换为ui使用(表单字段)
|
|
@@ -218,6 +218,16 @@ import { transferBaseCountParam2BaseCountParamApi, transferIApprovalSettingValue
|
|
|
218
218
|
});
|
|
219
219
|
export const transferMcpCount2McpCountApi = (data)=>{
|
|
220
220
|
return _object_spread_props(_object_spread({}, transferBaseCountParam2BaseCountParamApi(data)), {
|
|
221
|
-
with_apigw_mcp: data.withApigwMcp
|
|
221
|
+
with_apigw_mcp: data.withApigwMcp,
|
|
222
|
+
agent_code: data.agentCode
|
|
222
223
|
});
|
|
223
224
|
};
|
|
225
|
+
export const transferMcpInstallGuideParam2McpInstallGuideParamApi = (data)=>({
|
|
226
|
+
target_type: data.targetType,
|
|
227
|
+
mcp_type: data.mcpType,
|
|
228
|
+
mcp_id: data.mcpId
|
|
229
|
+
});
|
|
230
|
+
export const transferMcpInstallTargetApi2McpInstallTarget = (data)=>({
|
|
231
|
+
targetType: data.target_type,
|
|
232
|
+
displayName: data.display_name
|
|
233
|
+
});
|
|
@@ -8,6 +8,7 @@ export const transferModelApi2Model = (data)=>({
|
|
|
8
8
|
baseModel: data.base_model,
|
|
9
9
|
contextLength: data.context_length,
|
|
10
10
|
activatedParams: data.activated_params,
|
|
11
|
+
trainingParams: data.training_params,
|
|
11
12
|
createdBy: data.created_by,
|
|
12
13
|
createdAt: data.created_at,
|
|
13
14
|
updatedBy: data.updated_by,
|
|
@@ -17,6 +18,7 @@ export const transferModelApi2Model = (data)=>({
|
|
|
17
18
|
like: data.like,
|
|
18
19
|
dislikeCount: data.dislike_count,
|
|
19
20
|
dislike: data.dislike,
|
|
21
|
+
refCount: data.ref_count,
|
|
20
22
|
spaceAuthMode: data.space_auth_mode,
|
|
21
23
|
property: data.property ? {
|
|
22
24
|
onlyUserAssistant: data.property.only_user_assistant,
|
|
@@ -26,7 +28,8 @@ export const transferModelApi2Model = (data)=>({
|
|
|
26
28
|
supportThinking: data.property.support_thinking,
|
|
27
29
|
supportThinkingQuick: data.property.support_thinking_quick,
|
|
28
30
|
default: data.property.default,
|
|
29
|
-
isSelfHost: data.property.is_self_host
|
|
31
|
+
isSelfHost: data.property.is_self_host,
|
|
32
|
+
maxModelLen: data.property.max_model_len
|
|
30
33
|
} : undefined,
|
|
31
34
|
hyperparameters: data.hyperparameters ? {
|
|
32
35
|
temperature: data.hyperparameters.temperature,
|
|
@@ -50,7 +50,7 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import { transferBaseCountParam2BaseCountParamApi,
|
|
53
|
+
import { transferBaseCountParam2BaseCountParamApi, 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, transferIApprovalSettingValue
|
|
|
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
|
+
}))), {
|
|
97
97
|
id: data.tool_id,
|
|
98
98
|
refCount: data.ref_count
|
|
99
99
|
});
|
|
@@ -101,7 +101,7 @@ import { transferBaseCountParam2BaseCountParamApi, transferIApprovalSettingValue
|
|
|
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)), {
|
|
105
105
|
tool_id: data.id
|
|
106
106
|
});
|
|
107
107
|
/**
|
package/dist/types/agent.d.ts
CHANGED
|
@@ -174,7 +174,6 @@ export interface IAgentFormApi extends IResourceFormCommonApi {
|
|
|
174
174
|
agents: IAgentApi[];
|
|
175
175
|
};
|
|
176
176
|
business_ids?: number[];
|
|
177
|
-
approval_settings?: IApprovalSettingApi[];
|
|
178
177
|
}
|
|
179
178
|
export interface IAgentForm extends IResourceFormCommon {
|
|
180
179
|
agentCode: string;
|
|
@@ -232,7 +231,6 @@ export interface IAgentForm extends IResourceFormCommon {
|
|
|
232
231
|
agents: IAgent[];
|
|
233
232
|
};
|
|
234
233
|
businessIds?: number[];
|
|
235
|
-
approvalSettings?: IApprovalSetting[];
|
|
236
234
|
}
|
|
237
235
|
export interface IAgent extends IAgentForm, IResourceCommon {
|
|
238
236
|
version: string;
|
|
@@ -356,15 +354,3 @@ export interface IAgentCountParamApi extends IBaseCountParamApi {
|
|
|
356
354
|
agent_type?: AgentType;
|
|
357
355
|
is_published?: boolean;
|
|
358
356
|
}
|
|
359
|
-
export interface IApprovalSetting {
|
|
360
|
-
strategyId: string;
|
|
361
|
-
approvalName: string;
|
|
362
|
-
approvers: string[];
|
|
363
|
-
isDefault: boolean;
|
|
364
|
-
}
|
|
365
|
-
export interface IApprovalSettingApi {
|
|
366
|
-
strategy_id: string;
|
|
367
|
-
approval_name: string;
|
|
368
|
-
approvers: string[];
|
|
369
|
-
is_default: boolean;
|
|
370
|
-
}
|
package/dist/types/common.d.ts
CHANGED
|
@@ -226,11 +226,3 @@ 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/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
|
@@ -9,6 +9,7 @@ export interface IModel {
|
|
|
9
9
|
baseModel?: string;
|
|
10
10
|
contextLength?: string;
|
|
11
11
|
activatedParams?: string;
|
|
12
|
+
trainingParams?: string;
|
|
12
13
|
createdBy?: string;
|
|
13
14
|
createdAt?: string;
|
|
14
15
|
updatedBy?: string;
|
|
@@ -18,6 +19,7 @@ export interface IModel {
|
|
|
18
19
|
like?: boolean;
|
|
19
20
|
dislikeCount?: number;
|
|
20
21
|
dislike?: boolean;
|
|
22
|
+
refCount?: number;
|
|
21
23
|
spaceAuthMode?: ModelSpaceAuthMode;
|
|
22
24
|
property?: {
|
|
23
25
|
onlyUserAssistant?: boolean;
|
|
@@ -28,6 +30,7 @@ export interface IModel {
|
|
|
28
30
|
supportThinkingQuick?: boolean;
|
|
29
31
|
default?: boolean;
|
|
30
32
|
isSelfHost?: boolean;
|
|
33
|
+
maxModelLen?: number;
|
|
31
34
|
};
|
|
32
35
|
hyperparameters?: {
|
|
33
36
|
temperature?: {
|
|
@@ -68,6 +71,7 @@ export interface IModelApi {
|
|
|
68
71
|
base_model?: string;
|
|
69
72
|
context_length?: string;
|
|
70
73
|
activated_params?: string;
|
|
74
|
+
training_params?: string;
|
|
71
75
|
created_by?: string;
|
|
72
76
|
created_at?: string;
|
|
73
77
|
updated_by?: string;
|
|
@@ -76,6 +80,7 @@ export interface IModelApi {
|
|
|
76
80
|
like?: boolean;
|
|
77
81
|
dislike_count?: number;
|
|
78
82
|
dislike?: boolean;
|
|
83
|
+
ref_count?: number;
|
|
79
84
|
space_auth_mode?: ModelSpaceAuthMode;
|
|
80
85
|
property?: {
|
|
81
86
|
only_user_assistant?: boolean;
|
|
@@ -86,6 +91,7 @@ export interface IModelApi {
|
|
|
86
91
|
support_thinking_quick?: boolean;
|
|
87
92
|
default?: boolean;
|
|
88
93
|
is_self_host?: boolean;
|
|
94
|
+
max_model_len?: number;
|
|
89
95
|
};
|
|
90
96
|
hyperparameters?: {
|
|
91
97
|
temperature?: {
|
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.26",
|
|
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;
|