@blueking/ai-ui-sdk 0.4.1-beta.5 → 0.4.1-beta.6
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.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/name-suffix.vue.css +2 -2
- package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
- package/dist/components/render-card/prompt/icons.vue.css +1 -1
- package/dist/components/render-card/prompt/icons.vue.js +1 -1
- package/dist/components/render-card/prompt/index.script.vue.js.js +5 -1
- package/dist/components/render-card/role/index.script.vue.js.js +1 -0
- 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-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.script.vue.js.js +29 -4
- package/dist/components/render-collection/actions/index.vue.d.ts +3 -0
- 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.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.script.vue.js.js +11 -5
- 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-prompt/actions/index.script.vue.js.js +32 -6
- package/dist/components/render-prompt/actions/index.vue.d.ts +3 -0
- package/dist/components/render-prompt/content/index.vue.css +1 -1
- package/dist/components/render-prompt/content/index.vue.js +1 -1
- package/dist/components/render-reference/index.vue.css +2 -2
- package/dist/components/render-reference/index.vue.js +1 -1
- package/dist/components/render-relate-agent/index.script.vue.js +46 -21
- package/dist/components/render-relate-agent/index.vue.d.ts +3 -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 -27
- package/dist/components/render-t-table/index.vue.js +1 -1
- package/dist/components/render-tag-tree/index.vue.css +7 -7
- package/dist/components/render-tag-tree/index.vue.js +1 -1
- package/dist/components/render-tags/index.vue.css +6 -6
- package/dist/components/render-tags/index.vue.js +1 -1
- package/dist/css/g-utilities.css +2 -2
- package/dist/css/g-utilities.manifest.json +1 -1
- package/dist/http/helper/knowledge.d.ts +10 -1
- package/dist/http/helper/knowledge.ts.js +82 -19
- package/dist/types/agent.d.ts +3 -3
- package/dist/types/enum.d.ts +10 -0
- package/dist/types/enum.ts.js +12 -0
- package/dist/types/knowledge.d.ts +113 -10
- package/package.json +1 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
|
|
2
|
-
.choose-space[data-v-
|
|
2
|
+
.choose-space[data-v-vfpqlle4] {
|
|
3
3
|
padding: 0 18px 0 24px;
|
|
4
4
|
height: 100%;
|
|
5
5
|
font-size: 12px;
|
|
6
6
|
}
|
|
7
|
-
.space-list[data-v-
|
|
7
|
+
.space-list[data-v-vfpqlle4] {
|
|
8
8
|
margin-top: 12px;
|
|
9
9
|
height: calc(100% - 44px);
|
|
10
10
|
}
|
|
11
|
-
.space-list .space-item[data-v-
|
|
11
|
+
.space-list .space-item[data-v-vfpqlle4] {
|
|
12
12
|
line-height: 32px;
|
|
13
13
|
padding-left: 8px;
|
|
14
14
|
}
|
|
15
|
-
.space-list .space-item[data-v-
|
|
15
|
+
.space-list .space-item[data-v-vfpqlle4]:hover {
|
|
16
16
|
background: #f5f7fa;
|
|
17
17
|
}
|
|
18
|
-
.space-list .space-item.space-item-active[data-v-
|
|
18
|
+
.space-list .space-item.space-item-active[data-v-vfpqlle4] {
|
|
19
19
|
background: #F0F5FF;
|
|
20
20
|
color: #3A84FF;
|
|
21
21
|
}
|
|
22
|
-
.space-list .space-item.space-item-active .space-tool-number[data-v-
|
|
22
|
+
.space-list .space-item.space-item-active .space-tool-number[data-v-vfpqlle4] {
|
|
23
23
|
background: #A3C5FD;
|
|
24
24
|
color: #FFFFFF;
|
|
25
25
|
}
|
|
26
|
-
.space-list .space-item.space-item-active .bkaidev-guanlikongjian-3[data-v-
|
|
26
|
+
.space-list .space-item.space-item-active .bkaidev-guanlikongjian-3[data-v-vfpqlle4] {
|
|
27
27
|
color: #3A84FF;
|
|
28
28
|
}
|
|
29
|
-
.space-list .space-item.space-item-active .ai-ui-sdk-icon[data-v-
|
|
29
|
+
.space-list .space-item.space-item-active .ai-ui-sdk-icon[data-v-vfpqlle4] {
|
|
30
30
|
color: #3A84FF;
|
|
31
31
|
}
|
|
32
|
-
.space-list .space-tool-number[data-v-
|
|
32
|
+
.space-list .space-tool-number[data-v-vfpqlle4] {
|
|
33
33
|
padding: 0 6px;
|
|
34
34
|
border-radius: 2px;
|
|
35
35
|
background: #F0F1F5;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
|
|
2
|
-
.resource-dialog[data-v-
|
|
2
|
+
.resource-dialog[data-v-hp5nlhgv] .bk-modal-wrapper {
|
|
3
3
|
max-width: 1600px;
|
|
4
4
|
}
|
|
5
|
-
.resource-dialog-main[data-v-
|
|
5
|
+
.resource-dialog-main[data-v-hp5nlhgv] {
|
|
6
6
|
height: 60vh;
|
|
7
7
|
}
|
|
8
|
-
.resource-dialog-choose[data-v-
|
|
8
|
+
.resource-dialog-choose[data-v-hp5nlhgv] {
|
|
9
9
|
width: 75%;
|
|
10
10
|
height: 100%;
|
|
11
11
|
}
|
|
12
|
-
.resource-dialog-title[data-v-
|
|
12
|
+
.resource-dialog-title[data-v-hp5nlhgv] {
|
|
13
13
|
font-size: 20px;
|
|
14
14
|
line-height: 28px;
|
|
15
15
|
color: #313238;
|
|
16
16
|
padding: 15px 24px 14px;
|
|
17
17
|
}
|
|
18
|
-
.resource-dialog-layout[data-v-
|
|
18
|
+
.resource-dialog-layout[data-v-hp5nlhgv] {
|
|
19
19
|
height: calc(100% - 57px);
|
|
20
20
|
}
|
|
21
|
-
.resource-dialog-result[data-v-
|
|
21
|
+
.resource-dialog-result[data-v-hp5nlhgv] {
|
|
22
22
|
width: 25%;
|
|
23
23
|
height: 100%;
|
|
24
24
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
.upload-file-home[data-v-
|
|
2
|
+
.upload-file-home[data-v-nppi7qxf] {
|
|
3
3
|
position: relative;
|
|
4
4
|
background: #FFFFFF;
|
|
5
5
|
border: 1px solid #DCDEE5;
|
|
6
6
|
border-radius: 4px;
|
|
7
7
|
padding: 12px 12px 10px 12px;
|
|
8
8
|
}
|
|
9
|
-
.upload-file-home[data-v-
|
|
9
|
+
.upload-file-home[data-v-nppi7qxf]:hover {
|
|
10
10
|
border: 1px solid #3A84FF;
|
|
11
11
|
}
|
|
12
|
-
.upload-file-home:hover .file-icons[data-v-
|
|
12
|
+
.upload-file-home:hover .file-icons[data-v-nppi7qxf] {
|
|
13
13
|
display: flex;
|
|
14
14
|
}
|
|
15
|
-
.upload-file-home .file-icon[data-v-
|
|
15
|
+
.upload-file-home .file-icon[data-v-nppi7qxf] {
|
|
16
16
|
font-size: 32px;
|
|
17
17
|
}
|
|
18
|
-
.upload-file-home .file-content[data-v-
|
|
18
|
+
.upload-file-home .file-content[data-v-nppi7qxf] {
|
|
19
19
|
font-size: 12px;
|
|
20
20
|
flex: 1;
|
|
21
21
|
align-items: flex-start;
|
|
@@ -23,28 +23,28 @@
|
|
|
23
23
|
font-weight: normal;
|
|
24
24
|
width: 0;
|
|
25
25
|
}
|
|
26
|
-
.upload-file-home .file-content .file-name[data-v-
|
|
26
|
+
.upload-file-home .file-content .file-name[data-v-nppi7qxf] {
|
|
27
27
|
width: 100%;
|
|
28
28
|
font-size: 14px;
|
|
29
29
|
line-height: 20px;
|
|
30
30
|
}
|
|
31
|
-
.upload-file-home .file-content .file-size[data-v-
|
|
31
|
+
.upload-file-home .file-content .file-size[data-v-nppi7qxf] {
|
|
32
32
|
font-size: 12px;
|
|
33
33
|
color: #979BA5;
|
|
34
34
|
line-height: 20px;
|
|
35
35
|
}
|
|
36
|
-
.upload-file-home .file-icons[data-v-
|
|
36
|
+
.upload-file-home .file-icons[data-v-nppi7qxf] {
|
|
37
37
|
display: none;
|
|
38
38
|
color: #979BA5;
|
|
39
39
|
}
|
|
40
|
-
.upload-file-home .file-icons .ai-ui-sdk-icon[data-v-
|
|
40
|
+
.upload-file-home .file-icons .ai-ui-sdk-icon[data-v-nppi7qxf] {
|
|
41
41
|
cursor: pointer;
|
|
42
42
|
margin-right: 15px;
|
|
43
43
|
font-size: 16px;
|
|
44
44
|
}
|
|
45
|
-
.upload-file-home .file-icons .ai-ui-sdk-icon[data-v-
|
|
45
|
+
.upload-file-home .file-icons .ai-ui-sdk-icon[data-v-nppi7qxf]:hover {
|
|
46
46
|
color: #3A84FF;
|
|
47
47
|
}
|
|
48
|
-
.upload-file-home .file-icons .ai-ui-sdk-delete[data-v-
|
|
48
|
+
.upload-file-home .file-icons .ai-ui-sdk-delete[data-v-nppi7qxf] {
|
|
49
49
|
margin: 0;
|
|
50
50
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
|
|
2
|
-
.ai-ui-sdk-icon.ai-ui-sdk-pdf[data-v-
|
|
2
|
+
.ai-ui-sdk-icon.ai-ui-sdk-pdf[data-v-skoh4y1l] {
|
|
3
3
|
color: #EA3636;
|
|
4
4
|
}
|
|
5
|
-
.ai-ui-sdk-icon.ai-ui-sdk-doc-2[data-v-
|
|
5
|
+
.ai-ui-sdk-icon.ai-ui-sdk-doc-2[data-v-skoh4y1l], .ai-ui-sdk-icon.ai-ui-sdk-ppt-2[data-v-skoh4y1l], .ai-ui-sdk-icon.ai-ui-sdk-markdown[data-v-skoh4y1l] {
|
|
6
6
|
color: #3A84FF;
|
|
7
7
|
}
|
|
8
|
-
.ai-ui-sdk-icon.ai-ui-sdk-folder-fill[data-v-
|
|
8
|
+
.ai-ui-sdk-icon.ai-ui-sdk-folder-fill[data-v-skoh4y1l] {
|
|
9
9
|
color: #C4C6CC;
|
|
10
10
|
}
|
|
11
|
-
.ai-ui-sdk-icon.ai-ui-sdk-archive-line[data-v-
|
|
11
|
+
.ai-ui-sdk-icon.ai-ui-sdk-archive-line[data-v-skoh4y1l] {
|
|
12
12
|
color: #979BA5;
|
|
13
13
|
}
|
|
14
|
-
.ai-ui-sdk-icon.ai-ui-sdk-excel[data-v-
|
|
14
|
+
.ai-ui-sdk-icon.ai-ui-sdk-excel[data-v-skoh4y1l] {
|
|
15
15
|
color: #2DCB56;
|
|
16
16
|
}
|
|
17
|
-
.ai-ui-sdk-icon.ai-ui-sdk-wangye[data-v-
|
|
17
|
+
.ai-ui-sdk-icon.ai-ui-sdk-wangye[data-v-skoh4y1l] {
|
|
18
18
|
color: #14A568;
|
|
19
19
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
.generate-type-tag[data-v-
|
|
2
|
+
.generate-type-tag[data-v-tqvdydq5] {
|
|
3
3
|
border-radius: 2px;
|
|
4
4
|
text-align: left;
|
|
5
5
|
white-space: nowrap;
|
|
6
6
|
}
|
|
7
|
-
.generate-type-tag.public[data-v-
|
|
7
|
+
.generate-type-tag.public[data-v-tqvdydq5] {
|
|
8
8
|
color: #2CAF5E;
|
|
9
9
|
background-color: #DAF6E5;
|
|
10
10
|
}
|
|
11
|
-
.generate-type-tag.public[data-v-
|
|
11
|
+
.generate-type-tag.public[data-v-tqvdydq5]:hover {
|
|
12
12
|
color: #299E56;
|
|
13
13
|
background-color: #CBF0DA;
|
|
14
14
|
}
|
|
15
|
-
.generate-type-tag.space[data-v-
|
|
15
|
+
.generate-type-tag.space[data-v-tqvdydq5] {
|
|
16
16
|
color: #45A0A5;
|
|
17
17
|
background-color: #D8F4F5;
|
|
18
18
|
}
|
|
19
|
-
.generate-type-tag.space[data-v-
|
|
19
|
+
.generate-type-tag.space[data-v-tqvdydq5]:hover {
|
|
20
20
|
color: #388A8E;
|
|
21
21
|
background-color: #B6E7E9;
|
|
22
22
|
}
|
|
@@ -14,7 +14,8 @@ const _hoisted_4 = {
|
|
|
14
14
|
class: "g-h-56 g-px-16 g-py-12 g-flex-row g-justify-between"
|
|
15
15
|
};
|
|
16
16
|
const _hoisted_5 = {
|
|
17
|
-
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "g-flex-row g-bg-f0f1f5 g-p-4 g-inline-flex-row g-rounded-2"
|
|
18
19
|
};
|
|
19
20
|
const _hoisted_6 = [
|
|
20
21
|
"onClick"
|
|
@@ -23,6 +24,7 @@ const _hoisted_7 = {
|
|
|
23
24
|
key: 0,
|
|
24
25
|
class: "ai-ui-sdk-icon ai-ui-sdk-info-line g-text-14 g-ml-4 !g-cursor-pointer"
|
|
25
26
|
};
|
|
27
|
+
import { useSlots } from 'vue';
|
|
26
28
|
import { isEmpty } from '../../common/util.ts.js';
|
|
27
29
|
export default /*@__PURE__*/ _defineComponent({
|
|
28
30
|
props: {
|
|
@@ -39,6 +41,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
39
41
|
setup (__props, { emit: __emit }) {
|
|
40
42
|
const props = __props;
|
|
41
43
|
const emit = __emit;
|
|
44
|
+
const slots = useSlots();
|
|
45
|
+
const getIsShowInfo = ()=>!isEmpty(props.tabs) || !!slots['action-right'];
|
|
42
46
|
const handleChoose = (val)=>{
|
|
43
47
|
emit('update:groupType', val);
|
|
44
48
|
};
|
|
@@ -52,8 +56,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
52
56
|
_renderSlot(_ctx.$slots, "title-right", {}, undefined, true)
|
|
53
57
|
])
|
|
54
58
|
], true),
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
getIsShowInfo() ? (_openBlock(), _createElementBlock("section", _hoisted_4, [
|
|
60
|
+
!_unref(isEmpty)(props.tabs) ? (_openBlock(), _createElementBlock("ul", _hoisted_5, [
|
|
57
61
|
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(props.tabs, (tab)=>{
|
|
58
62
|
return _openBlock(), _createElementBlock("li", {
|
|
59
63
|
class: _normalizeClass({
|
|
@@ -75,6 +79,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
75
79
|
]) : _createCommentVNode("v-if", true),
|
|
76
80
|
_createVNode(_component_bk_loading, {
|
|
77
81
|
loading: props.loading,
|
|
82
|
+
color: props.groupType === tab.id ? '#fff' : '#f0f1f5',
|
|
78
83
|
class: "g-number-font",
|
|
79
84
|
mode: "spin",
|
|
80
85
|
size: "mini",
|
|
@@ -85,11 +90,12 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
85
90
|
]),
|
|
86
91
|
_: 2 /* DYNAMIC */
|
|
87
92
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
|
|
88
|
-
"loading"
|
|
93
|
+
"loading",
|
|
94
|
+
"color"
|
|
89
95
|
])
|
|
90
96
|
], 10 /* CLASS, PROPS */ , _hoisted_6);
|
|
91
97
|
}), 128 /* KEYED_FRAGMENT */ ))
|
|
92
|
-
]),
|
|
98
|
+
])) : _createCommentVNode("v-if", true),
|
|
93
99
|
_renderSlot(_ctx.$slots, "action-right", {}, undefined, true)
|
|
94
100
|
])) : _createCommentVNode("v-if", true)
|
|
95
101
|
]);
|
|
@@ -3,6 +3,7 @@ import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock,
|
|
|
3
3
|
import { ref, toRef } from 'vue';
|
|
4
4
|
import ApplicationBaseActions from '../../render-card/base/application-base-actions.vue.js';
|
|
5
5
|
import RenderDropdown from '../../render-dropdown/index.vue.js';
|
|
6
|
+
import RelateAgent from '../../render-relate-agent/index.vue.js';
|
|
6
7
|
import { usePermission } from '../../../hooks/use-permission.ts.js';
|
|
7
8
|
import { usePromptHttp } from '../../../hooks/use-prompt-http.ts.js';
|
|
8
9
|
import { Module, ResourceCardType, ResourcePermissionAction, ResourceStatus } from '../../../types/enum.ts.js';
|
|
@@ -17,7 +18,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
17
18
|
emits: [
|
|
18
19
|
"success-delete",
|
|
19
20
|
"success-restore",
|
|
20
|
-
"edit"
|
|
21
|
+
"edit",
|
|
22
|
+
"navigate"
|
|
21
23
|
],
|
|
22
24
|
setup (__props, { emit: __emit }) {
|
|
23
25
|
const props = __props;
|
|
@@ -83,6 +85,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
83
85
|
handleHideRestore();
|
|
84
86
|
});
|
|
85
87
|
};
|
|
88
|
+
const handleNavigate = (route)=>{
|
|
89
|
+
handleHideDropdown();
|
|
90
|
+
emits('navigate', route);
|
|
91
|
+
};
|
|
86
92
|
return (_ctx, _cache)=>{
|
|
87
93
|
const _component_bk_button = _resolveComponent("bk-button");
|
|
88
94
|
const _component_bk_pop_confirm = _resolveComponent("bk-pop-confirm");
|
|
@@ -120,7 +126,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
120
126
|
]))
|
|
121
127
|
}, {
|
|
122
128
|
default: _withCtx(()=>[
|
|
123
|
-
..._cache[
|
|
129
|
+
..._cache[5] || (_cache[5] = [
|
|
124
130
|
_createTextVNode(" 编辑 ", -1 /* CACHED */ )
|
|
125
131
|
])
|
|
126
132
|
]),
|
|
@@ -148,7 +154,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
148
154
|
])
|
|
149
155
|
}, {
|
|
150
156
|
default: _withCtx(()=>[
|
|
151
|
-
..._cache[
|
|
157
|
+
..._cache[6] || (_cache[6] = [
|
|
152
158
|
_createTextVNode(" 恢复 ", -1 /* CACHED */ )
|
|
153
159
|
])
|
|
154
160
|
]),
|
|
@@ -185,7 +191,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
185
191
|
]))
|
|
186
192
|
}, {
|
|
187
193
|
default: _withCtx(()=>[
|
|
188
|
-
..._cache[
|
|
194
|
+
..._cache[7] || (_cache[7] = [
|
|
189
195
|
_createElementVNode("i", {
|
|
190
196
|
class: "ai-ui-sdk-icon ai-ui-sdk-gengduo-2 g-text-16"
|
|
191
197
|
}, null, -1 /* CACHED */ )
|
|
@@ -201,6 +207,26 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
201
207
|
`prompt-card-menu-${__props.prompt.id}`
|
|
202
208
|
])
|
|
203
209
|
}, [
|
|
210
|
+
_createElementVNode("li", {
|
|
211
|
+
onClick: _cache[2] || (_cache[2] = _withModifiers(()=>{}, [
|
|
212
|
+
"stop"
|
|
213
|
+
]))
|
|
214
|
+
}, [
|
|
215
|
+
_createVNode(RelateAgent, {
|
|
216
|
+
boundary: `.prompt-card-menu-${__props.prompt.id}`,
|
|
217
|
+
"resource-type": _unref(Module).Prompt,
|
|
218
|
+
resource: __props.prompt,
|
|
219
|
+
"space-id": props.spaceId,
|
|
220
|
+
"api-prefix": props.apiPrefix,
|
|
221
|
+
onNavigate: handleNavigate
|
|
222
|
+
}, null, 8 /* PROPS */ , [
|
|
223
|
+
"boundary",
|
|
224
|
+
"resource-type",
|
|
225
|
+
"resource",
|
|
226
|
+
"space-id",
|
|
227
|
+
"api-prefix"
|
|
228
|
+
])
|
|
229
|
+
]),
|
|
204
230
|
_createVNode(_component_bk_pop_confirm, {
|
|
205
231
|
"confirm-config": {
|
|
206
232
|
loading: isDeletingPrompt.value
|
|
@@ -223,9 +249,9 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
223
249
|
}),
|
|
224
250
|
onMouseenter: handleManagePermissionMouseEnter,
|
|
225
251
|
onMousemove: handleManagePermissionMouseMove,
|
|
226
|
-
onMouseleave: _cache[
|
|
252
|
+
onMouseleave: _cache[3] || (_cache[3] = //@ts-ignore
|
|
227
253
|
(...args)=>_unref(handleMouseLeave) && _unref(handleMouseLeave)(...args)),
|
|
228
|
-
onClick: _cache[
|
|
254
|
+
onClick: _cache[4] || (_cache[4] = _withModifiers(($event)=>handleManagePermissionMouseClick(handleShowDelete), [
|
|
229
255
|
"stop"
|
|
230
256
|
]))
|
|
231
257
|
}, " 归档 ", 34 /* CLASS, NEED_HYDRATION */ )
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ResourceCardType } from '@/types/enum';
|
|
2
|
+
import type { ISdkNavigateAction } from '@/types/navigate';
|
|
2
3
|
import type { IPrompt } from '@/types/prompt';
|
|
3
4
|
interface IProps {
|
|
4
5
|
prompt: IPrompt;
|
|
@@ -9,10 +10,12 @@ interface IProps {
|
|
|
9
10
|
}
|
|
10
11
|
declare const __VLS_export: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
12
|
edit: (val: IPrompt) => any;
|
|
13
|
+
navigate: (value: ISdkNavigateAction) => any;
|
|
12
14
|
"success-delete": () => any;
|
|
13
15
|
"success-restore": () => any;
|
|
14
16
|
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
|
15
17
|
onEdit?: (val: IPrompt) => any;
|
|
18
|
+
onNavigate?: (value: ISdkNavigateAction) => any;
|
|
16
19
|
"onSuccess-delete"?: () => any;
|
|
17
20
|
"onSuccess-restore"?: () => any;
|
|
18
21
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -38,7 +38,7 @@ import VariableForm from '../render-skill/variable-form/index.vue.js';
|
|
|
38
38
|
import { useAgentHttp } from '../../hooks/use-agent-http.ts.js';
|
|
39
39
|
import { useClickoutside } from '../../hooks/use-clickoutside.ts.js';
|
|
40
40
|
import { useSpaceHttp } from '../../hooks/use-space-http.ts.js';
|
|
41
|
-
import { AgentType, GroupType, Module, ResourceStatus, SdkNavigateActionType } from '../../types/enum.ts.js';
|
|
41
|
+
import { AgentType, GroupType, Module, PromptSource, ResourceStatus, SdkNavigateActionType } from '../../types/enum.ts.js';
|
|
42
42
|
export default /*@__PURE__*/ _defineComponent({
|
|
43
43
|
props: {
|
|
44
44
|
resourceType: {},
|
|
@@ -266,6 +266,29 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
266
266
|
})
|
|
267
267
|
}));
|
|
268
268
|
});
|
|
269
|
+
const handleRelatePromptToAgent = (selectedAgent)=>__awaiter(this, void 0, void 0, function*() {
|
|
270
|
+
const prompt = props.resource;
|
|
271
|
+
yield updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
272
|
+
promptSetting: Object.assign(Object.assign({}, selectedAgent.promptSetting), {
|
|
273
|
+
promptType: PromptSource.UserDefine,
|
|
274
|
+
promptContent: prompt.content
|
|
275
|
+
})
|
|
276
|
+
}));
|
|
277
|
+
});
|
|
278
|
+
const handleRelateCollectionToAgent = (selectedAgent)=>__awaiter(this, void 0, void 0, function*() {
|
|
279
|
+
var _a;
|
|
280
|
+
const collection = props.resource;
|
|
281
|
+
if (((_a = selectedAgent.promptSetting) === null || _a === void 0 ? void 0 : _a.collectionId) === collection.id) return;
|
|
282
|
+
yield updateAgent(Object.assign(Object.assign({}, selectedAgent), {
|
|
283
|
+
promptSetting: Object.assign(Object.assign({}, selectedAgent.promptSetting), {
|
|
284
|
+
promptType: PromptSource.Collection,
|
|
285
|
+
collectionId: collection.id,
|
|
286
|
+
collectionName: collection.name,
|
|
287
|
+
collectionVariables: collection.variables,
|
|
288
|
+
collectionContent: collection.content
|
|
289
|
+
})
|
|
290
|
+
}));
|
|
291
|
+
});
|
|
269
292
|
const handleBindAndNavigate = (selectedAgent)=>__awaiter(this, void 0, void 0, function*() {
|
|
270
293
|
var _a;
|
|
271
294
|
const relateMap = {
|
|
@@ -274,7 +297,9 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
274
297
|
[Module.Tool]: handleRelateToolToAgent,
|
|
275
298
|
[Module.Skill]: handleRelateSkillToAgent,
|
|
276
299
|
[Module.LLM]: handleRelateLLMToAgent,
|
|
277
|
-
[Module.Knowledgebase]: handleRelateKnowledgebaseToAgent
|
|
300
|
+
[Module.Knowledgebase]: handleRelateKnowledgebaseToAgent,
|
|
301
|
+
[Module.Prompt]: handleRelatePromptToAgent,
|
|
302
|
+
[Module.Collection]: handleRelateCollectionToAgent
|
|
278
303
|
};
|
|
279
304
|
yield (_a = relateMap[props.resourceType]) === null || _a === void 0 ? void 0 : _a.call(relateMap, selectedAgent);
|
|
280
305
|
emits('navigate', {
|
|
@@ -408,24 +433,24 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
408
433
|
const _component_bk_popover = _resolveComponent("bk-popover");
|
|
409
434
|
const _directive_bk_tooltips = _resolveDirective("bk-tooltips");
|
|
410
435
|
return _openBlock(), _createBlock(_component_bk_popover, {
|
|
436
|
+
placement: props.placement,
|
|
437
|
+
boundary: props.boundary,
|
|
438
|
+
"is-show": isShowPopover.value,
|
|
411
439
|
trigger: "manual",
|
|
412
440
|
theme: "light",
|
|
413
441
|
width: "400",
|
|
414
|
-
"ext-cls": "render-relate-agent-popover"
|
|
415
|
-
placement: props.placement,
|
|
416
|
-
boundary: props.boundary,
|
|
417
|
-
"is-show": isShowPopover.value
|
|
442
|
+
"ext-cls": "render-relate-agent-popover"
|
|
418
443
|
}, {
|
|
419
444
|
content: _withCtx(()=>[
|
|
420
445
|
_cache[5] || (_cache[5] = _createElementVNode("span", {
|
|
421
446
|
class: "g-text-16 g-text-black g-leading-24"
|
|
422
447
|
}, " 关联至智能体 ", -1 /* CACHED */ )),
|
|
423
448
|
_createVNode(_component_bk_form, {
|
|
449
|
+
model: formData.value,
|
|
424
450
|
ref_key: "formRef",
|
|
425
451
|
ref: formRef,
|
|
426
452
|
"form-type": "vertical",
|
|
427
|
-
class: "g-small-form g-small-gap-form !g-mt-16"
|
|
428
|
-
model: formData.value
|
|
453
|
+
class: "g-small-form g-small-gap-form !g-mt-16"
|
|
429
454
|
}, {
|
|
430
455
|
default: _withCtx(()=>[
|
|
431
456
|
_createVNode(_component_bk_form_item, {
|
|
@@ -437,15 +462,15 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
437
462
|
_createVNode(_component_bk_select, {
|
|
438
463
|
modelValue: formData.value.selectedSpaceId,
|
|
439
464
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>formData.value.selectedSpaceId = $event),
|
|
440
|
-
filterable: "",
|
|
441
|
-
"id-key": "spaceId",
|
|
442
|
-
"display-key": "spaceName",
|
|
443
465
|
clearable: false,
|
|
444
466
|
loading: isLoadingSpaces.value,
|
|
445
467
|
list: spaces.value,
|
|
446
468
|
"popover-options": {
|
|
447
469
|
boundary: 'parent'
|
|
448
470
|
},
|
|
471
|
+
filterable: "",
|
|
472
|
+
"id-key": "spaceId",
|
|
473
|
+
"display-key": "spaceName",
|
|
449
474
|
onChange: handleGetAgentsAndSetDefaultAgent
|
|
450
475
|
}, null, 8 /* PROPS */ , [
|
|
451
476
|
"modelValue",
|
|
@@ -464,16 +489,16 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
464
489
|
_createVNode(_component_bk_select, {
|
|
465
490
|
modelValue: formData.value.selectedAgentId,
|
|
466
491
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event)=>formData.value.selectedAgentId = $event),
|
|
467
|
-
filterable: "",
|
|
468
|
-
"id-key": "id",
|
|
469
|
-
"display-key": "agentName",
|
|
470
492
|
"no-data-text": `暂无未关联该${_unref(MODULE_NAME)[props.resourceType]}的智能体`,
|
|
471
493
|
clearable: false,
|
|
472
494
|
list: agents.value,
|
|
473
495
|
loading: isLoadingAgents.value,
|
|
474
496
|
"popover-options": {
|
|
475
497
|
boundary: 'parent'
|
|
476
|
-
}
|
|
498
|
+
},
|
|
499
|
+
filterable: "",
|
|
500
|
+
"id-key": "id",
|
|
501
|
+
"display-key": "agentName"
|
|
477
502
|
}, {
|
|
478
503
|
extension: _withCtx(()=>[
|
|
479
504
|
_createVNode(RenderSelectPlusExtension, {
|
|
@@ -498,10 +523,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
498
523
|
]),
|
|
499
524
|
_createElementVNode("section", _hoisted_1, [
|
|
500
525
|
_createVNode(_component_bk_pop_confirm, {
|
|
501
|
-
trigger: "manual",
|
|
502
|
-
placement: "top",
|
|
503
|
-
boundary: "parent",
|
|
504
|
-
"ext-cls": "g-popover-confirm",
|
|
505
526
|
width: getWidth(),
|
|
506
527
|
title: getTitle(),
|
|
507
528
|
content: getContent(),
|
|
@@ -509,13 +530,17 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
509
530
|
"confirm-config": {
|
|
510
531
|
loading: isLoadingConfirm.value
|
|
511
532
|
},
|
|
533
|
+
trigger: "manual",
|
|
534
|
+
placement: "top",
|
|
535
|
+
boundary: "parent",
|
|
536
|
+
"ext-cls": "g-popover-confirm",
|
|
512
537
|
onConfirm: handlePopoverConfirm,
|
|
513
538
|
onCancel: handleCancelApply
|
|
514
539
|
}, {
|
|
515
540
|
default: _withCtx(()=>[
|
|
516
541
|
_createVNode(_component_bk_button, {
|
|
517
|
-
theme: "primary",
|
|
518
542
|
loading: isLoadingConfirm.value,
|
|
543
|
+
theme: "primary",
|
|
519
544
|
onClick: handleConfirm
|
|
520
545
|
}, {
|
|
521
546
|
default: _withCtx(()=>[
|
|
@@ -554,9 +579,9 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
554
579
|
handleShow: handleShow
|
|
555
580
|
}, ()=>[
|
|
556
581
|
_withDirectives((_openBlock(), _createBlock(_component_bk_button, {
|
|
582
|
+
disabled: props.disabled,
|
|
557
583
|
size: "small",
|
|
558
584
|
text: "",
|
|
559
|
-
disabled: props.disabled,
|
|
560
585
|
onClick: handleShow
|
|
561
586
|
}, {
|
|
562
587
|
default: _withCtx(()=>[
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type { IKnowledgebase, ITool } from '@/types';
|
|
2
2
|
import type { IAgent } from '@/types/agent';
|
|
3
|
+
import type { ICollection } from '@/types/collection';
|
|
3
4
|
import { Module } from '@/types/enum';
|
|
4
5
|
import type { IMcp } from '@/types/mcp';
|
|
5
6
|
import type { IModel } from '@/types/model';
|
|
6
7
|
import type { ISdkNavigateAction } from '@/types/navigate';
|
|
8
|
+
import type { IPrompt } from '@/types/prompt';
|
|
7
9
|
import type { ISkill } from '@/types/skill';
|
|
8
10
|
interface IProps {
|
|
9
11
|
resourceType: Module;
|
|
10
|
-
resource: IAgent | IMcp | ISkill | IModel | ITool | IKnowledgebase;
|
|
12
|
+
resource: IAgent | IMcp | ISkill | IModel | ITool | IKnowledgebase | IPrompt | ICollection;
|
|
11
13
|
disabled?: boolean;
|
|
12
14
|
disabledText?: string;
|
|
13
15
|
boundary?: string;
|