@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,28 +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 _vue = require("vue");
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require('../../../node_modules/@babel/runtime/helpers/defineProperty.js'));
|
|
10
|
-
require('../../../node_modules/core-js/modules/es.array.map.js');
|
|
11
|
-
require('../../../node_modules/core-js/modules/es.function.name.js');
|
|
12
|
-
require('../../../node_modules/core-js/modules/es.object.to-string.js');
|
|
13
|
-
require('../../../node_modules/core-js/modules/es.promise.js');
|
|
14
|
-
require('../../../node_modules/core-js/modules/es.regexp.to-string.js');
|
|
15
|
-
var _index = _interopRequireDefault(require('../render-t-table/index.vue.js'));
|
|
16
|
-
var _useAgentHttp2 = require('../../hooks/use-agent-http.ts.js');
|
|
17
|
-
var _useCollectionHttp2 = require('../../hooks/use-collection-http.ts.js');
|
|
18
|
-
var _useCredentialHttp2 = require('../../hooks/use-credential-http.ts.js');
|
|
19
|
-
var _useKnowledgeHttp2 = require('../../hooks/use-knowledge-http.ts.js');
|
|
20
|
-
var _useLlmHttp2 = require('../../hooks/use-llm-http.ts.js');
|
|
21
|
-
var _useMcpHttp2 = require('../../hooks/use-mcp-http.ts.js');
|
|
22
|
-
var _useSkillHttp2 = require('../../hooks/use-skill-http.ts.js');
|
|
23
|
-
var _useToolHttp2 = require('../../hooks/use-tool-http.ts.js');
|
|
24
|
-
var _enum = require('../../types/enum.ts.js');
|
|
25
|
-
var __awaiter = (void 0) && (void 0).__awaiter || function(thisArg, _arguments, P, generator) {
|
|
1
|
+
var __awaiter = this && this.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
26
2
|
function adopt(value) {
|
|
27
3
|
return value instanceof P ? value : new P(function(resolve) {
|
|
28
4
|
resolve(value);
|
|
@@ -49,19 +25,32 @@ var __awaiter = (void 0) && (void 0).__awaiter || function(thisArg, _arguments,
|
|
|
49
25
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
50
26
|
});
|
|
51
27
|
};
|
|
52
|
-
|
|
28
|
+
import { defineComponent as _defineComponent, createVNode as _createVNode2, resolveComponent as _resolveComponent2, isVNode as _isVNode } from 'vue';
|
|
29
|
+
import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from "vue";
|
|
30
|
+
const _hoisted_1 = {
|
|
53
31
|
class: "g-flex-row"
|
|
54
32
|
};
|
|
55
|
-
|
|
33
|
+
const _hoisted_2 = {
|
|
56
34
|
class: "g-text-14 g-text-gray"
|
|
57
35
|
};
|
|
58
|
-
|
|
36
|
+
const _hoisted_3 = {
|
|
59
37
|
class: "reference-table"
|
|
60
38
|
};
|
|
39
|
+
import { ref, toRef, watch } from 'vue';
|
|
40
|
+
import RenderTTable from '../render-t-table/index.vue.js';
|
|
41
|
+
import { useAgentHttp } from '../../hooks/use-agent-http.ts.js';
|
|
42
|
+
import { useCollectionHttp } from '../../hooks/use-collection-http.ts.js';
|
|
43
|
+
import { useCredentialHttp } from '../../hooks/use-credential-http.ts.js';
|
|
44
|
+
import { useKnowledgeHttp } from '../../hooks/use-knowledge-http.ts.js';
|
|
45
|
+
import { useLlmHttp } from '../../hooks/use-llm-http.ts.js';
|
|
46
|
+
import { useMcpHttp } from '../../hooks/use-mcp-http.ts.js';
|
|
47
|
+
import { useSkillHttp } from '../../hooks/use-skill-http.ts.js';
|
|
48
|
+
import { useToolHttp } from '../../hooks/use-tool-http.ts.js';
|
|
49
|
+
import { GroupType, KnowledgePathType, Module, SdkNavigateActionType } from '../../types/enum.ts.js';
|
|
61
50
|
function _isSlot(s) {
|
|
62
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(
|
|
51
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
63
52
|
}
|
|
64
|
-
|
|
53
|
+
export default /*@__PURE__*/ _defineComponent({
|
|
65
54
|
props: {
|
|
66
55
|
isShow: {
|
|
67
56
|
type: Boolean
|
|
@@ -77,278 +66,248 @@ var _default2 = exports.default = /*@__PURE__*/ (0, _vue.defineComponent)({
|
|
|
77
66
|
"update:isShow",
|
|
78
67
|
"navigate"
|
|
79
68
|
],
|
|
80
|
-
setup
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
var _useAgentHttp = (0, _useAgentHttp2.useAgentHttp)(props.apiPrefix, (0, _vue.toRef)(props, 'spaceId')), getAgentReferringAgents = _useAgentHttp.getAgentReferringAgents;
|
|
86
|
-
var _useKnowledgeHttp = (0, _useKnowledgeHttp2.useKnowledgeHttp)(props.apiPrefix, (0, _vue.toRef)(props, 'spaceId')), getKnowledgebaseReferringAgents = _useKnowledgeHttp.getKnowledgebaseReferringAgents;
|
|
69
|
+
setup (__props, { emit: __emit }) {
|
|
70
|
+
const props = __props;
|
|
71
|
+
const emits = __emit;
|
|
72
|
+
const { getAgentReferringAgents } = useAgentHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
73
|
+
const { getKnowledgebaseReferringAgents } = useKnowledgeHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
87
74
|
;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
75
|
+
const { getToolReferringAgents } = useToolHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
76
|
+
const { getMcpReferringAgents } = useMcpHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
77
|
+
const { getCredentialReferenceList } = useCredentialHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
91
78
|
;
|
|
92
|
-
|
|
79
|
+
const { getCollectionReferringAgents } = useCollectionHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
93
80
|
;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
81
|
+
const { getSkillReferringAgents } = useSkillHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
82
|
+
const { getLLMReferringAgents } = useLlmHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
83
|
+
const referenceTypes = [
|
|
97
84
|
{
|
|
98
|
-
id:
|
|
85
|
+
id: Module.Knowledgebase,
|
|
99
86
|
name: '知识库'
|
|
100
87
|
},
|
|
101
88
|
{
|
|
102
|
-
id:
|
|
89
|
+
id: Module.Tool,
|
|
103
90
|
name: '工具'
|
|
104
91
|
},
|
|
105
92
|
{
|
|
106
|
-
id:
|
|
93
|
+
id: Module.Mcp,
|
|
107
94
|
name: 'MCP'
|
|
108
95
|
},
|
|
109
96
|
{
|
|
110
|
-
id:
|
|
97
|
+
id: Module.Cr,
|
|
111
98
|
name: 'CR'
|
|
112
99
|
}
|
|
113
100
|
];
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
101
|
+
const tableDataMap = ref({
|
|
102
|
+
[Module.Knowledgebase]: {
|
|
103
|
+
data: [],
|
|
104
|
+
columns: [
|
|
105
|
+
{
|
|
106
|
+
title: '知识名称',
|
|
107
|
+
colKey: 'knowledgeName'
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
title: '所属知识库',
|
|
111
|
+
colKey: 'knowledgeBaseName'
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
title: '所属空间',
|
|
115
|
+
colKey: 'spaceName'
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
[Module.Tool]: {
|
|
120
|
+
data: [],
|
|
121
|
+
columns: [
|
|
122
|
+
{
|
|
123
|
+
title: '工具名称',
|
|
124
|
+
colKey: 'toolName'
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
title: '所属空间',
|
|
128
|
+
colKey: 'spaceName'
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
[Module.Mcp]: {
|
|
133
|
+
data: [],
|
|
134
|
+
columns: [
|
|
135
|
+
{
|
|
136
|
+
title: 'MCP名称',
|
|
137
|
+
colKey: 'mcpName'
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
title: '所属空间',
|
|
141
|
+
colKey: 'spaceName'
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
[Module.Cr]: {
|
|
146
|
+
data: [],
|
|
147
|
+
columns: [
|
|
148
|
+
{
|
|
149
|
+
title: 'CR名称',
|
|
150
|
+
colKey: 'crName'
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
title: '所属空间',
|
|
154
|
+
colKey: 'spaceName'
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
[Module.Agent]: {
|
|
159
|
+
data: [],
|
|
160
|
+
columns: [
|
|
161
|
+
{
|
|
162
|
+
title: '智能体名称',
|
|
163
|
+
colKey: 'agentName'
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
title: '所属空间',
|
|
167
|
+
colKey: 'spaceName'
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
title: '引用人',
|
|
171
|
+
colKey: 'updatedBy'
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
title: '引用时间',
|
|
175
|
+
colKey: 'updatedAt'
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
const radioGroupValue = ref(Module.Knowledgebase);
|
|
181
|
+
const loading = ref(false);
|
|
182
|
+
const getColumns = ()=>tableDataMap.value[radioGroupValue.value].columns.map((column, index)=>({
|
|
192
183
|
title: column.title,
|
|
193
184
|
colKey: column.colKey,
|
|
194
185
|
className: '!g-h-32',
|
|
195
|
-
cell:
|
|
196
|
-
var row = _ref3.row;
|
|
186
|
+
cell: (h, { row })=>{
|
|
197
187
|
if (index === 0) {
|
|
198
|
-
|
|
199
|
-
return radioGroupValue.value ===
|
|
188
|
+
const cellValue = row[column.colKey];
|
|
189
|
+
return radioGroupValue.value === Module.Agent ? _createVNode2("span", null, [
|
|
200
190
|
cellValue
|
|
201
|
-
]) : (
|
|
191
|
+
]) : _createVNode2(_resolveComponent2("bk-button"), {
|
|
202
192
|
"text": true,
|
|
203
193
|
"theme": "primary",
|
|
204
|
-
"onClick":
|
|
205
|
-
return handleToDetail(row);
|
|
206
|
-
}
|
|
194
|
+
"onClick": ()=>handleToDetail(row)
|
|
207
195
|
}, _isSlot(cellValue) ? cellValue : {
|
|
208
|
-
default:
|
|
209
|
-
return [
|
|
196
|
+
default: ()=>[
|
|
210
197
|
cellValue
|
|
211
|
-
]
|
|
212
|
-
}
|
|
198
|
+
]
|
|
213
199
|
});
|
|
214
200
|
}
|
|
215
|
-
if (column.colKey === 'spaceName' && props.module ===
|
|
216
|
-
return (
|
|
201
|
+
if (column.colKey === 'spaceName' && props.module === Module.Credential) {
|
|
202
|
+
return _createVNode2("span", null, [
|
|
217
203
|
props.spaceName || row.spaceId
|
|
218
204
|
]);
|
|
219
205
|
}
|
|
220
206
|
if (column.colKey === 'updatedBy') {
|
|
221
|
-
return (
|
|
207
|
+
return _createVNode2(_resolveComponent2("bk-user-display-name"), {
|
|
222
208
|
"user-id": row[column.colKey]
|
|
223
209
|
}, null);
|
|
224
210
|
}
|
|
225
|
-
return (
|
|
211
|
+
return _createVNode2("span", null, [
|
|
226
212
|
row[column.colKey]
|
|
227
213
|
]);
|
|
228
214
|
}
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
};
|
|
232
|
-
var handleClose = function handleClose() {
|
|
215
|
+
}));
|
|
216
|
+
const handleClose = ()=>{
|
|
233
217
|
emits('update:isShow', false);
|
|
234
218
|
};
|
|
235
219
|
// 获取本类型的数据长度
|
|
236
|
-
|
|
220
|
+
const getTableLength = (id)=>{
|
|
237
221
|
return tableDataMap.value[id].data.length;
|
|
238
222
|
};
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
_context.prev = 1;
|
|
248
|
-
module = props.module, id = props.id;
|
|
249
|
-
apiFn = referringAgentsApiMap[module];
|
|
250
|
-
if (!(props.module !== _enum.Module.Credential)) {
|
|
251
|
-
_context.next = 3;
|
|
252
|
-
break;
|
|
253
|
-
}
|
|
254
|
-
_context.next = 2;
|
|
255
|
-
return apiFn(id);
|
|
256
|
-
case 2:
|
|
257
|
-
tableDataMap.value[_enum.Module.Agent].data = _context.sent;
|
|
258
|
-
_context.next = 5;
|
|
259
|
-
break;
|
|
260
|
-
case 3:
|
|
261
|
-
_context.next = 4;
|
|
262
|
-
return getCredentialReferenceList(id);
|
|
263
|
-
case 4:
|
|
264
|
-
_yield$getCredentialR = _context.sent;
|
|
265
|
-
knowledge = _yield$getCredentialR.knowledge;
|
|
266
|
-
tool = _yield$getCredentialR.tool;
|
|
267
|
-
codeReview = _yield$getCredentialR.codeReview;
|
|
268
|
-
mcp = _yield$getCredentialR.mcp;
|
|
269
|
-
tableDataMap.value[_enum.Module.Tool].data = tool;
|
|
270
|
-
tableDataMap.value[_enum.Module.Knowledgebase].data = knowledge;
|
|
271
|
-
tableDataMap.value[_enum.Module.Mcp].data = mcp;
|
|
272
|
-
tableDataMap.value[_enum.Module.Cr].data = codeReview;
|
|
273
|
-
case 5:
|
|
274
|
-
_context.prev = 5;
|
|
275
|
-
loading.value = false;
|
|
276
|
-
return _context.finish(5);
|
|
277
|
-
case 6:
|
|
278
|
-
case "end":
|
|
279
|
-
return _context.stop();
|
|
280
|
-
}
|
|
281
|
-
}, _callee, null, [
|
|
282
|
-
[
|
|
283
|
-
1,
|
|
284
|
-
,
|
|
285
|
-
5,
|
|
286
|
-
6
|
|
287
|
-
]
|
|
288
|
-
]);
|
|
289
|
-
}));
|
|
223
|
+
const referringAgentsApiMap = {
|
|
224
|
+
[Module.Agent]: getAgentReferringAgents,
|
|
225
|
+
[Module.Tool]: getToolReferringAgents,
|
|
226
|
+
[Module.Skill]: getSkillReferringAgents,
|
|
227
|
+
[Module.Mcp]: getMcpReferringAgents,
|
|
228
|
+
[Module.LLM]: getLLMReferringAgents,
|
|
229
|
+
[Module.Knowledgebase]: getKnowledgebaseReferringAgents,
|
|
230
|
+
[Module.Collection]: getCollectionReferringAgents
|
|
290
231
|
};
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
232
|
+
const handleShowReferenceDetail = ()=>__awaiter(this, void 0, void 0, function*() {
|
|
233
|
+
loading.value = true;
|
|
234
|
+
try {
|
|
235
|
+
const { module, id } = props;
|
|
236
|
+
const apiFn = referringAgentsApiMap[module];
|
|
237
|
+
if (props.module !== Module.Credential) {
|
|
238
|
+
tableDataMap.value[Module.Agent].data = yield apiFn(id);
|
|
239
|
+
} else {
|
|
240
|
+
const { knowledge, tool, codeReview, mcp } = yield getCredentialReferenceList(id);
|
|
241
|
+
tableDataMap.value[Module.Tool].data = tool;
|
|
242
|
+
tableDataMap.value[Module.Knowledgebase].data = knowledge;
|
|
243
|
+
tableDataMap.value[Module.Mcp].data = mcp;
|
|
244
|
+
tableDataMap.value[Module.Cr].data = codeReview;
|
|
245
|
+
}
|
|
246
|
+
} finally{
|
|
247
|
+
loading.value = false;
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
const handleToDetail = (row)=>{
|
|
251
|
+
const refRow = row;
|
|
252
|
+
let action;
|
|
294
253
|
switch(radioGroupValue.value){
|
|
295
|
-
case
|
|
254
|
+
case Module.Agent:
|
|
296
255
|
{
|
|
297
|
-
|
|
256
|
+
const agentRow = row;
|
|
298
257
|
action = {
|
|
299
|
-
type:
|
|
258
|
+
type: SdkNavigateActionType.Agent,
|
|
300
259
|
spaceId: agentRow.spaceId,
|
|
301
260
|
agentName: agentRow.agentName,
|
|
302
|
-
groupType:
|
|
261
|
+
groupType: GroupType.All
|
|
303
262
|
};
|
|
304
263
|
break;
|
|
305
264
|
}
|
|
306
|
-
case
|
|
265
|
+
case Module.Knowledgebase:
|
|
307
266
|
{
|
|
308
|
-
if (refRow.pathType ===
|
|
267
|
+
if (refRow.pathType === KnowledgePathType.File) {
|
|
309
268
|
action = {
|
|
310
|
-
type:
|
|
269
|
+
type: SdkNavigateActionType.KnowledgebaseFile,
|
|
311
270
|
spaceId: String(refRow.spaceId),
|
|
312
271
|
anchorPath: refRow.parentAnchorPath,
|
|
313
272
|
knowledgeName: refRow.knowledgeName,
|
|
314
|
-
groupType:
|
|
273
|
+
groupType: GroupType.All
|
|
315
274
|
};
|
|
316
275
|
} else {
|
|
317
276
|
action = {
|
|
318
|
-
type:
|
|
277
|
+
type: SdkNavigateActionType.KnowledgebaseFolder,
|
|
319
278
|
spaceId: String(refRow.spaceId),
|
|
320
279
|
anchorPath: refRow.anchorPath,
|
|
321
|
-
groupType:
|
|
280
|
+
groupType: GroupType.All
|
|
322
281
|
};
|
|
323
282
|
}
|
|
324
283
|
break;
|
|
325
284
|
}
|
|
326
|
-
case
|
|
285
|
+
case Module.Tool:
|
|
327
286
|
{
|
|
328
287
|
action = {
|
|
329
|
-
type:
|
|
288
|
+
type: SdkNavigateActionType.Tool,
|
|
330
289
|
spaceId: String(refRow.spaceId),
|
|
331
290
|
toolName: refRow.toolName,
|
|
332
|
-
groupType:
|
|
291
|
+
groupType: GroupType.All
|
|
333
292
|
};
|
|
334
293
|
break;
|
|
335
294
|
}
|
|
336
|
-
case
|
|
295
|
+
case Module.Cr:
|
|
337
296
|
{
|
|
338
297
|
action = {
|
|
339
|
-
type:
|
|
298
|
+
type: SdkNavigateActionType.Cr,
|
|
340
299
|
spaceId: String(refRow.spaceId),
|
|
341
300
|
id: String(refRow.codereviewId)
|
|
342
301
|
};
|
|
343
302
|
break;
|
|
344
303
|
}
|
|
345
|
-
case
|
|
304
|
+
case Module.Mcp:
|
|
346
305
|
{
|
|
347
306
|
action = {
|
|
348
|
-
type:
|
|
307
|
+
type: SdkNavigateActionType.Mcp,
|
|
349
308
|
spaceId: String(refRow.spaceId),
|
|
350
309
|
mcpName: refRow.mcpName,
|
|
351
|
-
groupType:
|
|
310
|
+
groupType: GroupType.All
|
|
352
311
|
};
|
|
353
312
|
break;
|
|
354
313
|
}
|
|
@@ -357,73 +316,63 @@ var _default2 = exports.default = /*@__PURE__*/ (0, _vue.defineComponent)({
|
|
|
357
316
|
}
|
|
358
317
|
emits('navigate', action);
|
|
359
318
|
};
|
|
360
|
-
(
|
|
361
|
-
return props.isShow;
|
|
362
|
-
}, function() {
|
|
319
|
+
watch(()=>props.isShow, ()=>{
|
|
363
320
|
if (props.isShow) {
|
|
364
|
-
radioGroupValue.value = props.module ===
|
|
321
|
+
radioGroupValue.value = props.module === Module.Credential ? Module.Knowledgebase : Module.Agent;
|
|
365
322
|
handleShowReferenceDetail();
|
|
366
323
|
}
|
|
367
324
|
});
|
|
368
|
-
return
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
return (
|
|
325
|
+
return (_ctx, _cache)=>{
|
|
326
|
+
const _component_bk_radio_button = _resolveComponent("bk-radio-button");
|
|
327
|
+
const _component_bk_radio_group = _resolveComponent("bk-radio-group");
|
|
328
|
+
const _component_bk_sideslider = _resolveComponent("bk-sideslider");
|
|
329
|
+
return _openBlock(), _createBlock(_component_bk_sideslider, {
|
|
373
330
|
"is-show": __props.isShow,
|
|
374
331
|
width: "960px",
|
|
375
332
|
onClosed: handleClose
|
|
376
333
|
}, {
|
|
377
|
-
header: (
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
_cache[1] || (_cache[1] = (0, _vue.createElementVNode)("span", {
|
|
334
|
+
header: _withCtx(()=>[
|
|
335
|
+
_createElementVNode("section", _hoisted_1, [
|
|
336
|
+
_cache[1] || (_cache[1] = _createElementVNode("span", {
|
|
381
337
|
class: "title"
|
|
382
338
|
}, " 引用的实例 ", -1 /* CACHED */ )),
|
|
383
|
-
_cache[2] || (_cache[2] = (
|
|
339
|
+
_cache[2] || (_cache[2] = _createElementVNode("span", {
|
|
384
340
|
class: "g-gap g-ml-14 g-mr-8"
|
|
385
341
|
}, null, -1 /* CACHED */ )),
|
|
386
|
-
(
|
|
342
|
+
_createElementVNode("span", _hoisted_2, _toDisplayString(props.name), 1 /* TEXT */ )
|
|
387
343
|
])
|
|
388
|
-
]
|
|
389
|
-
|
|
390
|
-
default: (0, _vue.withCtx)(function() {
|
|
344
|
+
]),
|
|
345
|
+
default: _withCtx(()=>{
|
|
391
346
|
var _a, _b;
|
|
392
347
|
return [
|
|
393
|
-
(
|
|
394
|
-
props.module === (
|
|
348
|
+
_createElementVNode("section", _hoisted_3, [
|
|
349
|
+
props.module === _unref(Module).Credential ? (_openBlock(), _createBlock(_component_bk_radio_group, {
|
|
395
350
|
key: 0,
|
|
396
351
|
modelValue: radioGroupValue.value,
|
|
397
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] =
|
|
398
|
-
return radioGroupValue.value = $event;
|
|
399
|
-
}),
|
|
352
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>radioGroupValue.value = $event),
|
|
400
353
|
type: "capsule",
|
|
401
354
|
class: "g-flex-row g-mb-14 !g-w-full"
|
|
402
355
|
}, {
|
|
403
|
-
default: (
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
return (0, _vue.createVNode)(_component_bk_radio_button, {
|
|
356
|
+
default: _withCtx(()=>[
|
|
357
|
+
(_openBlock(), _createElementBlock(_Fragment, null, _renderList(referenceTypes, (referenceType)=>{
|
|
358
|
+
return _createVNode(_component_bk_radio_button, {
|
|
407
359
|
label: referenceType.id,
|
|
408
360
|
key: referenceType.id
|
|
409
361
|
}, {
|
|
410
|
-
default: (
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
];
|
|
414
|
-
}),
|
|
362
|
+
default: _withCtx(()=>[
|
|
363
|
+
_createTextVNode(_toDisplayString(referenceType.name) + "(" + _toDisplayString(getTableLength(referenceType.id)) + ") ", 1 /* TEXT */ )
|
|
364
|
+
]),
|
|
415
365
|
_: 2 /* DYNAMIC */
|
|
416
366
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
|
|
417
367
|
"label"
|
|
418
368
|
]);
|
|
419
369
|
}), 64 /* STABLE_FRAGMENT */ ))
|
|
420
|
-
]
|
|
421
|
-
}),
|
|
370
|
+
]),
|
|
422
371
|
_: 1 /* STABLE */
|
|
423
372
|
}, 8 /* PROPS */ , [
|
|
424
373
|
"modelValue"
|
|
425
|
-
])) : (
|
|
426
|
-
(
|
|
374
|
+
])) : _createCommentVNode("v-if", true),
|
|
375
|
+
_createVNode(RenderTTable, {
|
|
427
376
|
"row-key": (_b = (_a = tableDataMap.value[radioGroupValue.value].columns) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.colKey,
|
|
428
377
|
columns: getColumns(),
|
|
429
378
|
"is-loading": loading.value,
|