@blueking/ai-ui-sdk 0.3.0-beta.31 → 0.3.0-beta.33
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 +1 -1
- package/dist/common/util.ts.js +48 -11
- 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.script.vue.js.js +2 -2
- 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/actions.script.vue.js.js +0 -3
- package/dist/components/render-card/agent/actions.vue.d.ts +0 -2
- package/dist/components/render-card/agent/index.script.vue.js.js +0 -2
- 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 +209 -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/actions.script.vue.js.js +0 -3
- package/dist/components/render-card/llm/actions.vue.d.ts +0 -2
- 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.script.vue.js.js +0 -2
- 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 +4 -4
- package/dist/components/render-card/mcp/actions.vue.d.ts +0 -2
- package/dist/components/render-card/mcp/index.script.vue.js.js +24 -5
- 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/role/index.vue.d.ts +1 -1
- package/dist/components/render-card/skill/index.script.vue.js.js +0 -2
- 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/actions.script.vue.js.js +1 -4
- package/dist/components/render-card/tool/actions.vue.d.ts +0 -2
- package/dist/components/render-card/tool/index.script.vue.js.js +13 -7
- 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/actions/index.vue.d.ts +2 -2
- 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 +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-detail-origin-data/index.script.vue.js.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-mcp/install/index.script.vue.js.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-search-select/index.script.vue.js.js +31 -12
- package/dist/components/render-search-select/index.vue.d.ts +2 -0
- 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/actions/index.script.vue.js.js +0 -3
- package/dist/components/render-skill/actions/index.vue.d.ts +0 -2
- 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/hooks/use-click-proxy.ts.js +1 -3
- 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/dataset.ts.js +1 -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/dataset.d.ts +4 -0
- package/dist/types/mcp.d.ts +3 -3
- package/dist/types/tool.d.ts +3 -3
- package/package.json +2 -2
|
@@ -10,7 +10,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
10
10
|
selfHostUrl: {},
|
|
11
11
|
externalUrl: {},
|
|
12
12
|
spaceId: {},
|
|
13
|
-
spaces: {},
|
|
14
13
|
apiPrefix: {}
|
|
15
14
|
},
|
|
16
15
|
emits: [
|
|
@@ -40,7 +39,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
40
39
|
placement: "top",
|
|
41
40
|
"resource-type": _unref(Module).LLM,
|
|
42
41
|
resource: props.model,
|
|
43
|
-
spaces: props.spaces,
|
|
44
42
|
"space-id": props.spaceId,
|
|
45
43
|
"api-prefix": props.apiPrefix,
|
|
46
44
|
onNavigate: handleNavigate
|
|
@@ -75,7 +73,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
75
73
|
}, 8 /* PROPS */ , [
|
|
76
74
|
"resource-type",
|
|
77
75
|
"resource",
|
|
78
|
-
"spaces",
|
|
79
76
|
"space-id",
|
|
80
77
|
"api-prefix"
|
|
81
78
|
]),
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ISpace } from '@/types';
|
|
2
1
|
import { IModel } from '@/types/model';
|
|
3
2
|
import type { ISdkNavigateAction } from '@/types/navigate';
|
|
4
3
|
interface IProps {
|
|
@@ -7,7 +6,6 @@ interface IProps {
|
|
|
7
6
|
selfHostUrl: string;
|
|
8
7
|
externalUrl: string;
|
|
9
8
|
spaceId: string;
|
|
10
|
-
spaces?: ISpace[];
|
|
11
9
|
apiPrefix: string;
|
|
12
10
|
}
|
|
13
11
|
declare const __VLS_export: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.llm-corner-badge[data-v-
|
|
2
|
+
.llm-corner-badge[data-v-qk7dcatq] {
|
|
3
3
|
top: 0;
|
|
4
4
|
right: 0;
|
|
5
5
|
width: 48px;
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
clip-path: polygon(100% 0, 0 0, 100% 100%);
|
|
9
9
|
border-radius: 0 8px;
|
|
10
10
|
}
|
|
11
|
-
.llm-corner-badge[data-v-
|
|
11
|
+
.llm-corner-badge[data-v-qk7dcatq]:hover {
|
|
12
12
|
background: linear-gradient(142.7deg, #fdf4e8 0%, #e5a239 100%);
|
|
13
13
|
}
|
|
14
|
-
.llm-corner-badge-text[data-v-
|
|
14
|
+
.llm-corner-badge-text[data-v-qk7dcatq] {
|
|
15
15
|
top: 8px;
|
|
16
16
|
right: 0;
|
|
17
17
|
transform: rotate(45deg);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
.like-button:hover .ai-ui-sdk-icon[data-v-
|
|
2
|
+
.like-button:hover .ai-ui-sdk-icon[data-v-uius2fh9], .like-button:hover span[data-v-uius2fh9] {
|
|
3
3
|
color: #3A84FF !important;
|
|
4
4
|
}
|
|
5
|
-
.dislike-button:hover .ai-ui-sdk-icon[data-v-
|
|
5
|
+
.dislike-button:hover .ai-ui-sdk-icon[data-v-uius2fh9], .dislike-button:hover span[data-v-uius2fh9], .dislike-button:active .ai-ui-sdk-icon[data-v-uius2fh9], .dislike-button:active span[data-v-uius2fh9] {
|
|
6
6
|
color: #EA3636 !important;
|
|
7
7
|
}
|
|
@@ -150,7 +150,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
150
150
|
model: props.model,
|
|
151
151
|
models: props.models,
|
|
152
152
|
"space-id": props.spaceId,
|
|
153
|
-
spaces: props.spaces,
|
|
154
153
|
"self-host-url": props.selfHostUrl,
|
|
155
154
|
"external-url": props.externalUrl,
|
|
156
155
|
"api-prefix": props.apiPrefix,
|
|
@@ -159,7 +158,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
159
158
|
"model",
|
|
160
159
|
"models",
|
|
161
160
|
"space-id",
|
|
162
|
-
"spaces",
|
|
163
161
|
"self-host-url",
|
|
164
162
|
"external-url",
|
|
165
163
|
"api-prefix"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
.tag-item[data-v-
|
|
2
|
+
.tag-item[data-v-6pr3ewvp] {
|
|
3
3
|
padding: 0 4px;
|
|
4
4
|
}
|
|
5
|
-
.tag-external[data-v-
|
|
5
|
+
.tag-external[data-v-6pr3ewvp] {
|
|
6
6
|
color: #636a2f;
|
|
7
7
|
background: #EAEFC6;
|
|
8
8
|
}
|
|
9
|
-
.tag-public[data-v-
|
|
9
|
+
.tag-public[data-v-6pr3ewvp], .tag-private[data-v-6pr3ewvp] {
|
|
10
10
|
color: #3a84ff;
|
|
11
11
|
background: #e1ecff;
|
|
12
12
|
}
|
|
@@ -15,7 +15,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
15
15
|
type: {},
|
|
16
16
|
groupType: {},
|
|
17
17
|
spaceId: {},
|
|
18
|
-
spaces: {},
|
|
19
18
|
apiPrefix: {}
|
|
20
19
|
},
|
|
21
20
|
emits: [
|
|
@@ -46,6 +45,9 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
46
45
|
const getIsFullType = ()=>{
|
|
47
46
|
return props.type === ResourceCardType.Full;
|
|
48
47
|
};
|
|
48
|
+
const getIsMarketType = ()=>{
|
|
49
|
+
return props.type === ResourceCardType.Market;
|
|
50
|
+
};
|
|
49
51
|
const getIsNotDeleted = ()=>{
|
|
50
52
|
return props.mcp.status !== ResourceStatus.Deleted;
|
|
51
53
|
};
|
|
@@ -291,7 +293,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
291
293
|
"loading"
|
|
292
294
|
])) : _createCommentVNode("v-if", true)
|
|
293
295
|
], 64 /* STABLE_FRAGMENT */ )),
|
|
294
|
-
getIsNotDeleted() ? (_openBlock(), _createBlock(RenderDropdown, {
|
|
296
|
+
getIsNotDeleted() && (getIsFullType() || getIsMarketType()) ? (_openBlock(), _createBlock(RenderDropdown, {
|
|
295
297
|
key: 3,
|
|
296
298
|
placement: "bottom-start",
|
|
297
299
|
theme: "light",
|
|
@@ -333,7 +335,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
333
335
|
"resource-type": _unref(Module).Mcp,
|
|
334
336
|
resource: __props.mcp,
|
|
335
337
|
"space-id": props.spaceId,
|
|
336
|
-
spaces: props.spaces,
|
|
337
338
|
"api-prefix": props.apiPrefix,
|
|
338
339
|
onNavigate: handleNavigate
|
|
339
340
|
}, null, 8 /* PROPS */ , [
|
|
@@ -341,7 +342,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
341
342
|
"resource-type",
|
|
342
343
|
"resource",
|
|
343
344
|
"space-id",
|
|
344
|
-
"spaces",
|
|
345
345
|
"api-prefix"
|
|
346
346
|
])
|
|
347
347
|
]),
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { GroupType, ResourceCardType } from '@/types/enum';
|
|
2
2
|
import type { IMcp } from '@/types/mcp';
|
|
3
3
|
import type { ISdkNavigateAction } from '@/types/navigate';
|
|
4
|
-
import type { ISpace } from '@/types/space';
|
|
5
4
|
interface IProps {
|
|
6
5
|
mcp: IMcp;
|
|
7
6
|
type: ResourceCardType;
|
|
8
7
|
groupType?: GroupType;
|
|
9
8
|
spaceId?: string;
|
|
10
|
-
spaces?: ISpace[];
|
|
11
9
|
apiPrefix: string;
|
|
12
10
|
}
|
|
13
11
|
declare const __VLS_export: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
@@ -6,6 +6,7 @@ import RenderActions from './actions.vue.js';
|
|
|
6
6
|
import RenderCodeSuffix from './code-suffix.vue.js';
|
|
7
7
|
import RenderNameSuffix from './name-suffix.vue.js';
|
|
8
8
|
import RenderPrefixInfoTool from './prefix-info-tool.vue.js';
|
|
9
|
+
import RenderSelectedToolsInfo from './selected-tools-info.vue.js';
|
|
9
10
|
import RenderTooltip from './tooltip.vue.js';
|
|
10
11
|
import { Module, ResourceStatus } from '../../../types/enum.ts.js';
|
|
11
12
|
export default /*@__PURE__*/ _defineComponent({
|
|
@@ -42,7 +43,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
42
43
|
defaultIcon: {},
|
|
43
44
|
showGenerateType: {
|
|
44
45
|
type: Boolean
|
|
45
|
-
}
|
|
46
|
+
},
|
|
47
|
+
approvalSettings: {}
|
|
46
48
|
},
|
|
47
49
|
emits: [
|
|
48
50
|
"success-delete",
|
|
@@ -51,7 +53,9 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
51
53
|
"edit",
|
|
52
54
|
"choose",
|
|
53
55
|
"settings",
|
|
54
|
-
"view"
|
|
56
|
+
"view",
|
|
57
|
+
"delete",
|
|
58
|
+
"update:mcp"
|
|
55
59
|
],
|
|
56
60
|
setup (__props, { emit: __emit }) {
|
|
57
61
|
const props = __props;
|
|
@@ -77,6 +81,12 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
77
81
|
const handleNavigate = (route)=>{
|
|
78
82
|
emits('navigate', route);
|
|
79
83
|
};
|
|
84
|
+
const handleUpdateMcp = (data)=>{
|
|
85
|
+
emits('update:mcp', data);
|
|
86
|
+
};
|
|
87
|
+
const handleDelete = ()=>{
|
|
88
|
+
emits('delete', props.mcp);
|
|
89
|
+
};
|
|
80
90
|
return (_ctx, _cache)=>{
|
|
81
91
|
return _openBlock(), _createBlock(RenderBase, {
|
|
82
92
|
class: "g-relative",
|
|
@@ -111,7 +121,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
111
121
|
"default-icon": props.defaultIcon,
|
|
112
122
|
"show-generate-type": props.showGenerateType,
|
|
113
123
|
onChoose: handleChoose,
|
|
114
|
-
onView: handleView
|
|
124
|
+
onView: handleView,
|
|
125
|
+
onDelete: handleDelete
|
|
115
126
|
}, {
|
|
116
127
|
"prefix-info-tool": _withCtx(()=>[
|
|
117
128
|
_createVNode(RenderPrefixInfoTool, {
|
|
@@ -150,6 +161,16 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
150
161
|
"type"
|
|
151
162
|
])
|
|
152
163
|
]),
|
|
164
|
+
info: _withCtx(()=>[
|
|
165
|
+
_createVNode(RenderSelectedToolsInfo, {
|
|
166
|
+
mcp: props.mcp,
|
|
167
|
+
"approval-settings": props.approvalSettings,
|
|
168
|
+
"onUpdate:mcp": handleUpdateMcp
|
|
169
|
+
}, null, 8 /* PROPS */ , [
|
|
170
|
+
"mcp",
|
|
171
|
+
"approval-settings"
|
|
172
|
+
])
|
|
173
|
+
]),
|
|
153
174
|
"footer-icons": _withCtx(()=>[
|
|
154
175
|
props.mcp.status !== _unref(ResourceStatus).Deleted ? (_openBlock(), _createBlock(RenderReferenceIcon, {
|
|
155
176
|
key: 0,
|
|
@@ -180,7 +201,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
180
201
|
type: props.type,
|
|
181
202
|
"group-type": props.groupType,
|
|
182
203
|
"space-id": props.spaceId,
|
|
183
|
-
spaces: props.spaces,
|
|
184
204
|
"api-prefix": props.apiPrefix,
|
|
185
205
|
onNavigate: handleNavigate,
|
|
186
206
|
onEdit: handleEditMcp,
|
|
@@ -191,7 +211,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
191
211
|
"type",
|
|
192
212
|
"group-type",
|
|
193
213
|
"space-id",
|
|
194
|
-
"spaces",
|
|
195
214
|
"api-prefix"
|
|
196
215
|
])
|
|
197
216
|
]),
|
|
@@ -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-r3dapwrk] {
|
|
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-r3dapwrk]: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-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
|
+
}) & {};
|
|
@@ -25,10 +25,10 @@ declare const __VLS_export: <T extends ICollection | IApplicationCollection>(__V
|
|
|
25
25
|
} & {
|
|
26
26
|
onChoose?: (role: T) => any;
|
|
27
27
|
onEdit?: (role: ICollection) => any;
|
|
28
|
-
onCopy?: (role: ICollection) => any;
|
|
29
28
|
onView?: (role: ICollection) => any;
|
|
30
29
|
onDelete?: (role: T) => any;
|
|
31
30
|
onNavigate?: (value: ISdkNavigateAction) => any;
|
|
31
|
+
onCopy?: (role: ICollection) => any;
|
|
32
32
|
"onSuccess-delete"?: () => any;
|
|
33
33
|
"onSuccess-restore"?: () => any;
|
|
34
34
|
"onSuccess-edit"?: () => any;
|
|
@@ -189,7 +189,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
189
189
|
skill: props.skill,
|
|
190
190
|
type: props.type,
|
|
191
191
|
"space-id": __props.spaceId,
|
|
192
|
-
spaces: __props.spaces,
|
|
193
192
|
"api-prefix": props.apiPrefix,
|
|
194
193
|
onEdit: handleEdit,
|
|
195
194
|
onInstall: handleInstall,
|
|
@@ -201,7 +200,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
201
200
|
"skill",
|
|
202
201
|
"type",
|
|
203
202
|
"space-id",
|
|
204
|
-
"spaces",
|
|
205
203
|
"api-prefix"
|
|
206
204
|
])
|
|
207
205
|
]),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
.tag-pass[data-v-
|
|
2
|
+
.tag-pass[data-v-v1ebj3wl] {
|
|
3
3
|
color: #299E56;
|
|
4
4
|
background: #DAF6E5;
|
|
5
5
|
}
|
|
6
|
-
.tag-fail[data-v-
|
|
6
|
+
.tag-fail[data-v-v1ebj3wl] {
|
|
7
7
|
color: #E71818;
|
|
8
8
|
background: #FFDDDD;
|
|
9
9
|
}
|
|
10
|
-
.tag-error[data-v-
|
|
10
|
+
.tag-error[data-v-v1ebj3wl] {
|
|
11
11
|
color: #E38B02;
|
|
12
12
|
background: #FCE5C0;
|
|
13
13
|
}
|
|
@@ -12,8 +12,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
12
12
|
tool: {},
|
|
13
13
|
type: {},
|
|
14
14
|
spaceId: {},
|
|
15
|
-
apiPrefix: {}
|
|
16
|
-
spaces: {}
|
|
15
|
+
apiPrefix: {}
|
|
17
16
|
},
|
|
18
17
|
emits: [
|
|
19
18
|
"success-delete",
|
|
@@ -236,7 +235,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
236
235
|
"resource-type": _unref(Module).Tool,
|
|
237
236
|
resource: __props.tool,
|
|
238
237
|
"space-id": props.spaceId,
|
|
239
|
-
spaces: props.spaces,
|
|
240
238
|
"api-prefix": props.apiPrefix,
|
|
241
239
|
onNavigate: handleNavigate
|
|
242
240
|
}, null, 8 /* PROPS */ , [
|
|
@@ -244,7 +242,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
244
242
|
"resource-type",
|
|
245
243
|
"resource",
|
|
246
244
|
"space-id",
|
|
247
|
-
"spaces",
|
|
248
245
|
"api-prefix"
|
|
249
246
|
])
|
|
250
247
|
]),
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { ResourceCardType } from '@/types/enum';
|
|
2
2
|
import type { ISdkNavigateAction } from '@/types/navigate';
|
|
3
|
-
import type { ISpace } from '@/types/space';
|
|
4
3
|
import type { ITool } from '@/types/tool';
|
|
5
4
|
interface IProps {
|
|
6
5
|
tool: ITool;
|
|
7
6
|
type: ResourceCardType;
|
|
8
7
|
spaceId?: string;
|
|
9
8
|
apiPrefix: string;
|
|
10
|
-
spaces?: ISpace[];
|
|
11
9
|
}
|
|
12
10
|
declare const __VLS_export: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
11
|
navigate: (value: ISdkNavigateAction) => any;
|