@blueking/ai-ui-sdk 0.4.3-beta.10 → 0.4.3-beta.11
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-card/agent/actions.script.vue.js.js → render-agent/action/index.script.vue.js.js} +33 -9
- package/dist/components/{render-card/agent/actions.vue.d.ts → render-agent/action/index.vue.d.ts} +1 -0
- package/dist/components/render-agent/action/index.vue.js +3 -0
- package/dist/components/render-agent/agent-share.script.vue.js.js +8 -5
- package/dist/components/render-agent/agent-share.vue.d.ts +1 -0
- package/dist/components/render-agent/agent-type.script.vue.js.js +3 -9
- package/dist/components/render-agent/agent-type.vue.css +3 -7
- package/dist/components/render-agent/agent-type.vue.d.ts +1 -1
- 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.script.vue.js.js +55 -22
- package/dist/components/render-card/agent/index.vue.d.ts +3 -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/application-base-actions.script.vue.js.js +1 -1
- package/dist/components/render-card/base/collection-icon.script.vue.js.js +149 -0
- package/dist/components/render-card/base/collection-icon.vue.d.ts +20 -0
- package/dist/components/render-card/base/collection-icon.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 +13 -3
- package/dist/components/render-card/llm/actions.vue.d.ts +1 -0
- 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 +9 -8
- 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.script.vue.js.js +18 -14
- package/dist/components/render-card/llm/tag-prefix.vue.css +2 -5
- package/dist/components/render-card/llm/tag-prefix.vue.d.ts +4 -1
- package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
- package/dist/components/render-card/mcp/actions.script.vue.js.js +35 -7
- package/dist/components/render-card/mcp/actions.vue.d.ts +1 -0
- package/dist/components/render-card/mcp/index.script.vue.js.js +35 -9
- package/dist/components/render-card/mcp/index.vue.d.ts +4 -3
- 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 +3 -7
- package/dist/components/render-card/mcp/selected-tools-info.vue.d.ts +0 -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 +48 -14
- package/dist/components/render-card/prompt/index.vue.d.ts +3 -1
- package/dist/components/render-card/role/index.script.vue.js.js +53 -20
- package/dist/components/render-card/role/index.vue.d.ts +3 -1
- package/dist/components/render-card/skill/index.script.vue.js.js +58 -24
- package/dist/components/render-card/skill/index.vue.d.ts +8 -4
- package/dist/components/render-card/skill/scanner.script.vue.js.js +66 -0
- package/dist/components/render-card/skill/{tag-prefix.vue.css → scanner.vue.css} +3 -3
- package/dist/components/render-card/skill/scanner.vue.d.ts +11 -0
- package/dist/components/render-card/skill/scanner.vue.js +5 -0
- package/dist/components/render-card/skill/tag-prefix.script.vue.js.js +11 -50
- package/dist/components/render-card/skill/tag-prefix.vue.js +0 -2
- package/dist/components/render-card/tool/actions.script.vue.js.js +26 -4
- package/dist/components/render-card/tool/actions.vue.d.ts +1 -0
- package/dist/components/render-card/tool/index.script.vue.js.js +53 -20
- package/dist/components/render-card/tool/index.vue.d.ts +3 -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 +22 -4
- package/dist/components/render-collection/actions/index.vue.d.ts +1 -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/dataset-data-tool-icons/index.script.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.script.vue.js.js +10 -10
- package/dist/components/render-dialog/choose-space.vue.css +10 -10
- 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-dropdown/index.vue.css +0 -3
- package/dist/components/render-dropdown/index.vue.d.ts +5 -5
- 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.d.ts +1 -1
- 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-markdown/edit.d.ts +1 -1
- package/dist/components/render-markdown/view.d.ts +1 -1
- package/dist/components/render-prompt/actions/index.script.vue.js.js +22 -4
- package/dist/components/render-prompt/actions/index.vue.d.ts +1 -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 +8 -6
- package/dist/components/render-relate-agent/index.vue.d.ts +2 -2
- package/dist/components/render-resource-version/index.script.vue.js.js +6 -3
- package/dist/components/render-resource-version/index.vue.css +2 -2
- package/dist/components/render-resource-version/index.vue.d.ts +1 -1
- 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-skill/actions/index.script.vue.js.js +38 -7
- package/dist/components/render-skill/actions/index.vue.d.ts +3 -2
- 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.script.vue.js +6 -6
- package/dist/components/render-tags/index.vue.css +6 -6
- package/dist/components/render-tags/index.vue.d.ts +1 -1
- package/dist/components/render-tags/index.vue.js +1 -1
- package/dist/components.d.ts +15 -1
- package/dist/components.ts.js +15 -1
- package/dist/css/g-utilities.css +29 -0
- package/dist/css/g-utilities.manifest.json +7 -0
- package/dist/hooks/use-agent-http.d.ts +2 -0
- package/dist/hooks/use-agent-http.ts.js +15 -1
- package/dist/hooks/use-collection-http.d.ts +2 -0
- package/dist/hooks/use-collection-http.ts.js +15 -1
- package/dist/hooks/use-market-http.d.ts +10 -0
- package/dist/hooks/use-market-http.ts.js +71 -1
- package/dist/hooks/use-mcp-http.d.ts +2 -0
- package/dist/hooks/use-mcp-http.ts.js +15 -1
- package/dist/hooks/use-prompt-http.d.ts +2 -0
- package/dist/hooks/use-prompt-http.ts.js +15 -1
- package/dist/hooks/use-skill-http.d.ts +2 -0
- package/dist/hooks/use-skill-http.ts.js +15 -1
- package/dist/hooks/use-t-table.d.ts +11 -5
- package/dist/hooks/use-t-table.ts.js +25 -3
- package/dist/hooks/use-tool-http.d.ts +2 -0
- package/dist/hooks/use-tool-http.ts.js +15 -1
- package/dist/http/helper/agent.ts.js +2 -3
- package/dist/http/helper/collection.ts.js +2 -1
- package/dist/http/helper/common.d.ts +1 -1
- package/dist/http/helper/common.ts.js +4 -0
- package/dist/http/helper/mcp.ts.js +6 -4
- package/dist/http/helper/prompt.ts.js +2 -1
- package/dist/http/helper/skill.ts.js +4 -0
- package/dist/http/helper/tool.ts.js +6 -2
- package/dist/types/agent.d.ts +3 -3
- package/dist/types/collection.d.ts +3 -1
- package/dist/types/common.d.ts +4 -0
- package/dist/types/enum.d.ts +5 -7
- package/dist/types/enum.ts.js +3 -6
- package/dist/types/mcp.d.ts +4 -2
- package/dist/types/prompt.d.ts +3 -1
- package/dist/types/skill.d.ts +4 -0
- package/dist/types/tool.d.ts +4 -0
- package/package.json +1 -1
- package/dist/components/render-card/agent/actions.vue.js +0 -3
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2
|
+
try {
|
|
3
|
+
var info = gen[key](arg);
|
|
4
|
+
var value = info.value;
|
|
5
|
+
} catch (error) {
|
|
6
|
+
reject(error);
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (info.done) {
|
|
10
|
+
resolve(value);
|
|
11
|
+
} else {
|
|
12
|
+
Promise.resolve(value).then(_next, _throw);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function _async_to_generator(fn) {
|
|
16
|
+
return function() {
|
|
17
|
+
var self = this, args = arguments;
|
|
18
|
+
return new Promise(function(resolve, reject) {
|
|
19
|
+
var gen = fn.apply(self, args);
|
|
20
|
+
function _next(value) {
|
|
21
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
22
|
+
}
|
|
23
|
+
function _throw(err) {
|
|
24
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
25
|
+
}
|
|
26
|
+
_next(undefined);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
31
|
+
import { unref as _unref, withModifiers as _withModifiers, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, resolveDirective as _resolveDirective, withCtx as _withCtx, createBlock as _createBlock, withDirectives as _withDirectives } from "vue";
|
|
32
|
+
import { ref, toRef } from 'vue';
|
|
33
|
+
import { useAgentHttp } from '../../../hooks/use-agent-http.ts.js';
|
|
34
|
+
import { useMarketHttp } from '../../../hooks/use-market-http.ts.js';
|
|
35
|
+
import { useMcpHttp } from '../../../hooks/use-mcp-http.ts.js';
|
|
36
|
+
import { useSkillHttp } from '../../../hooks/use-skill-http.ts.js';
|
|
37
|
+
import { useToolHttp } from '../../../hooks/use-tool-http.ts.js';
|
|
38
|
+
import { useCollectionHttp, usePromptHttp } from '../../../https.ts.js';
|
|
39
|
+
import { Module, ResourceCardType } from '../../../types/enum.ts.js';
|
|
40
|
+
export default /*@__PURE__*/ _defineComponent({
|
|
41
|
+
props: {
|
|
42
|
+
favorite: {
|
|
43
|
+
type: Boolean
|
|
44
|
+
},
|
|
45
|
+
favoriteCount: {},
|
|
46
|
+
type: {},
|
|
47
|
+
showCount: {
|
|
48
|
+
type: Boolean
|
|
49
|
+
},
|
|
50
|
+
id: {},
|
|
51
|
+
module: {},
|
|
52
|
+
apiPrefix: {},
|
|
53
|
+
spaceId: {}
|
|
54
|
+
},
|
|
55
|
+
emits: [
|
|
56
|
+
"success-favorite",
|
|
57
|
+
"success-cancel-favorite"
|
|
58
|
+
],
|
|
59
|
+
setup (__props, { emit: __emit }) {
|
|
60
|
+
const props = __props;
|
|
61
|
+
const emits = __emit;
|
|
62
|
+
const { addMarketSkillFavorite, removeMarketSkillFavorite, addMarketToolFavorite, removeMarketToolFavorite, addMarketAgentFavorite, removeMarketAgentFavorite, addMarketCollectionFavorite, removeMarketCollectionFavorite, addMarketPromptFavorite, removeMarketPromptFavorite } = useMarketHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
63
|
+
const { addMcpFavorite, removeMcpFavorite } = useMcpHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
64
|
+
const { addSkillFavorite, removeSkillFavorite } = useSkillHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
65
|
+
const { addToolFavorite, removeToolFavorite } = useToolHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
66
|
+
const { addAgentFavorite, removeAgentFavorite } = useAgentHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
67
|
+
const { addPromptFavorite, removePromptFavorite } = usePromptHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
68
|
+
const { addCollectionFavorite, removeCollectionFavorite } = useCollectionHttp(props.apiPrefix, toRef(props, 'spaceId'));
|
|
69
|
+
const loading = ref(false);
|
|
70
|
+
const handleClick = function() {
|
|
71
|
+
var _ref = _async_to_generator(function*() {
|
|
72
|
+
if (loading.value || !props.id) return;
|
|
73
|
+
const isMarket = props.type === ResourceCardType.Market;
|
|
74
|
+
const favoriteMap = {
|
|
75
|
+
[Module.Skill]: props.favorite ? isMarket ? removeMarketSkillFavorite : removeSkillFavorite : isMarket ? addMarketSkillFavorite : addSkillFavorite,
|
|
76
|
+
[Module.Tool]: props.favorite ? isMarket ? removeMarketToolFavorite : removeToolFavorite : isMarket ? addMarketToolFavorite : addToolFavorite,
|
|
77
|
+
[Module.Mcp]: props.favorite ? removeMcpFavorite : addMcpFavorite,
|
|
78
|
+
[Module.Agent]: props.favorite ? isMarket ? removeMarketAgentFavorite : removeAgentFavorite : isMarket ? addMarketAgentFavorite : addAgentFavorite,
|
|
79
|
+
[Module.Prompt]: props.favorite ? isMarket ? removeMarketPromptFavorite : removePromptFavorite : isMarket ? addMarketPromptFavorite : addPromptFavorite,
|
|
80
|
+
[Module.Collection]: props.favorite ? isMarket ? removeMarketCollectionFavorite : removeCollectionFavorite : isMarket ? addMarketCollectionFavorite : addCollectionFavorite
|
|
81
|
+
};
|
|
82
|
+
try {
|
|
83
|
+
var _favoriteMap_props_module;
|
|
84
|
+
loading.value = true;
|
|
85
|
+
yield (_favoriteMap_props_module = favoriteMap[props.module]) === null || _favoriteMap_props_module === void 0 ? void 0 : _favoriteMap_props_module.call(favoriteMap, props.id);
|
|
86
|
+
emits(props.favorite ? 'success-cancel-favorite' : 'success-favorite');
|
|
87
|
+
} finally{
|
|
88
|
+
loading.value = false;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
return function handleClick() {
|
|
92
|
+
return _ref.apply(this, arguments);
|
|
93
|
+
};
|
|
94
|
+
}();
|
|
95
|
+
return (_ctx, _cache)=>{
|
|
96
|
+
const _component_bk_loading = _resolveComponent("bk-loading");
|
|
97
|
+
const _directive_bk_tooltips = _resolveDirective("bk-tooltips");
|
|
98
|
+
return props.type !== _unref(ResourceCardType).Application ? _withDirectives((_openBlock(), _createBlock(_component_bk_loading, {
|
|
99
|
+
key: 0,
|
|
100
|
+
class: _normalizeClass([
|
|
101
|
+
'g-flex-row !g-cursor-pointer',
|
|
102
|
+
{
|
|
103
|
+
'!g-mr-12': props.showCount
|
|
104
|
+
},
|
|
105
|
+
props.favorite ? 'g-text-fc943b hover:g-text-e38b02' : 'g-text-gray hover:g-text-normal'
|
|
106
|
+
]),
|
|
107
|
+
loading: loading.value,
|
|
108
|
+
mode: "spin",
|
|
109
|
+
size: "mini",
|
|
110
|
+
theme: "primary"
|
|
111
|
+
}, {
|
|
112
|
+
default: _withCtx(()=>{
|
|
113
|
+
var _props_favoriteCount;
|
|
114
|
+
return [
|
|
115
|
+
_createElementVNode("i", {
|
|
116
|
+
class: _normalizeClass([
|
|
117
|
+
'ai-ui-sdk-icon g-text-16',
|
|
118
|
+
{
|
|
119
|
+
'g-mr-4': props.showCount
|
|
120
|
+
},
|
|
121
|
+
props.favorite ? 'ai-ui-sdk-favorite g-text-fc943b hover:g-text-e38b02' : 'ai-ui-sdk-weishoucang g-text-gray hover:g-text-f59500'
|
|
122
|
+
]),
|
|
123
|
+
onClick: _withModifiers(handleClick, [
|
|
124
|
+
"stop"
|
|
125
|
+
])
|
|
126
|
+
}, null, 2 /* CLASS */ ),
|
|
127
|
+
props.showCount ? (_openBlock(), _createElementBlock(_Fragment, {
|
|
128
|
+
key: 0
|
|
129
|
+
}, [
|
|
130
|
+
_createTextVNode(_toDisplayString((_props_favoriteCount = props.favoriteCount) !== null && _props_favoriteCount !== void 0 ? _props_favoriteCount : 0), 1 /* TEXT */ )
|
|
131
|
+
], 64 /* STABLE_FRAGMENT */ )) : _createCommentVNode("v-if", true)
|
|
132
|
+
];
|
|
133
|
+
}),
|
|
134
|
+
_: 1 /* STABLE */
|
|
135
|
+
}, 8 /* PROPS */ , [
|
|
136
|
+
"class",
|
|
137
|
+
"loading"
|
|
138
|
+
])), [
|
|
139
|
+
[
|
|
140
|
+
_directive_bk_tooltips,
|
|
141
|
+
{
|
|
142
|
+
content: props.favorite ? '取消收藏' : '添加收藏',
|
|
143
|
+
placement: 'top'
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
]) : _createCommentVNode("v-if", true);
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Module, ResourceCardType } from '@/types/enum';
|
|
2
|
+
interface IProps {
|
|
3
|
+
favorite?: boolean;
|
|
4
|
+
favoriteCount?: number;
|
|
5
|
+
type: ResourceCardType;
|
|
6
|
+
showCount: boolean;
|
|
7
|
+
id?: number;
|
|
8
|
+
module: Module;
|
|
9
|
+
apiPrefix: string;
|
|
10
|
+
spaceId?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
+
"success-favorite": () => any;
|
|
14
|
+
"success-cancel-favorite": () => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
|
16
|
+
"onSuccess-favorite"?: () => any;
|
|
17
|
+
"onSuccess-cancel-favorite"?: () => any;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
|
|
2
|
-
.resource-card-home[data-v-
|
|
2
|
+
.resource-card-home[data-v-uhavxu17] {
|
|
3
3
|
background: #FFFFFF;
|
|
4
4
|
}
|
|
5
|
-
.resource-card-home .resource-card-sub-name[data-v-
|
|
5
|
+
.resource-card-home .resource-card-sub-name[data-v-uhavxu17] {
|
|
6
6
|
margin-right: -4px;
|
|
7
7
|
}
|
|
8
|
-
.resource-card-home.full[data-v-
|
|
8
|
+
.resource-card-home.full[data-v-uhavxu17], .resource-card-home.application[data-v-uhavxu17], .resource-card-home.market[data-v-uhavxu17] {
|
|
9
9
|
padding: 16px 16px 0;
|
|
10
10
|
box-shadow: 0 2px 4px 0 #0000000d;
|
|
11
11
|
border-radius: 8px;
|
|
12
12
|
}
|
|
13
|
-
.resource-card-home.full[data-v-
|
|
13
|
+
.resource-card-home.full[data-v-uhavxu17]:hover, .resource-card-home.application[data-v-uhavxu17]:hover, .resource-card-home.market[data-v-uhavxu17]:hover {
|
|
14
14
|
box-shadow: 0 2px 10px 0 #0000001f;
|
|
15
15
|
}
|
|
16
|
-
.resource-card-home.full .resource-card-name[data-v-
|
|
16
|
+
.resource-card-home.full .resource-card-name[data-v-uhavxu17], .resource-card-home.application .resource-card-name[data-v-uhavxu17], .resource-card-home.market .resource-card-name[data-v-uhavxu17] {
|
|
17
17
|
font-size: 14px;
|
|
18
18
|
color: #313238;
|
|
19
19
|
font-weight: bold;
|
|
20
20
|
}
|
|
21
|
-
.resource-card-home.full .resource-card-description[data-v-
|
|
21
|
+
.resource-card-home.full .resource-card-description[data-v-uhavxu17], .resource-card-home.application .resource-card-description[data-v-uhavxu17], .resource-card-home.market .resource-card-description[data-v-uhavxu17] {
|
|
22
22
|
color: #4D4F56;
|
|
23
23
|
height: 60px;
|
|
24
24
|
white-space: pre-wrap;
|
|
25
25
|
word-break: break-all;
|
|
26
26
|
}
|
|
27
|
-
.resource-card-home.choose[data-v-
|
|
27
|
+
.resource-card-home.choose[data-v-uhavxu17] {
|
|
28
28
|
padding: 10px 12px 0;
|
|
29
29
|
border: 1px solid #DCDEE5;
|
|
30
30
|
border-radius: 4px;
|
|
31
31
|
}
|
|
32
|
-
.resource-card-home.choose .resource-card-name[data-v-
|
|
32
|
+
.resource-card-home.choose .resource-card-name[data-v-uhavxu17] {
|
|
33
33
|
font-size: 14px;
|
|
34
34
|
color: #000000;
|
|
35
35
|
font-weight: bold;
|
|
36
36
|
}
|
|
37
|
-
.resource-card-home.choose .resource-card-description[data-v-
|
|
37
|
+
.resource-card-home.choose .resource-card-description[data-v-uhavxu17] {
|
|
38
38
|
color: #4D4F56;
|
|
39
39
|
height: 20px;
|
|
40
40
|
}
|
|
41
|
-
.resource-card-home.info[data-v-
|
|
41
|
+
.resource-card-home.info[data-v-uhavxu17],.resource-card-home.record[data-v-uhavxu17] {
|
|
42
42
|
padding: 10px 12px;
|
|
43
43
|
border: 1px solid #DCDEE5;
|
|
44
44
|
border-radius: 4px;
|
|
45
45
|
}
|
|
46
|
-
.resource-card-home.info .resource-card-name[data-v-
|
|
46
|
+
.resource-card-home.info .resource-card-name[data-v-uhavxu17], .resource-card-home.record .resource-card-name[data-v-uhavxu17] {
|
|
47
47
|
font-size: 12px;
|
|
48
48
|
color: #313238;
|
|
49
49
|
}
|
|
50
|
-
.resource-card-actions[data-v-
|
|
50
|
+
.resource-card-actions[data-v-uhavxu17] {
|
|
51
51
|
border-top: 1px solid #F5F7FA;
|
|
52
52
|
height: 58px;
|
|
53
53
|
gap: 0 8px;
|
|
@@ -7,6 +7,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
7
7
|
props: {
|
|
8
8
|
model: {},
|
|
9
9
|
models: {},
|
|
10
|
+
type: {},
|
|
10
11
|
selfHostUrl: {},
|
|
11
12
|
externalUrl: {},
|
|
12
13
|
spaceId: {},
|
|
@@ -36,17 +37,19 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
36
37
|
const _directive_bk_tooltips = _resolveDirective("bk-tooltips");
|
|
37
38
|
return _openBlock(), _createElementBlock(_Fragment, null, [
|
|
38
39
|
_createVNode(RenderRelateAgent, {
|
|
39
|
-
placement: "top",
|
|
40
40
|
"resource-type": _unref(Module).LLM,
|
|
41
41
|
resource: props.model,
|
|
42
42
|
"space-id": props.spaceId,
|
|
43
43
|
"api-prefix": props.apiPrefix,
|
|
44
|
+
placement: "top",
|
|
44
45
|
onNavigate: handleNavigate
|
|
45
46
|
}, {
|
|
46
47
|
trigger: _withCtx(({ handleShow })=>[
|
|
47
48
|
_withDirectives((_openBlock(), _createBlock(_component_bk_button, {
|
|
48
|
-
|
|
49
|
+
theme: props.type === 'table' ? 'primary' : '',
|
|
50
|
+
text: props.type === 'table',
|
|
49
51
|
disabled: !getIsAuthorized(),
|
|
52
|
+
size: "small",
|
|
50
53
|
onClick: handleShow
|
|
51
54
|
}, {
|
|
52
55
|
default: _withCtx(()=>[
|
|
@@ -56,6 +59,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
56
59
|
]),
|
|
57
60
|
_: 1 /* STABLE */
|
|
58
61
|
}, 8 /* PROPS */ , [
|
|
62
|
+
"theme",
|
|
63
|
+
"text",
|
|
59
64
|
"disabled",
|
|
60
65
|
"onClick"
|
|
61
66
|
])), [
|
|
@@ -78,6 +83,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
78
83
|
]),
|
|
79
84
|
props.model.spaceAuthMode === _unref(ModelSpaceAuthMode).Apply ? (_openBlock(), _createBlock(_component_bk_button, {
|
|
80
85
|
key: 0,
|
|
86
|
+
theme: props.type === 'table' ? 'primary' : '',
|
|
87
|
+
text: props.type === 'table',
|
|
81
88
|
size: "small",
|
|
82
89
|
onClick: handleGoToApply
|
|
83
90
|
}, {
|
|
@@ -87,7 +94,10 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
87
94
|
])
|
|
88
95
|
]),
|
|
89
96
|
_: 1 /* STABLE */
|
|
90
|
-
}
|
|
97
|
+
}, 8 /* PROPS */ , [
|
|
98
|
+
"theme",
|
|
99
|
+
"text"
|
|
100
|
+
])) : _createCommentVNode("v-if", true)
|
|
91
101
|
], 64 /* STABLE_FRAGMENT */ );
|
|
92
102
|
};
|
|
93
103
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.llm-corner-badge[data-v-
|
|
2
|
+
.llm-corner-badge[data-v-78fidz9b] {
|
|
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-78fidz9b]: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-78fidz9b] {
|
|
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-1ta8u89q], .like-button:hover span[data-v-1ta8u89q] {
|
|
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-1ta8u89q], .dislike-button:hover span[data-v-1ta8u89q], .dislike-button:active .ai-ui-sdk-icon[data-v-1ta8u89q], .dislike-button:active span[data-v-1ta8u89q] {
|
|
6
6
|
color: #EA3636 !important;
|
|
7
7
|
}
|
|
@@ -63,10 +63,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
63
63
|
};
|
|
64
64
|
return (_ctx, _cache)=>{
|
|
65
65
|
return _openBlock(), _createBlock(RenderBase, {
|
|
66
|
-
class: "g-relative",
|
|
67
66
|
module: _unref(Module).LLM,
|
|
68
67
|
type: props.type,
|
|
69
|
-
id: props.model.id,
|
|
70
68
|
name: props.model.llmName,
|
|
71
69
|
code: props.model.llmCode,
|
|
72
70
|
disabled: props.disabled,
|
|
@@ -80,6 +78,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
80
78
|
"updated-at": props.model.updatedAt,
|
|
81
79
|
spaces: props.spaces,
|
|
82
80
|
"show-generate-type": props.showGenerateType,
|
|
81
|
+
class: "g-relative",
|
|
82
|
+
id: props.model.id,
|
|
83
83
|
onDelete: handleDelete,
|
|
84
84
|
onChoose: handleChoose
|
|
85
85
|
}, {
|
|
@@ -114,19 +114,19 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
114
114
|
_createVNode(RenderReferenceIcon, {
|
|
115
115
|
type: props.type,
|
|
116
116
|
"ref-count": props.model.refCount,
|
|
117
|
-
id: props.model.id,
|
|
118
117
|
name: props.model.llmName,
|
|
119
118
|
module: _unref(Module).LLM,
|
|
120
119
|
"space-id": props.spaceId,
|
|
121
|
-
"api-prefix": props.apiPrefix
|
|
120
|
+
"api-prefix": props.apiPrefix,
|
|
121
|
+
id: props.model.id
|
|
122
122
|
}, null, 8 /* PROPS */ , [
|
|
123
123
|
"type",
|
|
124
124
|
"ref-count",
|
|
125
|
-
"id",
|
|
126
125
|
"name",
|
|
127
126
|
"module",
|
|
128
127
|
"space-id",
|
|
129
|
-
"api-prefix"
|
|
128
|
+
"api-prefix",
|
|
129
|
+
"id"
|
|
130
130
|
]),
|
|
131
131
|
_createVNode(RenderIcons, {
|
|
132
132
|
model: props.model,
|
|
@@ -153,6 +153,7 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
153
153
|
"self-host-url": props.selfHostUrl,
|
|
154
154
|
"external-url": props.externalUrl,
|
|
155
155
|
"api-prefix": props.apiPrefix,
|
|
156
|
+
type: "card",
|
|
156
157
|
onNavigate: handleNavigate
|
|
157
158
|
}, null, 8 /* PROPS */ , [
|
|
158
159
|
"model",
|
|
@@ -167,7 +168,6 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
167
168
|
}, 8 /* PROPS */ , [
|
|
168
169
|
"module",
|
|
169
170
|
"type",
|
|
170
|
-
"id",
|
|
171
171
|
"name",
|
|
172
172
|
"code",
|
|
173
173
|
"disabled",
|
|
@@ -180,7 +180,8 @@ export default /*@__PURE__*/ _defineComponent({
|
|
|
180
180
|
"updated-by",
|
|
181
181
|
"updated-at",
|
|
182
182
|
"spaces",
|
|
183
|
-
"show-generate-type"
|
|
183
|
+
"show-generate-type",
|
|
184
|
+
"id"
|
|
184
185
|
]);
|
|
185
186
|
};
|
|
186
187
|
}
|
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
-
import { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString,
|
|
3
|
-
const _hoisted_1 = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "tag-item tag-public g-rounded-2 g-text-10"
|
|
6
|
-
};
|
|
2
|
+
import { unref as _unref, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, Fragment as _Fragment } from "vue";
|
|
7
3
|
import { ModelSpaceAuthMode } from '../../../enums.ts.js';
|
|
8
4
|
export default /*@__PURE__*/ _defineComponent({
|
|
9
5
|
props: {
|
|
10
|
-
model: {}
|
|
6
|
+
model: {},
|
|
7
|
+
type: {
|
|
8
|
+
default: 'card'
|
|
9
|
+
}
|
|
11
10
|
},
|
|
12
11
|
setup (__props) {
|
|
13
12
|
const props = __props;
|
|
14
13
|
return (_ctx, _cache)=>{
|
|
15
14
|
var _props_model_property, _props_model_property1, _props_model_property2;
|
|
16
15
|
return _openBlock(), _createElementBlock(_Fragment, null, [
|
|
17
|
-
props.model.spaceAuthMode === _unref(ModelSpaceAuthMode).Public ? (_openBlock(), _createElementBlock("span",
|
|
18
|
-
|
|
16
|
+
props.model.spaceAuthMode === _unref(ModelSpaceAuthMode).Public ? (_openBlock(), _createElementBlock("span", {
|
|
17
|
+
key: 0,
|
|
19
18
|
class: _normalizeClass([
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
'tag-item g-rounded-2 g-text-10': true,
|
|
23
|
-
'tag-private': (_props_model_property = props.model.property) === null || _props_model_property === void 0 ? void 0 : _props_model_property.isSelfHost,
|
|
24
|
-
'tag-external': !((_props_model_property1 = props.model.property) === null || _props_model_property1 === void 0 ? void 0 : _props_model_property1.isSelfHost)
|
|
25
|
-
}
|
|
19
|
+
'tag-public g-rounded-2',
|
|
20
|
+
props.type === 'table' ? '!g-px-8 g-leading-22 g-h-22 g-text-12' : 'g-px-4 g-text-10'
|
|
26
21
|
])
|
|
22
|
+
}, " 公开 ", 2 /* CLASS */ )) : _createCommentVNode("v-if", true),
|
|
23
|
+
_createElementVNode("span", {
|
|
24
|
+
class: _normalizeClass({
|
|
25
|
+
'g-rounded-2': true,
|
|
26
|
+
'g-px-4 g-text-10': props.type === 'card',
|
|
27
|
+
'!g-px-8 g-leading-22 g-h-22 g-text-12': props.type === 'table',
|
|
28
|
+
'tag-private': (_props_model_property = props.model.property) === null || _props_model_property === void 0 ? void 0 : _props_model_property.isSelfHost,
|
|
29
|
+
'tag-external': !((_props_model_property1 = props.model.property) === null || _props_model_property1 === void 0 ? void 0 : _props_model_property1.isSelfHost)
|
|
30
|
+
})
|
|
27
31
|
}, _toDisplayString(((_props_model_property2 = props.model.property) === null || _props_model_property2 === void 0 ? void 0 : _props_model_property2.isSelfHost) ? '私有模型' : '外部模型'), 3 /* TEXT, CLASS */ )
|
|
28
32
|
], 64 /* STABLE_FRAGMENT */ );
|
|
29
33
|
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
.tag-
|
|
3
|
-
padding: 0 4px;
|
|
4
|
-
}
|
|
5
|
-
.tag-external[data-v-y8mlamzq] {
|
|
2
|
+
.tag-external[data-v-nw4jro2g] {
|
|
6
3
|
color: #636a2f;
|
|
7
4
|
background: #EAEFC6;
|
|
8
5
|
}
|
|
9
|
-
.tag-public[data-v-
|
|
6
|
+
.tag-public[data-v-nw4jro2g], .tag-private[data-v-nw4jro2g] {
|
|
10
7
|
color: #3a84ff;
|
|
11
8
|
background: #e1ecff;
|
|
12
9
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { IModel } from '@/types/model';
|
|
2
2
|
interface IProps {
|
|
3
3
|
model: IModel;
|
|
4
|
+
type?: 'card' | 'table';
|
|
4
5
|
}
|
|
5
|
-
declare const __VLS_export: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{}>, {
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{}>, {
|
|
7
|
+
type: "card" | "table";
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
9
|
declare const _default: typeof __VLS_export;
|
|
7
10
|
export default _default;
|