@blueking/ai-ui-sdk 0.3.0-beta.23 → 0.3.0-beta.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/render-agent/agent-type.vue.css +3 -3
- package/dist/components/render-agent/agent-type.vue.js +1 -1
- package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
- package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
- package/dist/components/render-auto-refresh/index.vue.css +8 -8
- package/dist/components/render-auto-refresh/index.vue.js +1 -1
- package/dist/components/render-card/agent/prefix-info-tool.vue.css +5 -5
- package/dist/components/render-card/agent/prefix-info-tool.vue.js +1 -1
- package/dist/components/render-card/base/approval-strategy-popover.script.vue.js.js +198 -0
- package/dist/components/render-card/base/approval-strategy-popover.vue.d.ts +19 -0
- package/dist/components/render-card/base/approval-strategy-popover.vue.js +3 -0
- package/dist/components/render-card/base.vue.css +12 -12
- package/dist/components/render-card/base.vue.js +1 -1
- package/dist/components/render-card/llm/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/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/index.script.vue.js.js +24 -3
- package/dist/components/render-card/mcp/index.vue.d.ts +5 -2
- package/dist/components/render-card/mcp/name-suffix.vue.css +2 -2
- package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
- package/dist/components/render-card/mcp/selected-tools-info.script.vue.js.js +156 -0
- package/dist/components/render-card/mcp/selected-tools-info.vue.d.ts +26 -0
- package/dist/components/render-card/mcp/selected-tools-info.vue.js +3 -0
- package/dist/components/render-card/prompt/icons.vue.css +1 -1
- package/dist/components/render-card/prompt/icons.vue.js +1 -1
- package/dist/components/render-card/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 +12 -4
- package/dist/components/render-card/tool/index.vue.d.ts +4 -1
- package/dist/components/render-card/tool/prefix-info-tool.script.vue.js.js +70 -20
- package/dist/components/render-card/tool/prefix-info-tool.vue.d.ts +4 -0
- package/dist/components/render-checkbox/index.vue.css +9 -9
- package/dist/components/render-checkbox/index.vue.js +1 -1
- package/dist/components/render-choose-tag/index.vue.css +7 -7
- package/dist/components/render-choose-tag/index.vue.js +1 -1
- package/dist/components/render-collapse/index.vue.css +2 -2
- package/dist/components/render-collapse/index.vue.js +1 -1
- package/dist/components/render-collection/content/index.vue.css +4 -4
- package/dist/components/render-collection/content/index.vue.js +1 -1
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +3 -3
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.css +1 -1
- package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
- package/dist/components/render-dataset/components/dataset-data-valid/index.vue.css +1 -1
- package/dist/components/render-dataset/components/dataset-data-valid/index.vue.js +1 -1
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
- package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
- package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +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 +2 -2
- 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.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-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 +27 -28
- package/dist/components/render-t-table/index.vue.js +1 -1
- package/dist/components/render-tag-tree/index.vue.css +7 -7
- package/dist/components/render-tag-tree/index.vue.js +1 -1
- package/dist/components/render-tags/index.vue.css +6 -6
- package/dist/components/render-tags/index.vue.js +1 -1
- package/dist/components.d.ts +3 -1
- package/dist/components.ts.js +3 -1
- package/dist/css/fonts/iconcool.eot +0 -0
- package/dist/css/fonts/iconcool.ttf +0 -0
- package/dist/css/fonts/iconcool.woff +0 -0
- package/dist/css/g-utilities.css +81 -0
- package/dist/css/g-utilities.manifest.json +20 -0
- package/dist/hooks/use-chat.d.ts +4 -0
- package/dist/http/helper/agent.d.ts +13 -1
- package/dist/http/helper/agent.ts.js +24 -2
- package/dist/http/helper/common.d.ts +13 -1
- package/dist/http/helper/common.ts.js +16 -0
- package/dist/http/helper/mcp.ts.js +5 -5
- package/dist/http/helper/tool.ts.js +3 -3
- package/dist/types/agent.d.ts +14 -0
- package/dist/types/common.d.ts +8 -0
- package/dist/types/mcp.d.ts +3 -3
- package/dist/types/tool.d.ts +3 -3
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ISpace } from '@/types';
|
|
2
|
-
import type { IAgentCommand } from '@/types/agent';
|
|
2
|
+
import type { IAgentCommand, IApprovalSetting } from '@/types/agent';
|
|
3
3
|
import { GroupType, ResourceCardType } from '@/types/enum';
|
|
4
4
|
import type { IApplicationMcp, IMcp } from '@/types/mcp';
|
|
5
5
|
import type { ISdkNavigateAction } from '@/types/navigate';
|
|
@@ -22,14 +22,17 @@ declare const __VLS_export: <T extends IMcp | IApplicationMcp>(__VLS_props: NonN
|
|
|
22
22
|
apiPrefix: string;
|
|
23
23
|
defaultIcon?: string;
|
|
24
24
|
showGenerateType?: boolean;
|
|
25
|
+
approvalSettings?: IApprovalSetting[];
|
|
25
26
|
} & {
|
|
26
27
|
onChoose?: (mcp: T) => any;
|
|
27
28
|
onEdit?: (mcp: T) => any;
|
|
28
29
|
onView?: (mcp: T) => any;
|
|
30
|
+
onDelete?: (mcp: T) => any;
|
|
29
31
|
onNavigate?: (value: ISdkNavigateAction) => any;
|
|
30
32
|
"onSuccess-delete"?: () => any;
|
|
31
33
|
"onSuccess-restore"?: () => any;
|
|
32
34
|
onSettings?: (mcp: T) => any;
|
|
35
|
+
"onUpdate:mcp"?: (mcp: T) => any;
|
|
33
36
|
}> & (typeof globalThis extends {
|
|
34
37
|
__VLS_PROPS_FALLBACK: infer P;
|
|
35
38
|
} ? P : {});
|
|
@@ -41,7 +44,7 @@ declare const __VLS_export: <T extends IMcp | IApplicationMcp>(__VLS_props: NonN
|
|
|
41
44
|
emit: {
|
|
42
45
|
(event: "success-delete" | "success-restore"): void;
|
|
43
46
|
(event: "navigate", value: ISdkNavigateAction): void;
|
|
44
|
-
(event: "edit" | "choose" | "settings" | "view", mcp: T): void;
|
|
47
|
+
(event: "edit" | "choose" | "settings" | "view" | "delete" | "update:mcp", mcp: T): void;
|
|
45
48
|
};
|
|
46
49
|
}>) => import("vue").VNode & {
|
|
47
50
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
.tool-number[data-v-
|
|
2
|
+
.tool-number[data-v-zkf229w8] {
|
|
3
3
|
background: #E1ECFF;
|
|
4
4
|
border-radius: 2px;
|
|
5
5
|
padding: 0 4px;
|
|
6
6
|
font-size: 10px;
|
|
7
7
|
}
|
|
8
|
-
.tool-number[data-v-
|
|
8
|
+
.tool-number[data-v-zkf229w8]:hover {
|
|
9
9
|
background: #3A84FF;
|
|
10
10
|
color: #fff;
|
|
11
11
|
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
2
|
+
if (key in obj) {
|
|
3
|
+
Object.defineProperty(obj, key, {
|
|
4
|
+
value: value,
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true
|
|
8
|
+
});
|
|
9
|
+
} else {
|
|
10
|
+
obj[key] = value;
|
|
11
|
+
}
|
|
12
|
+
return obj;
|
|
13
|
+
}
|
|
14
|
+
function _object_spread(target) {
|
|
15
|
+
for(var i = 1; i < arguments.length; i++){
|
|
16
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
+
var ownKeys = Object.keys(source);
|
|
18
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
ownKeys.forEach(function(key) {
|
|
24
|
+
_define_property(target, key, source[key]);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
}
|
|
29
|
+
function ownKeys(object, enumerableOnly) {
|
|
30
|
+
var keys = Object.keys(object);
|
|
31
|
+
if (Object.getOwnPropertySymbols) {
|
|
32
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
33
|
+
if (enumerableOnly) {
|
|
34
|
+
symbols = symbols.filter(function(sym) {
|
|
35
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
keys.push.apply(keys, symbols);
|
|
39
|
+
}
|
|
40
|
+
return keys;
|
|
41
|
+
}
|
|
42
|
+
function _object_spread_props(target, source) {
|
|
43
|
+
source = source != null ? source : {};
|
|
44
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
45
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
46
|
+
} else {
|
|
47
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
48
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return target;
|
|
52
|
+
}
|
|
53
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
54
|
+
import { unref as _unref, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, createCommentVNode as _createCommentVNode } from "vue";
|
|
55
|
+
const _hoisted_1 = {
|
|
56
|
+
key: 0,
|
|
57
|
+
class: "g-border-t-F0F1F5 g-mt-12 g-border-t-1"
|
|
58
|
+
};
|
|
59
|
+
const _hoisted_2 = {
|
|
60
|
+
class: "g-text-12 g-text-normal"
|
|
61
|
+
};
|
|
62
|
+
const _hoisted_3 = {
|
|
63
|
+
class: "mcp-tool-name g-text-12 g-text-black g-flex-1 g-ellipsis"
|
|
64
|
+
};
|
|
65
|
+
import { ref } from 'vue';
|
|
66
|
+
import RenderApprovalStrategyPopover from '../base/approval-strategy-popover.vue.js';
|
|
67
|
+
import { isEmpty } from '../../../common/util.ts.js';
|
|
68
|
+
export default /*@__PURE__*/ _defineComponent({
|
|
69
|
+
props: {
|
|
70
|
+
mcp: {},
|
|
71
|
+
approvalSettings: {},
|
|
72
|
+
disabled: {
|
|
73
|
+
type: Boolean
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
emits: [
|
|
77
|
+
"update:mcp"
|
|
78
|
+
],
|
|
79
|
+
setup (__props, { emit: __emit }) {
|
|
80
|
+
const props = __props;
|
|
81
|
+
const emits = __emit;
|
|
82
|
+
const isExpanded = ref(false);
|
|
83
|
+
const handleToggleCollapse = ()=>{
|
|
84
|
+
isExpanded.value = !isExpanded.value;
|
|
85
|
+
};
|
|
86
|
+
const handleApprovalConfirm = (tool, data)=>{
|
|
87
|
+
var _props_mcp;
|
|
88
|
+
const selectedTools = (((_props_mcp = props.mcp) === null || _props_mcp === void 0 ? void 0 : _props_mcp.selectedTools) || []).map((selectedTool)=>{
|
|
89
|
+
if (selectedTool.toolName === tool.toolName) {
|
|
90
|
+
return _object_spread_props(_object_spread({}, selectedTool), {
|
|
91
|
+
approvalEnabled: data.approvalEnabled,
|
|
92
|
+
approvalStrategyId: data.approvalStrategyId
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return selectedTool;
|
|
96
|
+
});
|
|
97
|
+
emits('update:mcp', _object_spread_props(_object_spread({}, props.mcp), {
|
|
98
|
+
selectedTools
|
|
99
|
+
}));
|
|
100
|
+
};
|
|
101
|
+
return (_ctx, _cache)=>{
|
|
102
|
+
var _props_mcp_selectedTools, _props_mcp_selectedTools1;
|
|
103
|
+
return !_unref(isEmpty)(props.mcp.selectedTools) ? (_openBlock(), _createElementBlock("section", _hoisted_1, [
|
|
104
|
+
_createElementVNode("section", {
|
|
105
|
+
class: "g-pt-8 g-pb-4 g-flex g-items-center g-cursor-pointer",
|
|
106
|
+
onClick: handleToggleCollapse
|
|
107
|
+
}, [
|
|
108
|
+
_createElementVNode("i", {
|
|
109
|
+
class: _normalizeClass({
|
|
110
|
+
'g-transition-transform ai-ui-sdk-icon ai-ui-sdk-angle-up-fill-3 g-text-12 g-text-normal g-mr-4': true,
|
|
111
|
+
'g-rotate--90': !isExpanded.value
|
|
112
|
+
})
|
|
113
|
+
}, null, 2 /* CLASS */ ),
|
|
114
|
+
_createElementVNode("span", _hoisted_2, "工具(" + _toDisplayString((_props_mcp_selectedTools = props.mcp.selectedTools) === null || _props_mcp_selectedTools === void 0 ? void 0 : _props_mcp_selectedTools.length) + ")", 1 /* TEXT */ )
|
|
115
|
+
]),
|
|
116
|
+
isExpanded.value ? (_openBlock(), _createElementBlock("ul", {
|
|
117
|
+
key: 0,
|
|
118
|
+
class: _normalizeClass({
|
|
119
|
+
'g-m-0 g-p-0 g-gap-y-4 g-flex-col': true,
|
|
120
|
+
'g-max-h-260 g-scrollbar': ((_props_mcp_selectedTools1 = props.mcp.selectedTools) === null || _props_mcp_selectedTools1 === void 0 ? void 0 : _props_mcp_selectedTools1.length) > 10
|
|
121
|
+
})
|
|
122
|
+
}, [
|
|
123
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(props.mcp.selectedTools, (tool)=>{
|
|
124
|
+
return _openBlock(), _createElementBlock("li", {
|
|
125
|
+
key: tool.toolName,
|
|
126
|
+
class: _normalizeClass([
|
|
127
|
+
'g-flex g-items-center g-justify-between g-h-24 g-px-4',
|
|
128
|
+
'hover:g-bg-[#f5f7fa] hover:g-cursor-pointer'
|
|
129
|
+
])
|
|
130
|
+
}, [
|
|
131
|
+
_cache[0] || (_cache[0] = _createElementVNode("span", {
|
|
132
|
+
class: "g-text-16 g-font-bold g-mr-8"
|
|
133
|
+
}, " · ", -1 /* CACHED */ )),
|
|
134
|
+
_createElementVNode("span", _hoisted_3, _toDisplayString(tool.toolName), 1 /* TEXT */ ),
|
|
135
|
+
_createVNode(RenderApprovalStrategyPopover, {
|
|
136
|
+
placement: "top",
|
|
137
|
+
"ext-cls": "g-flex-shrink-0 g-ml-8",
|
|
138
|
+
"approval-enabled": tool.approvalEnabled,
|
|
139
|
+
"approval-strategy-id": tool.approvalStrategyId,
|
|
140
|
+
"approval-settings": __props.approvalSettings,
|
|
141
|
+
"tool-name": tool.toolName,
|
|
142
|
+
onConfirm: (data)=>handleApprovalConfirm(tool, data)
|
|
143
|
+
}, null, 8 /* PROPS */ , [
|
|
144
|
+
"approval-enabled",
|
|
145
|
+
"approval-strategy-id",
|
|
146
|
+
"approval-settings",
|
|
147
|
+
"tool-name",
|
|
148
|
+
"onConfirm"
|
|
149
|
+
])
|
|
150
|
+
]);
|
|
151
|
+
}), 128 /* KEYED_FRAGMENT */ ))
|
|
152
|
+
], 2 /* CLASS */ )) : _createCommentVNode("v-if", true)
|
|
153
|
+
])) : _createCommentVNode("v-if", true);
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IApprovalSetting } from '@/types/agent';
|
|
2
|
+
import type { IMcp } from '@/types/mcp';
|
|
3
|
+
declare const __VLS_export: <T extends IMcp>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
5
|
+
mcp: T;
|
|
6
|
+
approvalSettings: IApprovalSetting[];
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
} & {
|
|
9
|
+
"onUpdate:mcp"?: (mcp: T) => any;
|
|
10
|
+
}> & (typeof globalThis extends {
|
|
11
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
12
|
+
} ? P : {});
|
|
13
|
+
expose: (exposed: {}) => void;
|
|
14
|
+
attrs: any;
|
|
15
|
+
slots: {};
|
|
16
|
+
emit: (e: "update:mcp", mcp: T) => void;
|
|
17
|
+
}>) => import("vue").VNode & {
|
|
18
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
19
|
+
};
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
23
|
+
[K in keyof T]: T[K];
|
|
24
|
+
} : {
|
|
25
|
+
[K in keyof T as K]: T[K];
|
|
26
|
+
}) & {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
.tag-pass[data-v-
|
|
2
|
+
.tag-pass[data-v-2og8qa9d] {
|
|
3
3
|
color: #299E56;
|
|
4
4
|
background: #DAF6E5;
|
|
5
5
|
}
|
|
6
|
-
.tag-fail[data-v-
|
|
6
|
+
.tag-fail[data-v-2og8qa9d] {
|
|
7
7
|
color: #E71818;
|
|
8
8
|
background: #FFDDDD;
|
|
9
9
|
}
|
|
10
|
-
.tag-error[data-v-
|
|
10
|
+
.tag-error[data-v-2og8qa9d] {
|
|
11
11
|
color: #E38B02;
|
|
12
12
|
background: #FCE5C0;
|
|
13
13
|
}
|
|
@@ -38,7 +38,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
38
38
|
spaces: {},
|
|
39
39
|
showGenerateType: {
|
|
40
40
|
type: Boolean
|
|
41
|
-
}
|
|
41
|
+
},
|
|
42
|
+
approvalSettings: {}
|
|
42
43
|
},
|
|
43
44
|
emits: [
|
|
44
45
|
"success-delete",
|
|
@@ -48,7 +49,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
48
49
|
"show-detail",
|
|
49
50
|
"choose",
|
|
50
51
|
"settings",
|
|
51
|
-
"navigate"
|
|
52
|
+
"navigate",
|
|
53
|
+
"update:tool"
|
|
52
54
|
],
|
|
53
55
|
setup (__props, { emit: __emit }) {
|
|
54
56
|
const props = __props;
|
|
@@ -74,6 +76,9 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
74
76
|
const handleSettings = ()=>{
|
|
75
77
|
emits('settings', props.tool);
|
|
76
78
|
};
|
|
79
|
+
const handleUpdateTool = (data)=>{
|
|
80
|
+
emits('update:tool', data);
|
|
81
|
+
};
|
|
77
82
|
const handleNavigate = (route)=>{
|
|
78
83
|
emits('navigate', route);
|
|
79
84
|
};
|
|
@@ -115,10 +120,13 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
115
120
|
_createVNode(RenderPrefixInfoTool, {
|
|
116
121
|
tool: props.tool,
|
|
117
122
|
disabled: props.disabled,
|
|
118
|
-
|
|
123
|
+
"approval-settings": props.approvalSettings,
|
|
124
|
+
onSettings: handleSettings,
|
|
125
|
+
"onUpdate:tool": handleUpdateTool
|
|
119
126
|
}, null, 8 /* PROPS */ , [
|
|
120
127
|
"tool",
|
|
121
|
-
"disabled"
|
|
128
|
+
"disabled",
|
|
129
|
+
"approval-settings"
|
|
122
130
|
])
|
|
123
131
|
]),
|
|
124
132
|
"footer-icons": _withCtx(()=>[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAgentCommand } from '@/types/agent';
|
|
1
|
+
import type { IAgentCommand, IApprovalSetting } from '@/types/agent';
|
|
2
2
|
import { ResourceCardType } from '@/types/enum';
|
|
3
3
|
import type { ISdkNavigateAction } from '@/types/navigate';
|
|
4
4
|
import type { ISpace } from '@/types/space';
|
|
@@ -20,6 +20,7 @@ declare const __VLS_export: <T extends ITool | IApplicationTool>(__VLS_props: No
|
|
|
20
20
|
apiPrefix: string;
|
|
21
21
|
spaces?: ISpace[];
|
|
22
22
|
showGenerateType?: boolean;
|
|
23
|
+
approvalSettings?: IApprovalSetting[];
|
|
23
24
|
} & {
|
|
24
25
|
onChoose?: (tool: T) => any;
|
|
25
26
|
onNavigate?: (value: ISdkNavigateAction) => any;
|
|
@@ -28,6 +29,7 @@ declare const __VLS_export: <T extends ITool | IApplicationTool>(__VLS_props: No
|
|
|
28
29
|
onSettings?: (tool: T) => any;
|
|
29
30
|
"onShow-debug"?: (tool: T) => any;
|
|
30
31
|
"onShow-edit"?: (tool: T) => any;
|
|
32
|
+
"onUpdate:tool"?: (value: ITool) => any;
|
|
31
33
|
"onShow-detail"?: (tool: T) => any;
|
|
32
34
|
}> & (typeof globalThis extends {
|
|
33
35
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -41,6 +43,7 @@ declare const __VLS_export: <T extends ITool | IApplicationTool>(__VLS_props: No
|
|
|
41
43
|
(event: "success-delete" | "success-restore"): void;
|
|
42
44
|
(event: "show-edit" | "show-debug" | "show-detail" | "choose" | "settings", tool: T): void;
|
|
43
45
|
(event: "navigate", value: ISdkNavigateAction): void;
|
|
46
|
+
(event: "update:tool", value: ITool): void;
|
|
44
47
|
};
|
|
45
48
|
}>) => import("vue").VNode & {
|
|
46
49
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
@@ -1,15 +1,46 @@
|
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
2
|
+
if (key in obj) {
|
|
3
|
+
Object.defineProperty(obj, key, {
|
|
4
|
+
value: value,
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true
|
|
8
|
+
});
|
|
9
|
+
} else {
|
|
10
|
+
obj[key] = value;
|
|
11
|
+
}
|
|
12
|
+
return obj;
|
|
13
|
+
}
|
|
14
|
+
function _object_spread(target) {
|
|
15
|
+
for(var i = 1; i < arguments.length; i++){
|
|
16
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
+
var ownKeys = Object.keys(source);
|
|
18
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
ownKeys.forEach(function(key) {
|
|
24
|
+
_define_property(target, key, source[key]);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
}
|
|
1
29
|
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
-
import { unref as _unref, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from "vue";
|
|
30
|
+
import { unref as _unref, createVNode as _createVNode, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, createElementVNode as _createElementVNode, withDirectives as _withDirectives, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from "vue";
|
|
31
|
+
import ApprovalStrategyPopover from '../base/approval-strategy-popover.vue.js';
|
|
3
32
|
import { ResourceStatus } from '../../../enums.ts.js';
|
|
4
33
|
export default /*@__PURE__*/ _defineComponent({
|
|
5
34
|
props: {
|
|
6
35
|
tool: {},
|
|
7
36
|
disabled: {
|
|
8
37
|
type: Boolean
|
|
9
|
-
}
|
|
38
|
+
},
|
|
39
|
+
approvalSettings: {}
|
|
10
40
|
},
|
|
11
41
|
emits: [
|
|
12
|
-
"settings"
|
|
42
|
+
"settings",
|
|
43
|
+
"update:tool"
|
|
13
44
|
],
|
|
14
45
|
setup (__props, { emit: __emit }) {
|
|
15
46
|
const props = __props;
|
|
@@ -18,25 +49,44 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
18
49
|
if (props.disabled) return;
|
|
19
50
|
emits('settings', props.tool);
|
|
20
51
|
};
|
|
52
|
+
const handleUpdateTool = (data)=>{
|
|
53
|
+
emits('update:tool', _object_spread({}, props.tool, data));
|
|
54
|
+
};
|
|
21
55
|
return (_ctx, _cache)=>{
|
|
22
56
|
const _directive_bk_tooltips = _resolveDirective("bk-tooltips");
|
|
23
|
-
return __props.tool.status !== _unref(ResourceStatus).Deleted ?
|
|
24
|
-
key: 0
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
]
|
|
39
|
-
|
|
57
|
+
return __props.tool.status !== _unref(ResourceStatus).Deleted ? (_openBlock(), _createElementBlock(_Fragment, {
|
|
58
|
+
key: 0
|
|
59
|
+
}, [
|
|
60
|
+
_createVNode(ApprovalStrategyPopover, {
|
|
61
|
+
"ext-cls": "g-ml-16",
|
|
62
|
+
"approval-enabled": __props.tool.approvalEnabled,
|
|
63
|
+
"approval-strategy-id": __props.tool.approvalStrategyId,
|
|
64
|
+
"approval-settings": __props.approvalSettings,
|
|
65
|
+
"tool-name": __props.tool.toolName,
|
|
66
|
+
onConfirm: handleUpdateTool
|
|
67
|
+
}, null, 8 /* PROPS */ , [
|
|
68
|
+
"approval-enabled",
|
|
69
|
+
"approval-strategy-id",
|
|
70
|
+
"approval-settings",
|
|
71
|
+
"tool-name"
|
|
72
|
+
]),
|
|
73
|
+
_withDirectives(_createElementVNode("i", {
|
|
74
|
+
class: _normalizeClass({
|
|
75
|
+
'ai-ui-sdk-icon ai-ui-sdk-setting-2 g-text-16 g-text-gray g-ml-16 g-mr-16': true,
|
|
76
|
+
'!g-cursor-pointer hover:!g-text-blue': !props.disabled,
|
|
77
|
+
'!g-disabled': props.disabled
|
|
78
|
+
}),
|
|
79
|
+
onClick: handleSettings
|
|
80
|
+
}, null, 2 /* CLASS */ ), [
|
|
81
|
+
[
|
|
82
|
+
_directive_bk_tooltips,
|
|
83
|
+
{
|
|
84
|
+
content: '调试工具',
|
|
85
|
+
placement: 'top'
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
])
|
|
89
|
+
], 64 /* STABLE_FRAGMENT */ )) : _createCommentVNode("v-if", true);
|
|
40
90
|
};
|
|
41
91
|
}
|
|
42
92
|
});
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import type { IApprovalSetting } from '@/types/agent';
|
|
1
2
|
import type { ITool } from '@/types/tool';
|
|
2
3
|
interface IProps {
|
|
3
4
|
tool: ITool;
|
|
4
5
|
disabled?: boolean;
|
|
6
|
+
approvalSettings?: IApprovalSetting[];
|
|
5
7
|
}
|
|
6
8
|
declare const __VLS_export: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
9
|
settings: (tool: ITool) => any;
|
|
10
|
+
"update:tool": (tool: ITool) => any;
|
|
8
11
|
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
|
9
12
|
onSettings?: (tool: ITool) => any;
|
|
13
|
+
"onUpdate:tool"?: (tool: ITool) => any;
|
|
10
14
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
15
|
declare const _default: typeof __VLS_export;
|
|
12
16
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.checkbox[data-v-
|
|
2
|
+
.checkbox[data-v-snq098ul] {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: inline-block;
|
|
5
5
|
width: 16px;
|
|
@@ -8,27 +8,27 @@
|
|
|
8
8
|
border-radius: 2px;
|
|
9
9
|
cursor: pointer;
|
|
10
10
|
}
|
|
11
|
-
.checkbox.disabled[data-v-
|
|
11
|
+
.checkbox.disabled[data-v-snq098ul] {
|
|
12
12
|
cursor: not-allowed;
|
|
13
13
|
background: #fafbfd;
|
|
14
14
|
border-color: #dcdee5;
|
|
15
15
|
}
|
|
16
|
-
.checkbox.disabled.checked[data-v-
|
|
16
|
+
.checkbox.disabled.checked[data-v-snq098ul] {
|
|
17
17
|
background-color: #a3c5fd;
|
|
18
18
|
border-color: #a3c5fd;
|
|
19
19
|
}
|
|
20
|
-
.checkbox.disabled.indeterminate[data-v-
|
|
20
|
+
.checkbox.disabled.indeterminate[data-v-snq098ul] {
|
|
21
21
|
background-color: #fafbfd;
|
|
22
22
|
border-color: #dcdee5;
|
|
23
23
|
}
|
|
24
|
-
.checkbox.disabled.indeterminate[data-v-
|
|
24
|
+
.checkbox.disabled.indeterminate[data-v-snq098ul]:after {
|
|
25
25
|
background: #dcdee5;
|
|
26
26
|
}
|
|
27
|
-
.checkbox.checked[data-v-
|
|
27
|
+
.checkbox.checked[data-v-snq098ul] {
|
|
28
28
|
background-color: #3a84ff;
|
|
29
29
|
border: 1px solid #3a84ff;
|
|
30
30
|
}
|
|
31
|
-
.checkbox.checked[data-v-
|
|
31
|
+
.checkbox.checked[data-v-snq098ul]:after {
|
|
32
32
|
position: absolute;
|
|
33
33
|
top: 50%;
|
|
34
34
|
left: 50%;
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
transform: translate(-50%, -60%) rotate(45deg);
|
|
42
42
|
transform-origin: center;
|
|
43
43
|
}
|
|
44
|
-
.checkbox.indeterminate[data-v-
|
|
44
|
+
.checkbox.indeterminate[data-v-snq098ul] {
|
|
45
45
|
background-color: #3a84ff;
|
|
46
46
|
border: 1px solid #3a84ff;
|
|
47
47
|
}
|
|
48
|
-
.checkbox.indeterminate[data-v-
|
|
48
|
+
.checkbox.indeterminate[data-v-snq098ul]:after {
|
|
49
49
|
position: absolute;
|
|
50
50
|
top: 50%;
|
|
51
51
|
left: 50%;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
|
|
2
|
-
.plus-tag-input[data-v-
|
|
2
|
+
.plus-tag-input[data-v-22okm4vo] {
|
|
3
3
|
padding: 7px 12px;
|
|
4
4
|
height: 40px;
|
|
5
5
|
background: #FAFBFD;
|
|
6
6
|
border-top: 1px solid #DCDEE5;
|
|
7
7
|
}
|
|
8
|
-
.plus-tag-input .plus-tag-done[data-v-
|
|
8
|
+
.plus-tag-input .plus-tag-done[data-v-22okm4vo] {
|
|
9
9
|
cursor: pointer;
|
|
10
10
|
font-size: 22px;
|
|
11
11
|
color: #2DCB56;
|
|
12
12
|
margin: 0 5px 0 10px;
|
|
13
13
|
}
|
|
14
|
-
.plus-tag-input .plus-tag-error[data-v-
|
|
14
|
+
.plus-tag-input .plus-tag-error[data-v-22okm4vo] {
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
font-size: 16px;
|
|
17
17
|
color: #C4C6CC;
|
|
18
18
|
margin-right: 5px;
|
|
19
19
|
}
|
|
20
|
-
.plus-tag-input .plus-tag-form[data-v-
|
|
20
|
+
.plus-tag-input .plus-tag-form[data-v-22okm4vo] {
|
|
21
21
|
flex: 1;
|
|
22
22
|
}
|
|
23
|
-
.plus-tag-input .plus-tag-form-item[data-v-
|
|
23
|
+
.plus-tag-input .plus-tag-form-item[data-v-22okm4vo] {
|
|
24
24
|
margin-bottom: 0;
|
|
25
25
|
}
|
|
26
|
-
.plus-tag[data-v-
|
|
26
|
+
.plus-tag[data-v-22okm4vo] {
|
|
27
27
|
cursor: pointer;
|
|
28
28
|
width: 100%;
|
|
29
29
|
height: 40px;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
font-size: 12px;
|
|
37
37
|
line-height: 20px;
|
|
38
38
|
}
|
|
39
|
-
.plus-tag[data-v-
|
|
39
|
+
.plus-tag[data-v-22okm4vo]:hover {
|
|
40
40
|
color: #3A84FF;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
.collapse-title[data-v-
|
|
2
|
+
.collapse-title[data-v-qe7sgdlk] {
|
|
3
3
|
height: 28px;
|
|
4
4
|
background: #F0F1F5;
|
|
5
5
|
border-radius: 2px;
|
|
6
6
|
padding: 0 12px;
|
|
7
7
|
}
|
|
8
|
-
.collapse-title .is-hidden[data-v-
|
|
8
|
+
.collapse-title .is-hidden[data-v-qe7sgdlk] {
|
|
9
9
|
transform: rotate(-90deg);
|
|
10
10
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
.row-list-wrap[data-v-
|
|
2
|
+
.row-list-wrap[data-v-cufqmuso] {
|
|
3
3
|
height: 186px;
|
|
4
4
|
overflow-y: auto;
|
|
5
5
|
}
|
|
6
|
-
.role-list-item[data-v-
|
|
6
|
+
.role-list-item[data-v-cufqmuso] {
|
|
7
7
|
padding: 12px;
|
|
8
8
|
background: #f5f7fa;
|
|
9
9
|
border-radius: 2px;
|
|
10
10
|
}
|
|
11
|
-
.role-list-item .prompt-tag[data-v-
|
|
11
|
+
.role-list-item .prompt-tag[data-v-cufqmuso] {
|
|
12
12
|
padding: 0 8px;
|
|
13
13
|
border: 1px solid #dcdee5;
|
|
14
14
|
border-radius: 11px;
|
|
15
15
|
font-size: 10px;
|
|
16
16
|
margin-left: 8px;
|
|
17
17
|
}
|
|
18
|
-
.role-list-item .prompt-content[data-v-
|
|
18
|
+
.role-list-item .prompt-content[data-v-cufqmuso] {
|
|
19
19
|
font-size: 12px;
|
|
20
20
|
line-height: 20px;
|
|
21
21
|
word-break: break-all;
|