@blueking/ai-ui-sdk 0.5.1-beta.1 → 0.5.1-beta.2
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-search.script.vue.js.js +3 -3
- package/dist/components/render-agent/agent-type.vue.css +4 -4
- 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/index.vue.d.ts +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/agent/upgrade.vue.css +2 -2
- package/dist/components/render-card/agent/upgrade.vue.js +1 -1
- package/dist/components/render-card/base.script.vue.js +130 -152
- 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/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.script.vue.js +27 -33
- package/dist/components/render-card/llm/corner-badge.vue.css +3 -3
- package/dist/components/render-card/llm/corner-badge.vue.js +1 -1
- package/dist/components/render-card/llm/icons.vue.css +2 -2
- package/dist/components/render-card/llm/icons.vue.js +1 -1
- package/dist/components/render-card/llm/index.vue.d.ts +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 +2 -2
- package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
- package/dist/components/render-card/mcp/code-suffix.script.vue.js +34 -42
- package/dist/components/render-card/mcp/index.vue.d.ts +1 -1
- package/dist/components/render-card/mcp/name-suffix.script.vue.js +15 -23
- package/dist/components/render-card/mcp/name-suffix.vue.css +2 -2
- package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
- package/dist/components/render-card/mcp/selected-tools-info.vue.d.ts +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/prompt/index.vue.d.ts +1 -1
- package/dist/components/render-card/role/index.vue.d.ts +1 -1
- package/dist/components/render-card/skill/prefix-info-tool.script.vue.js +41 -84
- package/dist/components/render-card/skill/scanner.vue.css +3 -3
- package/dist/components/render-card/skill/scanner.vue.js +1 -1
- package/dist/components/render-card/tool/index.vue.d.ts +1 -1
- 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.script.vue.js.js +1 -3
- 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.script.vue.js +39 -43
- 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.script.vue.js +27 -37
- 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/dataset-data-level/index.script.vue.js +18 -22
- package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +22 -26
- 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.script.vue.js +65 -102
- 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/dataset-form.script.vue.js +119 -184
- package/dist/components/render-dataset/components/plus-dataset/index.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/search-dataset/index.script.vue.js.js +2 -1
- package/dist/components/render-dataset/components/search-dataset/index.vue.d.ts +1 -0
- package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +205 -356
- 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.script.vue.js.js +5 -2
- package/dist/components/render-dataset-list/components/main.vue.css +3 -3
- package/dist/components/render-dataset-list/components/main.vue.d.ts +1 -0
- package/dist/components/render-dataset-list/components/main.vue.js +1 -1
- package/dist/components/render-dataset-list/components/table.script.vue.js +163 -269
- package/dist/components/render-dataset-list/index.script.vue.js.js +7 -2
- package/dist/components/render-dataset-list/index.vue.css +2 -2
- package/dist/components/render-dataset-list/index.vue.d.ts +1 -0
- package/dist/components/render-dataset-list/index.vue.js +1 -1
- package/dist/components/render-dialog/choose-resource.script.vue.js +269 -390
- 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.script.vue.js +149 -210
- package/dist/components/render-dialog/choose-result.vue.css +14 -14
- package/dist/components/render-dialog/choose-result.vue.js +1 -1
- package/dist/components/render-dialog/choose-space.vue.css +9 -9
- package/dist/components/render-dialog/choose-space.vue.js +1 -1
- package/dist/components/render-dialog/index.script.vue.js +113 -172
- 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.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 +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-knowledge/icon/index.vue.css +1 -1
- package/dist/components/render-knowledge/icon/index.vue.js +1 -1
- package/dist/components/render-permission-tag/index.script.vue.js +57 -70
- 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.script.vue.js +204 -255
- package/dist/components/render-reference/index.vue.css +2 -2
- package/dist/components/render-reference/index.vue.js +1 -1
- package/dist/components/render-relate-agent/index.script.vue.js +343 -640
- package/dist/components/render-resource-info/index.script.vue.js +43 -47
- package/dist/components/render-resource-version/index.vue.css +2 -2
- package/dist/components/render-resource-version/index.vue.js +1 -1
- package/dist/components/render-router-tab/index.vue.css +3 -3
- package/dist/components/render-router-tab/index.vue.js +1 -1
- package/dist/components/render-search-empty/index.vue.d.ts +1 -1
- package/dist/components/render-search-select/index.script.vue.js.js +1 -1
- package/dist/components/render-search-select/index.vue.d.ts +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-skill/variable-form/index.script.vue.js +47 -74
- package/dist/components/render-t-table/index.script.vue.js +143 -231
- package/dist/components/render-t-table/index.vue.css +32 -32
- 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 +7 -7
- package/dist/components/render-tag-tree/index.vue.js +1 -1
- package/dist/components/render-tags/index.script.vue.js +64 -89
- package/dist/components/render-tags/index.vue.css +6 -6
- package/dist/components/render-tags/index.vue.js +1 -1
- package/dist/components/render-tree/index.script.vue.js +60 -115
- package/dist/components/render-tree/index.vue.d.ts +1 -1
- package/dist/hooks/use-display-name.ts.js +2 -0
- package/dist/hooks/use-member-http.d.ts +2 -1
- package/dist/hooks/use-member-http.ts.js +7 -5
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.ts.js +1 -1
- package/dist/http/fetch/success-interceptor.ts.js +5 -2
- package/dist/http/helper/agent.ts.js +2 -1
- package/dist/types/agent.d.ts +2 -0
- package/package.json +3 -3
|
@@ -1,31 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var _interopRequireDefault = require('../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js');
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
require('../../../node_modules/regenerator-runtime/runtime.js');
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require('../../../node_modules/@babel/runtime/helpers/defineProperty.js'));
|
|
9
|
-
var _toConsumableArray2 = _interopRequireDefault(require('../../../node_modules/@babel/runtime/helpers/toConsumableArray.js'));
|
|
10
|
-
var _vue = require("vue");
|
|
11
|
-
require('../../../node_modules/core-js/modules/es.array.concat.js');
|
|
12
|
-
require('../../../node_modules/core-js/modules/es.array.filter.js');
|
|
13
|
-
require('../../../node_modules/core-js/modules/es.array.find.js');
|
|
14
|
-
require('../../../node_modules/core-js/modules/es.array.map.js');
|
|
15
|
-
require('../../../node_modules/core-js/modules/es.function.name.js');
|
|
16
|
-
require('../../../node_modules/core-js/modules/es.object.assign.js');
|
|
17
|
-
require('../../../node_modules/core-js/modules/es.object.to-string.js');
|
|
18
|
-
require('../../../node_modules/core-js/modules/es.promise.js');
|
|
19
|
-
require('../../../node_modules/core-js/modules/es.promise.finally.js');
|
|
20
|
-
var _constants = require('../../common/constants.ts.js');
|
|
21
|
-
var _util = require('../../common/util.ts.js');
|
|
22
|
-
var _index = _interopRequireDefault(require('../render-select-plus-extension/index.vue.js'));
|
|
23
|
-
var _index2 = _interopRequireDefault(require('../render-skill/variable-form/index.vue.js'));
|
|
24
|
-
var _useAgentHttp2 = require('../../hooks/use-agent-http.ts.js');
|
|
25
|
-
var _useClickoutside4 = require('../../hooks/use-clickoutside.ts.js');
|
|
26
|
-
var _useSpaceHttp2 = require('../../hooks/use-space-http.ts.js');
|
|
27
|
-
var _enum = require('../../types/enum.ts.js');
|
|
28
|
-
var __awaiter = (void 0) && (void 0).__awaiter || function(thisArg, _arguments, P, generator) {
|
|
1
|
+
var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
29
2
|
function adopt(value) {
|
|
30
3
|
return value instanceof P ? value : new P(function(resolve) {
|
|
31
4
|
resolve(value);
|
|
@@ -52,10 +25,21 @@ var __awaiter = (void 0) && (void 0).__awaiter || function(thisArg, _arguments,
|
|
|
52
25
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
53
26
|
});
|
|
54
27
|
};
|
|
55
|
-
|
|
28
|
+
import { defineComponent as _defineComponent, createVNode as _createVNode2 } from 'vue';
|
|
29
|
+
import { renderSlot as _renderSlot, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withModifiers as _withModifiers, resolveDirective as _resolveDirective, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, withDirectives as _withDirectives, createElementVNode as _createElementVNode, createVNode as _createVNode, unref as _unref } from "vue";
|
|
30
|
+
const _hoisted_1 = {
|
|
56
31
|
class: "g-flex-row g-justify-end g-mt-16"
|
|
57
32
|
};
|
|
58
|
-
|
|
33
|
+
import { ref, toRef, watch } from 'vue';
|
|
34
|
+
import { MAX_PAGE_SIZE, MODULE_NAME } from '../../common/constants.ts.js';
|
|
35
|
+
import { isEmpty } from '../../common/util.ts.js';
|
|
36
|
+
import RenderSelectPlusExtension from '../render-select-plus-extension/index.vue.js';
|
|
37
|
+
import VariableForm from '../render-skill/variable-form/index.vue.js';
|
|
38
|
+
import { useAgentHttp } from '../../hooks/use-agent-http.ts.js';
|
|
39
|
+
import { useClickoutside } from '../../hooks/use-clickoutside.ts.js';
|
|
40
|
+
import { useSpaceHttp } from '../../hooks/use-space-http.ts.js';
|
|
41
|
+
import { AgentType, GroupType, Module, PromptSource, ResourceStatus, SdkNavigateActionType } from '../../types/enum.ts.js';
|
|
42
|
+
export default /*@__PURE__*/ _defineComponent({
|
|
59
43
|
props: {
|
|
60
44
|
resourceType: {},
|
|
61
45
|
resource: {},
|
|
@@ -79,40 +63,38 @@ var _default = exports.default = /*@__PURE__*/ (0, _vue.defineComponent)({
|
|
|
79
63
|
emits: [
|
|
80
64
|
"navigate"
|
|
81
65
|
],
|
|
82
|
-
setup
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
var renderEnvs = (0, _vue.ref)([]);
|
|
106
|
-
var formData = (0, _vue.ref)({
|
|
66
|
+
setup (__props, { emit: __emit }) {
|
|
67
|
+
const props = __props;
|
|
68
|
+
const emits = __emit;
|
|
69
|
+
const { getAgent, getAgentList, updateAgent, getAgentMcpPermission, resourceApply } = useAgentHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
70
|
+
const { getResourceAuthorizedSpaces } = useSpaceHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
71
|
+
const { handleInitClickoutside } = useClickoutside();
|
|
72
|
+
const { handleInitClickoutside: handleInitSpaceSelectClickoutside } = useClickoutside();
|
|
73
|
+
const { handleInitClickoutside: handleInitAgentSelectClickoutside } = useClickoutside();
|
|
74
|
+
const formRef = ref();
|
|
75
|
+
const spaceSelectRef = ref();
|
|
76
|
+
const agentSelectRef = ref();
|
|
77
|
+
const variableFormRef = ref();
|
|
78
|
+
const agents = ref([]);
|
|
79
|
+
const spaces = ref([]);
|
|
80
|
+
const isLoadingAgents = ref(false);
|
|
81
|
+
const isLoadingSpaces = ref(false);
|
|
82
|
+
const isLoadingConfirm = ref(false);
|
|
83
|
+
const isShowPopover = ref(false);
|
|
84
|
+
const isShowConfirm = ref(false);
|
|
85
|
+
const hasMcpPermission = ref(undefined);
|
|
86
|
+
const hasUnfilledRequiredEnv = ref(false);
|
|
87
|
+
const renderEnvs = ref([]);
|
|
88
|
+
const formData = ref({
|
|
107
89
|
selectedAgentId: undefined,
|
|
108
90
|
selectedSpaceId: undefined
|
|
109
91
|
});
|
|
110
|
-
|
|
111
|
-
return props.resourceType ===
|
|
92
|
+
const getWidth = ()=>{
|
|
93
|
+
return props.resourceType === Module.Skill ? 600 : 280;
|
|
112
94
|
};
|
|
113
|
-
|
|
114
|
-
if (props.resourceType ===
|
|
115
|
-
return (
|
|
95
|
+
const getContent = ()=>{
|
|
96
|
+
if (props.resourceType === Module.Skill) {
|
|
97
|
+
return _createVNode2(VariableForm, {
|
|
116
98
|
"ref": variableFormRef,
|
|
117
99
|
"skillEnvs": renderEnvs.value,
|
|
118
100
|
"onUpdate:skillEnvs": handleUpdateEnvs
|
|
@@ -120,65 +102,63 @@ var _default = exports.default = /*@__PURE__*/ (0, _vue.defineComponent)({
|
|
|
120
102
|
}
|
|
121
103
|
return '当前选择的 MCP 暂无使用权限且未经申请,提交后将自动创建申请单';
|
|
122
104
|
};
|
|
123
|
-
|
|
124
|
-
if (props.resourceType ===
|
|
105
|
+
const getTitle = ()=>{
|
|
106
|
+
if (props.resourceType === Module.Skill) {
|
|
125
107
|
return '配置 Skill 环境变量';
|
|
126
108
|
}
|
|
127
109
|
return '确认提交申请?';
|
|
128
110
|
};
|
|
129
|
-
|
|
111
|
+
const handleGetSpacesAndSetDefaultSpace = ()=>{
|
|
130
112
|
isLoadingSpaces.value = true;
|
|
131
|
-
|
|
113
|
+
const params = {
|
|
132
114
|
resourceType: props.resourceType,
|
|
133
115
|
resourceId: props.resource.id
|
|
134
116
|
};
|
|
135
|
-
if (props.resourceType ===
|
|
117
|
+
if (props.resourceType === Module.Mcp) {
|
|
136
118
|
params.mcpType = props.resource.mcpType;
|
|
137
119
|
}
|
|
138
|
-
return getResourceAuthorizedSpaces(params).then(
|
|
120
|
+
return getResourceAuthorizedSpaces(params).then((data)=>{
|
|
139
121
|
var _a;
|
|
140
122
|
spaces.value = data;
|
|
141
123
|
formData.value.selectedSpaceId = (_a = data[0]) === null || _a === void 0 ? void 0 : _a.spaceId;
|
|
142
|
-
}).finally(
|
|
124
|
+
}).finally(()=>{
|
|
143
125
|
isLoadingSpaces.value = false;
|
|
144
126
|
});
|
|
145
127
|
};
|
|
146
|
-
|
|
128
|
+
const handleGetAgentsAndSetDefaultAgent = ()=>{
|
|
147
129
|
if (!formData.value.selectedSpaceId) return;
|
|
148
130
|
isLoadingAgents.value = true;
|
|
149
|
-
|
|
131
|
+
const params = {
|
|
150
132
|
page: 1,
|
|
151
|
-
pageSize:
|
|
133
|
+
pageSize: MAX_PAGE_SIZE,
|
|
152
134
|
spaceId: formData.value.selectedSpaceId,
|
|
153
|
-
groupType:
|
|
154
|
-
agentType:
|
|
135
|
+
groupType: GroupType.Space,
|
|
136
|
+
agentType: AgentType.Single
|
|
155
137
|
};
|
|
156
|
-
getAgentList(params).then(
|
|
138
|
+
getAgentList(params).then((data)=>{
|
|
157
139
|
var _a;
|
|
158
|
-
|
|
140
|
+
let list = data.results.filter((agent)=>{
|
|
159
141
|
var _a;
|
|
160
142
|
return (_a = agent.permission) === null || _a === void 0 ? void 0 : _a.manageAgent;
|
|
161
143
|
});
|
|
162
|
-
if (props.resourceType ===
|
|
163
|
-
list = list.filter(
|
|
164
|
-
return agent.id !== props.resource.id;
|
|
165
|
-
});
|
|
144
|
+
if (props.resourceType === Module.Agent) {
|
|
145
|
+
list = list.filter((agent)=>agent.id !== props.resource.id);
|
|
166
146
|
}
|
|
167
147
|
agents.value = list;
|
|
168
148
|
formData.value.selectedAgentId = (_a = list[0]) === null || _a === void 0 ? void 0 : _a.id;
|
|
169
|
-
}).finally(
|
|
149
|
+
}).finally(()=>{
|
|
170
150
|
isLoadingAgents.value = false;
|
|
171
151
|
});
|
|
172
152
|
};
|
|
173
|
-
|
|
153
|
+
const handleGoCreateAgent = ()=>{
|
|
174
154
|
handleClose();
|
|
175
155
|
emits('navigate', {
|
|
176
|
-
type:
|
|
156
|
+
type: SdkNavigateActionType.AgentList,
|
|
177
157
|
spaceId: formData.value.selectedSpaceId,
|
|
178
158
|
isShowCreateAgent: 1
|
|
179
159
|
});
|
|
180
160
|
};
|
|
181
|
-
|
|
161
|
+
const handleClose = ()=>{
|
|
182
162
|
var _a;
|
|
183
163
|
// 关闭弹窗
|
|
184
164
|
isShowPopover.value = false;
|
|
@@ -195,541 +175,284 @@ var _default = exports.default = /*@__PURE__*/ (0, _vue.defineComponent)({
|
|
|
195
175
|
// 清空表单验证
|
|
196
176
|
(_a = formRef.value) === null || _a === void 0 ? void 0 : _a.clearValidate();
|
|
197
177
|
};
|
|
198
|
-
|
|
178
|
+
const handleClickOutside = ()=>{
|
|
199
179
|
handleClose();
|
|
200
180
|
};
|
|
201
|
-
|
|
181
|
+
const handleSpaceSelectClickOutside = ()=>{
|
|
202
182
|
var _a, _b;
|
|
203
183
|
(_a = spaceSelectRef.value) === null || _a === void 0 ? void 0 : _a.hidePopover();
|
|
204
184
|
(_b = spaceSelectRef.value) === null || _b === void 0 ? void 0 : _b.handleBlur();
|
|
205
185
|
};
|
|
206
|
-
|
|
186
|
+
const handleAgentSelectClickOutside = ()=>{
|
|
207
187
|
var _a, _b;
|
|
208
188
|
(_a = agentSelectRef.value) === null || _a === void 0 ? void 0 : _a.hidePopover();
|
|
209
189
|
(_b = agentSelectRef.value) === null || _b === void 0 ? void 0 : _b.handleBlur();
|
|
210
190
|
};
|
|
211
|
-
|
|
212
|
-
renderEnvs.value =
|
|
191
|
+
const handleUpdateEnvs = (data)=>{
|
|
192
|
+
renderEnvs.value = [
|
|
193
|
+
...data
|
|
194
|
+
];
|
|
213
195
|
};
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
resourceId = props.resource.id;
|
|
244
|
-
if (!((_b = (_a = selectedAgent.relatedAgents) === null || _a === void 0 ? void 0 : _a.agents) === null || _b === void 0 ? void 0 : _b.find(function(agent) {
|
|
245
|
-
return agent.id === resourceId;
|
|
246
|
-
}))) {
|
|
247
|
-
_context2.next = 1;
|
|
248
|
-
break;
|
|
249
|
-
}
|
|
250
|
-
return _context2.abrupt("return");
|
|
251
|
-
case 1:
|
|
252
|
-
_context2.next = 2;
|
|
253
|
-
return getAgent(resourceId);
|
|
254
|
-
case 2:
|
|
255
|
-
currentAgent = _context2.sent;
|
|
256
|
-
selfCommands = currentAgent.conversationSettings.commands.filter(function(cmd) {
|
|
257
|
-
return cmd.agentId === currentAgent.id;
|
|
258
|
-
});
|
|
259
|
-
relatedAgents = [].concat((0, _toConsumableArray2.default)((_c = selectedAgent.relatedAgents) === null || _c === void 0 ? void 0 : _c.agents), [
|
|
260
|
-
currentAgent
|
|
261
|
-
]);
|
|
262
|
-
_context2.next = 3;
|
|
263
|
-
return updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
264
|
-
relatedAgents: {
|
|
265
|
-
agents: relatedAgents
|
|
266
|
-
},
|
|
267
|
-
conversationSettings: Object.assign(Object.assign({}, selectedAgent.conversationSettings), {
|
|
268
|
-
commands: [].concat((0, _toConsumableArray2.default)(selectedAgent.conversationSettings.commands), (0, _toConsumableArray2.default)(selfCommands))
|
|
269
|
-
})
|
|
270
|
-
}));
|
|
271
|
-
case 3:
|
|
272
|
-
case "end":
|
|
273
|
-
return _context2.stop();
|
|
274
|
-
}
|
|
275
|
-
}, _callee2);
|
|
276
|
-
}));
|
|
277
|
-
};
|
|
278
|
-
var handleRelateToolToAgent = function handleRelateToolToAgent(selectedAgent) {
|
|
279
|
-
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee3() {
|
|
196
|
+
const handleShow = ()=>__awaiter(this, void 0, void 0, function*() {
|
|
197
|
+
if (isShowPopover.value) return;
|
|
198
|
+
isShowPopover.value = true;
|
|
199
|
+
yield handleGetSpacesAndSetDefaultSpace();
|
|
200
|
+
handleGetAgentsAndSetDefaultAgent();
|
|
201
|
+
});
|
|
202
|
+
const handleRelateAgentToAgent = (selectedAgent)=>__awaiter(this, void 0, void 0, function*() {
|
|
203
|
+
var _a, _b, _c;
|
|
204
|
+
const resourceId = props.resource.id;
|
|
205
|
+
if ((_b = (_a = selectedAgent.relatedAgents) === null || _a === void 0 ? void 0 : _a.agents) === null || _b === void 0 ? void 0 : _b.find((agent)=>agent.id === resourceId)) return;
|
|
206
|
+
const currentAgent = yield getAgent(resourceId);
|
|
207
|
+
const selfCommands = currentAgent.conversationSettings.commands.filter((cmd)=>cmd.agentId === currentAgent.id);
|
|
208
|
+
const relatedAgents = [
|
|
209
|
+
...(_c = selectedAgent.relatedAgents) === null || _c === void 0 ? void 0 : _c.agents,
|
|
210
|
+
currentAgent
|
|
211
|
+
];
|
|
212
|
+
yield updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
213
|
+
relatedAgents: {
|
|
214
|
+
agents: relatedAgents
|
|
215
|
+
},
|
|
216
|
+
conversationSettings: Object.assign(Object.assign({}, selectedAgent.conversationSettings), {
|
|
217
|
+
commands: [
|
|
218
|
+
...selectedAgent.conversationSettings.commands,
|
|
219
|
+
...selfCommands
|
|
220
|
+
]
|
|
221
|
+
})
|
|
222
|
+
}));
|
|
223
|
+
});
|
|
224
|
+
const handleRelateToolToAgent = (selectedAgent)=>__awaiter(this, void 0, void 0, function*() {
|
|
280
225
|
var _a, _b, _c, _d;
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
return _context3.abrupt("return");
|
|
291
|
-
case 1:
|
|
292
|
-
_context3.next = 2;
|
|
293
|
-
return updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
294
|
-
relatedTools: {
|
|
295
|
-
tools: [].concat((0, _toConsumableArray2.default)(((_c = selectedAgent.relatedTools) === null || _c === void 0 ? void 0 : _c.tools) || []), [
|
|
296
|
-
props.resource
|
|
297
|
-
]),
|
|
298
|
-
mcps: ((_d = selectedAgent.relatedTools) === null || _d === void 0 ? void 0 : _d.mcps) || []
|
|
299
|
-
}
|
|
300
|
-
}));
|
|
301
|
-
case 2:
|
|
302
|
-
case "end":
|
|
303
|
-
return _context3.stop();
|
|
304
|
-
}
|
|
305
|
-
}, _callee3);
|
|
306
|
-
}));
|
|
307
|
-
};
|
|
308
|
-
var handleRelateKnowledgebaseToAgent = function handleRelateKnowledgebaseToAgent(selectedAgent) {
|
|
309
|
-
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee4() {
|
|
310
|
-
var _a, _b, _c, targetKb, isAlreadyRelated;
|
|
311
|
-
return regeneratorRuntime.wrap(function(_context4) {
|
|
312
|
-
while(1)switch(_context4.prev = _context4.next){
|
|
313
|
-
case 0:
|
|
314
|
-
targetKb = props.resource;
|
|
315
|
-
isAlreadyRelated = (_b = (_a = selectedAgent.knowledgebaseSettings) === null || _a === void 0 ? void 0 : _a.knowledgebases) === null || _b === void 0 ? void 0 : _b.find(function(knowledgebase) {
|
|
316
|
-
return knowledgebase.id === targetKb.id;
|
|
317
|
-
});
|
|
318
|
-
if (!isAlreadyRelated) {
|
|
319
|
-
_context4.next = 1;
|
|
320
|
-
break;
|
|
321
|
-
}
|
|
322
|
-
return _context4.abrupt("return");
|
|
323
|
-
case 1:
|
|
324
|
-
_context4.next = 2;
|
|
325
|
-
return updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
326
|
-
knowledgebaseSettings: Object.assign(Object.assign({}, selectedAgent.knowledgebaseSettings), {
|
|
327
|
-
knowledgebases: [].concat((0, _toConsumableArray2.default)(((_c = selectedAgent.knowledgebaseSettings) === null || _c === void 0 ? void 0 : _c.knowledgebases) || []), [
|
|
328
|
-
targetKb
|
|
329
|
-
])
|
|
330
|
-
})
|
|
331
|
-
}));
|
|
332
|
-
case 2:
|
|
333
|
-
case "end":
|
|
334
|
-
return _context4.stop();
|
|
226
|
+
if ((_b = (_a = selectedAgent.relatedTools) === null || _a === void 0 ? void 0 : _a.tools) === null || _b === void 0 ? void 0 : _b.find((tool)=>tool.id === props.resource.id)) return;
|
|
227
|
+
yield updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
228
|
+
relatedTools: {
|
|
229
|
+
tools: [
|
|
230
|
+
...((_c = selectedAgent.relatedTools) === null || _c === void 0 ? void 0 : _c.tools) || [],
|
|
231
|
+
props.resource
|
|
232
|
+
],
|
|
233
|
+
mcps: ((_d = selectedAgent.relatedTools) === null || _d === void 0 ? void 0 : _d.mcps) || []
|
|
335
234
|
}
|
|
336
|
-
}
|
|
337
|
-
})
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
235
|
+
}));
|
|
236
|
+
});
|
|
237
|
+
const handleRelateKnowledgebaseToAgent = (selectedAgent)=>__awaiter(this, void 0, void 0, function*() {
|
|
238
|
+
var _a, _b, _c;
|
|
239
|
+
const targetKb = props.resource;
|
|
240
|
+
const isAlreadyRelated = (_b = (_a = selectedAgent.knowledgebaseSettings) === null || _a === void 0 ? void 0 : _a.knowledgebases) === null || _b === void 0 ? void 0 : _b.find((knowledgebase)=>knowledgebase.id === targetKb.id);
|
|
241
|
+
if (isAlreadyRelated) return;
|
|
242
|
+
yield updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
243
|
+
knowledgebaseSettings: Object.assign(Object.assign({}, selectedAgent.knowledgebaseSettings), {
|
|
244
|
+
knowledgebases: [
|
|
245
|
+
...((_c = selectedAgent.knowledgebaseSettings) === null || _c === void 0 ? void 0 : _c.knowledgebases) || [],
|
|
246
|
+
targetKb
|
|
247
|
+
]
|
|
248
|
+
})
|
|
249
|
+
}));
|
|
250
|
+
});
|
|
251
|
+
const handleRelateMcpToAgent = (selectedAgent)=>__awaiter(this, void 0, void 0, function*() {
|
|
341
252
|
var _a, _b, _c, _d;
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}
|
|
351
|
-
return _context5.abrupt("return");
|
|
352
|
-
case 1:
|
|
353
|
-
_context5.next = 2;
|
|
354
|
-
return updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
355
|
-
relatedTools: {
|
|
356
|
-
tools: ((_c = selectedAgent.relatedTools) === null || _c === void 0 ? void 0 : _c.tools) || [],
|
|
357
|
-
mcps: [].concat((0, _toConsumableArray2.default)(((_d = selectedAgent.relatedTools) === null || _d === void 0 ? void 0 : _d.mcps) || []), [
|
|
358
|
-
props.resource
|
|
359
|
-
])
|
|
360
|
-
}
|
|
361
|
-
}));
|
|
362
|
-
case 2:
|
|
363
|
-
case "end":
|
|
364
|
-
return _context5.stop();
|
|
253
|
+
if ((_b = (_a = selectedAgent.relatedTools) === null || _a === void 0 ? void 0 : _a.mcps) === null || _b === void 0 ? void 0 : _b.find((mcp)=>mcp.id === props.resource.id && mcp.mcpType === props.resource.mcpType)) return;
|
|
254
|
+
yield updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
255
|
+
relatedTools: {
|
|
256
|
+
tools: ((_c = selectedAgent.relatedTools) === null || _c === void 0 ? void 0 : _c.tools) || [],
|
|
257
|
+
mcps: [
|
|
258
|
+
...((_d = selectedAgent.relatedTools) === null || _d === void 0 ? void 0 : _d.mcps) || [],
|
|
259
|
+
props.resource
|
|
260
|
+
]
|
|
365
261
|
}
|
|
366
|
-
}
|
|
367
|
-
})
|
|
368
|
-
|
|
369
|
-
var handleRelateSkillToAgent = function handleRelateSkillToAgent(selectedAgent) {
|
|
370
|
-
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee6() {
|
|
262
|
+
}));
|
|
263
|
+
});
|
|
264
|
+
const handleRelateSkillToAgent = (selectedAgent)=>__awaiter(this, void 0, void 0, function*() {
|
|
371
265
|
var _a, _b, _c;
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
})
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
return _context6.abrupt("return");
|
|
382
|
-
case 1:
|
|
383
|
-
_context6.next = 2;
|
|
384
|
-
return updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
385
|
-
relatedSkills: {
|
|
386
|
-
skills: [].concat((0, _toConsumableArray2.default)((_c = selectedAgent.relatedSkills) === null || _c === void 0 ? void 0 : _c.skills), [
|
|
387
|
-
Object.assign(Object.assign({}, props.resource), {
|
|
388
|
-
envs: renderEnvs.value
|
|
389
|
-
})
|
|
390
|
-
])
|
|
391
|
-
}
|
|
392
|
-
}));
|
|
393
|
-
case 2:
|
|
394
|
-
case "end":
|
|
395
|
-
return _context6.stop();
|
|
266
|
+
if ((_b = (_a = selectedAgent.relatedSkills) === null || _a === void 0 ? void 0 : _a.skills) === null || _b === void 0 ? void 0 : _b.find((skill)=>skill.id === props.resource.id)) return;
|
|
267
|
+
yield updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
268
|
+
relatedSkills: {
|
|
269
|
+
skills: [
|
|
270
|
+
...(_c = selectedAgent.relatedSkills) === null || _c === void 0 ? void 0 : _c.skills,
|
|
271
|
+
Object.assign(Object.assign({}, props.resource), {
|
|
272
|
+
envs: renderEnvs.value
|
|
273
|
+
})
|
|
274
|
+
]
|
|
396
275
|
}
|
|
397
|
-
}
|
|
398
|
-
})
|
|
399
|
-
|
|
400
|
-
var handleRelateLLMToAgent = function handleRelateLLMToAgent(selectedAgent) {
|
|
401
|
-
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee7() {
|
|
276
|
+
}));
|
|
277
|
+
});
|
|
278
|
+
const handleRelateLLMToAgent = (selectedAgent)=>__awaiter(this, void 0, void 0, function*() {
|
|
402
279
|
var _a, _b, _c;
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
collectionContent: collection.content
|
|
467
|
-
})
|
|
468
|
-
}));
|
|
469
|
-
case 2:
|
|
470
|
-
case "end":
|
|
471
|
-
return _context9.stop();
|
|
472
|
-
}
|
|
473
|
-
}, _callee9);
|
|
474
|
-
}));
|
|
475
|
-
};
|
|
476
|
-
var handleBindAndNavigate = function handleBindAndNavigate(selectedAgent) {
|
|
477
|
-
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee0() {
|
|
478
|
-
var _a, relateMap;
|
|
479
|
-
return regeneratorRuntime.wrap(function(_context0) {
|
|
480
|
-
while(1)switch(_context0.prev = _context0.next){
|
|
481
|
-
case 0:
|
|
482
|
-
relateMap = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _enum.Module.Agent, handleRelateAgentToAgent), _enum.Module.Mcp, handleRelateMcpToAgent), _enum.Module.Tool, handleRelateToolToAgent), _enum.Module.Skill, handleRelateSkillToAgent), _enum.Module.LLM, handleRelateLLMToAgent), _enum.Module.Knowledgebase, handleRelateKnowledgebaseToAgent), _enum.Module.Prompt, handleRelatePromptToAgent), _enum.Module.Collection, handleRelateCollectionToAgent);
|
|
483
|
-
_context0.next = 1;
|
|
484
|
-
return (_a = relateMap[props.resourceType]) === null || _a === void 0 ? void 0 : _a.call(relateMap, selectedAgent);
|
|
485
|
-
case 1:
|
|
486
|
-
emits('navigate', {
|
|
487
|
-
type: _enum.SdkNavigateActionType.AgentDetailSetting,
|
|
488
|
-
id: formData.value.selectedAgentId,
|
|
489
|
-
spaceId: formData.value.selectedSpaceId,
|
|
490
|
-
isNewTab: true
|
|
491
|
-
});
|
|
492
|
-
handleClose();
|
|
493
|
-
case 2:
|
|
494
|
-
case "end":
|
|
495
|
-
return _context0.stop();
|
|
496
|
-
}
|
|
497
|
-
}, _callee0);
|
|
498
|
-
}));
|
|
499
|
-
};
|
|
500
|
-
var handleConfirm = function handleConfirm() {
|
|
501
|
-
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee1() {
|
|
502
|
-
var _a, selectedAgent, _t;
|
|
503
|
-
return regeneratorRuntime.wrap(function(_context1) {
|
|
504
|
-
while(1)switch(_context1.prev = _context1.next){
|
|
505
|
-
case 0:
|
|
506
|
-
_context1.prev = 0;
|
|
507
|
-
_context1.next = 1;
|
|
508
|
-
return (_a = formRef.value) === null || _a === void 0 ? void 0 : _a.validate();
|
|
509
|
-
case 1:
|
|
510
|
-
if (!(hasMcpPermission.value === false || hasUnfilledRequiredEnv.value)) {
|
|
511
|
-
_context1.next = 2;
|
|
512
|
-
break;
|
|
513
|
-
}
|
|
514
|
-
// 没有权限或必填环境变量未配置,显示弹窗
|
|
515
|
-
isShowConfirm.value = true;
|
|
516
|
-
_context1.next = 4;
|
|
517
|
-
break;
|
|
518
|
-
case 2:
|
|
519
|
-
// 有权限且必填环境变量已配置,绑定并跳转
|
|
520
|
-
isLoadingConfirm.value = true;
|
|
521
|
-
_context1.next = 3;
|
|
522
|
-
return getAgent(formData.value.selectedAgentId);
|
|
523
|
-
case 3:
|
|
524
|
-
selectedAgent = _context1.sent;
|
|
525
|
-
_context1.next = 4;
|
|
526
|
-
return handleBindAndNavigate(selectedAgent);
|
|
527
|
-
case 4:
|
|
528
|
-
_context1.next = 6;
|
|
529
|
-
break;
|
|
530
|
-
case 5:
|
|
531
|
-
_context1.prev = 5;
|
|
532
|
-
_t = _context1["catch"](0);
|
|
533
|
-
console.error(_t);
|
|
534
|
-
case 6:
|
|
535
|
-
_context1.prev = 6;
|
|
536
|
-
isLoadingConfirm.value = false;
|
|
537
|
-
return _context1.finish(6);
|
|
538
|
-
case 7:
|
|
539
|
-
case "end":
|
|
540
|
-
return _context1.stop();
|
|
280
|
+
if (((_a = selectedAgent.promptSetting) === null || _a === void 0 ? void 0 : _a.llmCode) === ((_b = props.resource) === null || _b === void 0 ? void 0 : _b.llmCode)) return;
|
|
281
|
+
yield updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
282
|
+
promptSetting: Object.assign(Object.assign({}, selectedAgent.promptSetting), {
|
|
283
|
+
llmCode: (_c = props.resource) === null || _c === void 0 ? void 0 : _c.llmCode
|
|
284
|
+
})
|
|
285
|
+
}));
|
|
286
|
+
});
|
|
287
|
+
const handleRelatePromptToAgent = (selectedAgent)=>__awaiter(this, void 0, void 0, function*() {
|
|
288
|
+
const prompt = props.resource;
|
|
289
|
+
yield updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
290
|
+
promptSetting: Object.assign(Object.assign({}, selectedAgent.promptSetting), {
|
|
291
|
+
promptType: PromptSource.UserDefine,
|
|
292
|
+
promptContent: prompt.content
|
|
293
|
+
})
|
|
294
|
+
}));
|
|
295
|
+
});
|
|
296
|
+
const handleRelateCollectionToAgent = (selectedAgent)=>__awaiter(this, void 0, void 0, function*() {
|
|
297
|
+
var _a;
|
|
298
|
+
const collection = props.resource;
|
|
299
|
+
if (((_a = selectedAgent.promptSetting) === null || _a === void 0 ? void 0 : _a.collectionId) === collection.id) return;
|
|
300
|
+
yield updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
301
|
+
promptSetting: Object.assign(Object.assign({}, selectedAgent.promptSetting), {
|
|
302
|
+
promptType: PromptSource.Collection,
|
|
303
|
+
collectionId: collection.id,
|
|
304
|
+
collectionName: collection.name,
|
|
305
|
+
collectionVariables: collection.variables,
|
|
306
|
+
collectionContent: collection.content
|
|
307
|
+
})
|
|
308
|
+
}));
|
|
309
|
+
});
|
|
310
|
+
const handleBindAndNavigate = (selectedAgent)=>__awaiter(this, void 0, void 0, function*() {
|
|
311
|
+
var _a;
|
|
312
|
+
const relateMap = {
|
|
313
|
+
[Module.Agent]: handleRelateAgentToAgent,
|
|
314
|
+
[Module.Mcp]: handleRelateMcpToAgent,
|
|
315
|
+
[Module.Tool]: handleRelateToolToAgent,
|
|
316
|
+
[Module.Skill]: handleRelateSkillToAgent,
|
|
317
|
+
[Module.LLM]: handleRelateLLMToAgent,
|
|
318
|
+
[Module.Knowledgebase]: handleRelateKnowledgebaseToAgent,
|
|
319
|
+
[Module.Prompt]: handleRelatePromptToAgent,
|
|
320
|
+
[Module.Collection]: handleRelateCollectionToAgent
|
|
321
|
+
};
|
|
322
|
+
yield (_a = relateMap[props.resourceType]) === null || _a === void 0 ? void 0 : _a.call(relateMap, selectedAgent);
|
|
323
|
+
emits('navigate', {
|
|
324
|
+
type: SdkNavigateActionType.AgentDetailSetting,
|
|
325
|
+
id: formData.value.selectedAgentId,
|
|
326
|
+
spaceId: formData.value.selectedSpaceId,
|
|
327
|
+
isNewTab: true
|
|
328
|
+
});
|
|
329
|
+
handleClose();
|
|
330
|
+
});
|
|
331
|
+
const handleConfirm = ()=>__awaiter(this, void 0, void 0, function*() {
|
|
332
|
+
var _a;
|
|
333
|
+
try {
|
|
334
|
+
yield (_a = formRef.value) === null || _a === void 0 ? void 0 : _a.validate();
|
|
335
|
+
if (hasMcpPermission.value === false || hasUnfilledRequiredEnv.value) {
|
|
336
|
+
// 没有权限或必填环境变量未配置,显示弹窗
|
|
337
|
+
isShowConfirm.value = true;
|
|
338
|
+
} else {
|
|
339
|
+
// 有权限且必填环境变量已配置,绑定并跳转
|
|
340
|
+
isLoadingConfirm.value = true;
|
|
341
|
+
const selectedAgent = yield getAgent(formData.value.selectedAgentId);
|
|
342
|
+
yield handleBindAndNavigate(selectedAgent);
|
|
541
343
|
}
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
}));
|
|
551
|
-
};
|
|
552
|
-
var handlePopoverConfirm = function handlePopoverConfirm() {
|
|
553
|
-
if (props.resourceType === _enum.Module.Skill) {
|
|
344
|
+
} catch (error) {
|
|
345
|
+
console.error(error);
|
|
346
|
+
} finally{
|
|
347
|
+
isLoadingConfirm.value = false;
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
const handlePopoverConfirm = ()=>{
|
|
351
|
+
if (props.resourceType === Module.Skill) {
|
|
554
352
|
handleValidateSkillAndConfirm();
|
|
555
353
|
}
|
|
556
|
-
if (props.resourceType ===
|
|
354
|
+
if (props.resourceType === Module.Mcp) {
|
|
557
355
|
handleApplyPermissionAndConfirm();
|
|
558
356
|
}
|
|
559
357
|
};
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
1,
|
|
596
|
-
5,
|
|
597
|
-
6,
|
|
598
|
-
7
|
|
599
|
-
]
|
|
600
|
-
]);
|
|
601
|
-
}));
|
|
602
|
-
};
|
|
603
|
-
var handleApplyPermissionAndConfirm = function handleApplyPermissionAndConfirm() {
|
|
604
|
-
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee11() {
|
|
605
|
-
var selectedAgent, resource, _t3;
|
|
606
|
-
return regeneratorRuntime.wrap(function(_context11) {
|
|
607
|
-
while(1)switch(_context11.prev = _context11.next){
|
|
608
|
-
case 0:
|
|
609
|
-
isLoadingConfirm.value = true;
|
|
610
|
-
_context11.prev = 1;
|
|
611
|
-
_context11.next = 2;
|
|
612
|
-
return getAgent(formData.value.selectedAgentId);
|
|
613
|
-
case 2:
|
|
614
|
-
selectedAgent = _context11.sent;
|
|
615
|
-
resource = [
|
|
616
|
-
{
|
|
617
|
-
resourceType: _enum.Module.Mcp,
|
|
618
|
-
resourceCode: props.resource.mcpCode
|
|
619
|
-
}
|
|
620
|
-
];
|
|
621
|
-
_context11.next = 3;
|
|
622
|
-
return resourceApply(resource, selectedAgent.id);
|
|
623
|
-
case 3:
|
|
624
|
-
_context11.next = 4;
|
|
625
|
-
return handleBindAndNavigate(selectedAgent);
|
|
626
|
-
case 4:
|
|
627
|
-
isShowConfirm.value = false;
|
|
628
|
-
_context11.next = 6;
|
|
629
|
-
break;
|
|
630
|
-
case 5:
|
|
631
|
-
_context11.prev = 5;
|
|
632
|
-
_t3 = _context11["catch"](1);
|
|
633
|
-
console.error(_t3);
|
|
634
|
-
case 6:
|
|
635
|
-
_context11.prev = 6;
|
|
636
|
-
isLoadingConfirm.value = false;
|
|
637
|
-
return _context11.finish(6);
|
|
638
|
-
case 7:
|
|
639
|
-
case "end":
|
|
640
|
-
return _context11.stop();
|
|
641
|
-
}
|
|
642
|
-
}, _callee11, null, [
|
|
643
|
-
[
|
|
644
|
-
1,
|
|
645
|
-
5,
|
|
646
|
-
6,
|
|
647
|
-
7
|
|
648
|
-
]
|
|
649
|
-
]);
|
|
650
|
-
}));
|
|
651
|
-
};
|
|
652
|
-
var handleCheckConfirm = function handleCheckConfirm() {
|
|
653
|
-
if ((0, _util.isEmpty)(formData.value.selectedAgentId)) {
|
|
358
|
+
const handleValidateSkillAndConfirm = ()=>__awaiter(this, void 0, void 0, function*() {
|
|
359
|
+
var _a;
|
|
360
|
+
isLoadingConfirm.value = true;
|
|
361
|
+
try {
|
|
362
|
+
yield (_a = variableFormRef.value) === null || _a === void 0 ? void 0 : _a.validate();
|
|
363
|
+
const selectedAgent = yield getAgent(formData.value.selectedAgentId);
|
|
364
|
+
yield handleBindAndNavigate(selectedAgent);
|
|
365
|
+
isShowConfirm.value = false;
|
|
366
|
+
} catch (error) {
|
|
367
|
+
console.error(error);
|
|
368
|
+
} finally{
|
|
369
|
+
isLoadingConfirm.value = false;
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
const handleApplyPermissionAndConfirm = ()=>__awaiter(this, void 0, void 0, function*() {
|
|
373
|
+
isLoadingConfirm.value = true;
|
|
374
|
+
try {
|
|
375
|
+
const selectedAgent = yield getAgent(formData.value.selectedAgentId);
|
|
376
|
+
const resource = [
|
|
377
|
+
{
|
|
378
|
+
resourceType: Module.Mcp,
|
|
379
|
+
resourceCode: props.resource.mcpCode
|
|
380
|
+
}
|
|
381
|
+
];
|
|
382
|
+
yield resourceApply(resource, selectedAgent.id);
|
|
383
|
+
yield handleBindAndNavigate(selectedAgent);
|
|
384
|
+
isShowConfirm.value = false;
|
|
385
|
+
} catch (error) {
|
|
386
|
+
console.error(error);
|
|
387
|
+
} finally{
|
|
388
|
+
isLoadingConfirm.value = false;
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
const handleCheckConfirm = ()=>{
|
|
392
|
+
if (isEmpty(formData.value.selectedAgentId)) {
|
|
654
393
|
return;
|
|
655
394
|
}
|
|
656
|
-
if (props.resourceType ===
|
|
395
|
+
if (props.resourceType === Module.Skill) {
|
|
657
396
|
handleCheckSkillEnvs();
|
|
658
397
|
}
|
|
659
|
-
if (props.resourceType ===
|
|
398
|
+
if (props.resourceType === Module.Mcp) {
|
|
660
399
|
handleCheckMcpPermission();
|
|
661
400
|
}
|
|
662
401
|
};
|
|
663
402
|
// 检查是否有必填的环境变量
|
|
664
|
-
|
|
665
|
-
return __awaiter(_this, void 0, void 0, /*#__PURE__*/ regeneratorRuntime.mark(function _callee12() {
|
|
403
|
+
const handleCheckSkillEnvs = ()=>__awaiter(this, void 0, void 0, function*() {
|
|
666
404
|
var _a, _b;
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
return Object.assign(Object.assign({}, env), {
|
|
673
|
-
value: env.default
|
|
674
|
-
});
|
|
675
|
-
}
|
|
676
|
-
return env;
|
|
677
|
-
});
|
|
678
|
-
hasUnfilledRequiredEnv.value = renderEnvs.value.some(function(env) {
|
|
679
|
-
return env.required && (0, _util.isEmpty)(env.value);
|
|
680
|
-
});
|
|
681
|
-
if (hasUnfilledRequiredEnv.value) {
|
|
682
|
-
isLoadingConfirm.value = true;
|
|
683
|
-
getAgent(formData.value.selectedAgentId).then(function(agent) {
|
|
684
|
-
var _a;
|
|
685
|
-
var isAlreadyRelated = (_a = agent.relatedSkills) === null || _a === void 0 ? void 0 : _a.skills.find(function(skill) {
|
|
686
|
-
return skill.id === props.resource.id;
|
|
687
|
-
});
|
|
688
|
-
if (isAlreadyRelated) {
|
|
689
|
-
hasUnfilledRequiredEnv.value = false;
|
|
690
|
-
renderEnvs.value = [];
|
|
691
|
-
}
|
|
692
|
-
}).finally(function() {
|
|
693
|
-
isLoadingConfirm.value = false;
|
|
694
|
-
});
|
|
695
|
-
}
|
|
696
|
-
case 1:
|
|
697
|
-
case "end":
|
|
698
|
-
return _context12.stop();
|
|
405
|
+
renderEnvs.value = (_b = (_a = props.resource.bkaiDependencies) === null || _a === void 0 ? void 0 : _a.envs) === null || _b === void 0 ? void 0 : _b.map((env)=>{
|
|
406
|
+
if (isEmpty(env.value) && !isEmpty(env.default)) {
|
|
407
|
+
return Object.assign(Object.assign({}, env), {
|
|
408
|
+
value: env.default
|
|
409
|
+
});
|
|
699
410
|
}
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
411
|
+
return env;
|
|
412
|
+
});
|
|
413
|
+
hasUnfilledRequiredEnv.value = renderEnvs.value.some((env)=>env.required && isEmpty(env.value));
|
|
414
|
+
if (hasUnfilledRequiredEnv.value) {
|
|
415
|
+
isLoadingConfirm.value = true;
|
|
416
|
+
getAgent(formData.value.selectedAgentId).then((agent)=>{
|
|
417
|
+
var _a;
|
|
418
|
+
const isAlreadyRelated = (_a = agent.relatedSkills) === null || _a === void 0 ? void 0 : _a.skills.find((skill)=>skill.id === props.resource.id);
|
|
419
|
+
if (isAlreadyRelated) {
|
|
420
|
+
hasUnfilledRequiredEnv.value = false;
|
|
421
|
+
renderEnvs.value = [];
|
|
422
|
+
}
|
|
423
|
+
}).finally(()=>{
|
|
424
|
+
isLoadingConfirm.value = false;
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
});
|
|
703
428
|
// 检查 MCP 权限
|
|
704
|
-
|
|
429
|
+
const handleCheckMcpPermission = ()=>{
|
|
705
430
|
isLoadingConfirm.value = true;
|
|
706
|
-
|
|
707
|
-
getAgentMcpPermission(formData.value.selectedAgentId, mcp.mcpCode, mcp.mcpType).then(
|
|
708
|
-
hasMcpPermission.value = res.status !==
|
|
709
|
-
}).catch(
|
|
431
|
+
const mcp = props.resource;
|
|
432
|
+
getAgentMcpPermission(formData.value.selectedAgentId, mcp.mcpCode, mcp.mcpType).then((res)=>{
|
|
433
|
+
hasMcpPermission.value = res.status !== ResourceStatus.NoPermission;
|
|
434
|
+
}).catch(()=>{
|
|
710
435
|
hasMcpPermission.value = undefined;
|
|
711
|
-
}).finally(
|
|
436
|
+
}).finally(()=>{
|
|
712
437
|
isLoadingConfirm.value = false;
|
|
713
438
|
});
|
|
714
439
|
};
|
|
715
|
-
|
|
440
|
+
const handleCancelApply = ()=>{
|
|
716
441
|
isShowConfirm.value = false;
|
|
717
442
|
};
|
|
718
443
|
handleInitClickoutside('render-relate-agent-popover', handleClickOutside);
|
|
719
444
|
handleInitSpaceSelectClickoutside('space-select', handleSpaceSelectClickOutside);
|
|
720
445
|
handleInitAgentSelectClickoutside('agent-select', handleAgentSelectClickOutside);
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
var _directive_bk_tooltips = (0, _vue.resolveDirective)("bk-tooltips");
|
|
732
|
-
return (0, _vue.openBlock)(), (0, _vue.createBlock)(_component_bk_popover, {
|
|
446
|
+
watch(()=>formData.value.selectedAgentId, handleCheckConfirm);
|
|
447
|
+
return (_ctx, _cache)=>{
|
|
448
|
+
const _component_bk_button = _resolveComponent("bk-button");
|
|
449
|
+
const _component_bk_select = _resolveComponent("bk-select");
|
|
450
|
+
const _component_bk_form_item = _resolveComponent("bk-form-item");
|
|
451
|
+
const _component_bk_form = _resolveComponent("bk-form");
|
|
452
|
+
const _component_bk_pop_confirm = _resolveComponent("bk-pop-confirm");
|
|
453
|
+
const _component_bk_popover = _resolveComponent("bk-popover");
|
|
454
|
+
const _directive_bk_tooltips = _resolveDirective("bk-tooltips");
|
|
455
|
+
return _openBlock(), _createBlock(_component_bk_popover, {
|
|
733
456
|
placement: props.placement,
|
|
734
457
|
boundary: props.boundary,
|
|
735
458
|
"is-show": isShowPopover.value,
|
|
@@ -738,32 +461,27 @@ var _default = exports.default = /*@__PURE__*/ (0, _vue.defineComponent)({
|
|
|
738
461
|
width: "400",
|
|
739
462
|
"ext-cls": "render-relate-agent-popover"
|
|
740
463
|
}, {
|
|
741
|
-
content: (
|
|
742
|
-
|
|
743
|
-
_cache[5] || (_cache[5] = (0, _vue.createElementVNode)("span", {
|
|
464
|
+
content: _withCtx(()=>[
|
|
465
|
+
_cache[5] || (_cache[5] = _createElementVNode("span", {
|
|
744
466
|
class: "g-text-16 g-text-black g-leading-24"
|
|
745
467
|
}, " 关联至智能体 ", -1 /* CACHED */ )),
|
|
746
|
-
(
|
|
468
|
+
_createVNode(_component_bk_form, {
|
|
747
469
|
model: formData.value,
|
|
748
470
|
ref_key: "formRef",
|
|
749
471
|
ref: formRef,
|
|
750
472
|
"form-type": "vertical",
|
|
751
473
|
class: "g-small-form g-small-gap-form !g-mt-16"
|
|
752
474
|
}, {
|
|
753
|
-
default: (
|
|
754
|
-
|
|
755
|
-
(0, _vue.createVNode)(_component_bk_form_item, {
|
|
475
|
+
default: _withCtx(()=>[
|
|
476
|
+
_createVNode(_component_bk_form_item, {
|
|
756
477
|
label: "空间",
|
|
757
478
|
property: "selectedSpaceId",
|
|
758
479
|
required: ""
|
|
759
480
|
}, {
|
|
760
|
-
default: (
|
|
761
|
-
|
|
762
|
-
(0, _vue.createVNode)(_component_bk_select, {
|
|
481
|
+
default: _withCtx(()=>[
|
|
482
|
+
_createVNode(_component_bk_select, {
|
|
763
483
|
modelValue: formData.value.selectedSpaceId,
|
|
764
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] =
|
|
765
|
-
return formData.value.selectedSpaceId = $event;
|
|
766
|
-
}),
|
|
484
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>formData.value.selectedSpaceId = $event),
|
|
767
485
|
clearable: false,
|
|
768
486
|
loading: isLoadingSpaces.value,
|
|
769
487
|
list: spaces.value,
|
|
@@ -783,23 +501,19 @@ var _default = exports.default = /*@__PURE__*/ (0, _vue.defineComponent)({
|
|
|
783
501
|
"loading",
|
|
784
502
|
"list"
|
|
785
503
|
])
|
|
786
|
-
]
|
|
787
|
-
}),
|
|
504
|
+
]),
|
|
788
505
|
_: 1 /* STABLE */
|
|
789
506
|
}),
|
|
790
|
-
(
|
|
507
|
+
_createVNode(_component_bk_form_item, {
|
|
791
508
|
label: "智能体",
|
|
792
509
|
property: "selectedAgentId",
|
|
793
510
|
required: ""
|
|
794
511
|
}, {
|
|
795
|
-
default: (
|
|
796
|
-
|
|
797
|
-
(0, _vue.createVNode)(_component_bk_select, {
|
|
512
|
+
default: _withCtx(()=>[
|
|
513
|
+
_createVNode(_component_bk_select, {
|
|
798
514
|
modelValue: formData.value.selectedAgentId,
|
|
799
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] =
|
|
800
|
-
|
|
801
|
-
}),
|
|
802
|
-
"no-data-text": "\u6682\u65E0\u672A\u5173\u8054\u8BE5".concat((0, _vue.unref)(_constants.MODULE_NAME)[props.resourceType], "\u7684\u667A\u80FD\u4F53"),
|
|
515
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event)=>formData.value.selectedAgentId = $event),
|
|
516
|
+
"no-data-text": `暂无未关联该${_unref(MODULE_NAME)[props.resourceType]}的智能体`,
|
|
803
517
|
clearable: false,
|
|
804
518
|
list: agents.value,
|
|
805
519
|
loading: isLoadingAgents.value,
|
|
@@ -814,14 +528,12 @@ var _default = exports.default = /*@__PURE__*/ (0, _vue.defineComponent)({
|
|
|
814
528
|
"id-key": "id",
|
|
815
529
|
"display-key": "agentName"
|
|
816
530
|
}, {
|
|
817
|
-
extension: (
|
|
818
|
-
|
|
819
|
-
(0, _vue.createVNode)(_index.default, {
|
|
531
|
+
extension: _withCtx(()=>[
|
|
532
|
+
_createVNode(RenderSelectPlusExtension, {
|
|
820
533
|
text: "去新建",
|
|
821
534
|
onClick: handleGoCreateAgent
|
|
822
535
|
})
|
|
823
|
-
]
|
|
824
|
-
}),
|
|
536
|
+
]),
|
|
825
537
|
_: 1 /* STABLE */
|
|
826
538
|
}, 8 /* PROPS */ , [
|
|
827
539
|
"modelValue",
|
|
@@ -829,18 +541,16 @@ var _default = exports.default = /*@__PURE__*/ (0, _vue.defineComponent)({
|
|
|
829
541
|
"list",
|
|
830
542
|
"loading"
|
|
831
543
|
])
|
|
832
|
-
]
|
|
833
|
-
}),
|
|
544
|
+
]),
|
|
834
545
|
_: 1 /* STABLE */
|
|
835
546
|
})
|
|
836
|
-
]
|
|
837
|
-
}),
|
|
547
|
+
]),
|
|
838
548
|
_: 1 /* STABLE */
|
|
839
549
|
}, 8 /* PROPS */ , [
|
|
840
550
|
"model"
|
|
841
551
|
]),
|
|
842
|
-
(
|
|
843
|
-
(
|
|
552
|
+
_createElementVNode("section", _hoisted_1, [
|
|
553
|
+
_createVNode(_component_bk_pop_confirm, {
|
|
844
554
|
width: getWidth(),
|
|
845
555
|
title: getTitle(),
|
|
846
556
|
content: getContent(),
|
|
@@ -855,24 +565,22 @@ var _default = exports.default = /*@__PURE__*/ (0, _vue.defineComponent)({
|
|
|
855
565
|
onConfirm: handlePopoverConfirm,
|
|
856
566
|
onCancel: handleCancelApply
|
|
857
567
|
}, {
|
|
858
|
-
default: (
|
|
859
|
-
|
|
860
|
-
(0, _vue.createVNode)(_component_bk_button, {
|
|
568
|
+
default: _withCtx(()=>[
|
|
569
|
+
_createVNode(_component_bk_button, {
|
|
861
570
|
loading: isLoadingConfirm.value,
|
|
862
571
|
theme: "primary",
|
|
863
572
|
onClick: handleConfirm
|
|
864
573
|
}, {
|
|
865
|
-
default: (
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
574
|
+
default: _withCtx(()=>[
|
|
575
|
+
..._cache[3] || (_cache[3] = [
|
|
576
|
+
_createTextVNode(" 保存并去智能体调试 ", -1 /* CACHED */ )
|
|
577
|
+
])
|
|
578
|
+
]),
|
|
870
579
|
_: 1 /* STABLE */
|
|
871
580
|
}, 8 /* PROPS */ , [
|
|
872
581
|
"loading"
|
|
873
582
|
])
|
|
874
|
-
]
|
|
875
|
-
}),
|
|
583
|
+
]),
|
|
876
584
|
_: 1 /* STABLE */
|
|
877
585
|
}, 8 /* PROPS */ , [
|
|
878
586
|
"width",
|
|
@@ -881,40 +589,37 @@ var _default = exports.default = /*@__PURE__*/ (0, _vue.defineComponent)({
|
|
|
881
589
|
"is-show",
|
|
882
590
|
"confirm-config"
|
|
883
591
|
]),
|
|
884
|
-
(
|
|
592
|
+
_createVNode(_component_bk_button, {
|
|
885
593
|
class: "g-ml-8",
|
|
886
594
|
onClick: handleClose
|
|
887
595
|
}, {
|
|
888
|
-
default: (
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
596
|
+
default: _withCtx(()=>[
|
|
597
|
+
..._cache[4] || (_cache[4] = [
|
|
598
|
+
_createTextVNode(" 取消 ", -1 /* CACHED */ )
|
|
599
|
+
])
|
|
600
|
+
]),
|
|
893
601
|
_: 1 /* STABLE */
|
|
894
602
|
})
|
|
895
603
|
])
|
|
896
|
-
]
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
return [
|
|
900
|
-
(0, _vue.renderSlot)(_ctx.$slots, "trigger", {
|
|
604
|
+
]),
|
|
605
|
+
default: _withCtx(()=>[
|
|
606
|
+
_renderSlot(_ctx.$slots, "trigger", {
|
|
901
607
|
handleShow: handleShow
|
|
902
|
-
},
|
|
903
|
-
|
|
904
|
-
(0, _vue.withDirectives)(((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_bk_button, {
|
|
608
|
+
}, ()=>[
|
|
609
|
+
_withDirectives((_openBlock(), _createBlock(_component_bk_button, {
|
|
905
610
|
disabled: props.disabled,
|
|
906
611
|
text: props.isTextButton,
|
|
907
612
|
theme: __props.theme,
|
|
908
613
|
size: "small",
|
|
909
|
-
onClick: (
|
|
614
|
+
onClick: _withModifiers(handleShow, [
|
|
910
615
|
"stop"
|
|
911
616
|
])
|
|
912
617
|
}, {
|
|
913
|
-
default: (
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
618
|
+
default: _withCtx(()=>[
|
|
619
|
+
..._cache[2] || (_cache[2] = [
|
|
620
|
+
_createTextVNode(" 关联至智能体 ", -1 /* CACHED */ )
|
|
621
|
+
])
|
|
622
|
+
]),
|
|
918
623
|
_: 1 /* STABLE */
|
|
919
624
|
}, 8 /* PROPS */ , [
|
|
920
625
|
"disabled",
|
|
@@ -931,10 +636,8 @@ var _default = exports.default = /*@__PURE__*/ (0, _vue.defineComponent)({
|
|
|
931
636
|
}
|
|
932
637
|
]
|
|
933
638
|
])
|
|
934
|
-
]
|
|
935
|
-
|
|
936
|
-
];
|
|
937
|
-
}),
|
|
639
|
+
], true)
|
|
640
|
+
]),
|
|
938
641
|
_: 3 /* FORWARDED */
|
|
939
642
|
}, 8 /* PROPS */ , [
|
|
940
643
|
"placement",
|