@blueking/ai-ui-sdk 0.4.3-beta.6 → 0.4.3-beta.7
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.vue.css +3 -3
- 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-auth/auth-dialog.script.vue.js.js +6 -3
- 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/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/actions.script.vue.js.js +34 -7
- package/dist/components/render-card/mcp/actions.vue.d.ts +1 -0
- package/dist/components/render-card/mcp/index.script.vue.js.js +34 -3
- package/dist/components/render-card/mcp/index.vue.d.ts +4 -2
- package/dist/components/render-card/mcp/name-suffix.vue.css +2 -2
- package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
- package/dist/components/render-card/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 +25 -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.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.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-search-empty/index.script.vue.js.js +3 -2
- 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 +37 -7
- package/dist/components/render-skill/actions/index.vue.d.ts +3 -2
- package/dist/components/render-t-table/index.script.vue.js +8 -5
- 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 +12 -1
- package/dist/components.ts.js +12 -1
- package/dist/css/g-utilities.css +12 -0
- package/dist/css/g-utilities.manifest.json +3 -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 -1
- 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 -2
- 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 -1
- package/dist/types/collection.d.ts +3 -1
- package/dist/types/common.d.ts +4 -0
- package/dist/types/enum.d.ts +4 -1
- package/dist/types/enum.ts.js +3 -0
- package/dist/types/mcp.d.ts +4 -0
- 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
|
@@ -87,11 +87,25 @@ export const usePromptHttp = (apiPrefix, spaceId)=>{
|
|
|
87
87
|
},
|
|
88
88
|
signal
|
|
89
89
|
}).then((data)=>data.map(transferResourceCountApi2ResourceCount)));
|
|
90
|
+
// 添加收藏
|
|
91
|
+
const addPromptFavorite = (id)=>fetch.post(`${apiPrefix}/prompt/v1/prompt/${id}/add_favorite/`, undefined, {
|
|
92
|
+
headers: {
|
|
93
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
// 取消收藏
|
|
97
|
+
const removePromptFavorite = (id)=>fetch.delete(`${apiPrefix}/prompt/v1/prompt/${id}/remove_favorite/`, undefined, {
|
|
98
|
+
headers: {
|
|
99
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
100
|
+
}
|
|
101
|
+
});
|
|
90
102
|
return {
|
|
91
103
|
getPrompts,
|
|
92
104
|
togglePromptLike,
|
|
93
105
|
deletePrompt,
|
|
94
106
|
restorePrompt,
|
|
95
|
-
getPromptCount
|
|
107
|
+
getPromptCount,
|
|
108
|
+
addPromptFavorite,
|
|
109
|
+
removePromptFavorite
|
|
96
110
|
};
|
|
97
111
|
};
|
|
@@ -29,4 +29,6 @@ export declare const useSkillHttp: (apiPrefix: string, spaceId?: Ref<string>) =>
|
|
|
29
29
|
(id: number, version: string): Promise<import("@/types/skill").ISkillBuildLog>;
|
|
30
30
|
abort(): void;
|
|
31
31
|
};
|
|
32
|
+
addSkillFavorite: (id: number) => Promise<unknown>;
|
|
33
|
+
removeSkillFavorite: (id: number) => Promise<unknown>;
|
|
32
34
|
};
|
|
@@ -139,6 +139,18 @@ export const useSkillHttp = (apiPrefix, spaceId)=>{
|
|
|
139
139
|
},
|
|
140
140
|
signal
|
|
141
141
|
}).then(transferSkillBuildLogApi2SkillBuildLog));
|
|
142
|
+
// 收藏 Skill
|
|
143
|
+
const addSkillFavorite = (id)=>fetch.post(`${apiPrefix}/skill/v1/skill/${id}/add_favorite/`, undefined, {
|
|
144
|
+
headers: {
|
|
145
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
// 取消收藏 Skill
|
|
149
|
+
const removeSkillFavorite = (id)=>fetch.delete(`${apiPrefix}/skill/v1/skill/${id}/remove_favorite/`, undefined, {
|
|
150
|
+
headers: {
|
|
151
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
152
|
+
}
|
|
153
|
+
});
|
|
142
154
|
return {
|
|
143
155
|
getSkillList,
|
|
144
156
|
getSkillCount,
|
|
@@ -152,6 +164,8 @@ export const useSkillHttp = (apiPrefix, spaceId)=>{
|
|
|
152
164
|
getSkillOpenclawWindowsInstancesStatus,
|
|
153
165
|
installSkillToOpenclawWindows,
|
|
154
166
|
getSkillOpenclawWindowsInstallTasksStatus,
|
|
155
|
-
getSkillBuildLog
|
|
167
|
+
getSkillBuildLog,
|
|
168
|
+
addSkillFavorite,
|
|
169
|
+
removeSkillFavorite
|
|
156
170
|
};
|
|
157
171
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
1
2
|
import type { IPagination, IPaginationParam, ISortParam, ITTableSort } from '@/types/common';
|
|
2
3
|
import { OrderMethod } from '@/types/enum';
|
|
3
4
|
interface IPaginatedApiResult<T> {
|
|
4
5
|
results?: T;
|
|
5
6
|
count?: number;
|
|
6
7
|
}
|
|
8
|
+
type ITableRow<T> = T extends Array<infer E> ? E : T;
|
|
7
9
|
export declare const useTTable: <T>() => {
|
|
8
|
-
isLoading:
|
|
9
|
-
initHook: (callBackFn: (search: IPaginationParam & ISortParam) => Promise<IPaginatedApiResult<T> | T>, isShowPagination: boolean) => void;
|
|
10
|
-
sort:
|
|
10
|
+
isLoading: Ref<boolean, boolean>;
|
|
11
|
+
initHook: (callBackFn: (search: IPaginationParam & ISortParam) => Promise<IPaginatedApiResult<T> | T>, isShowPagination: boolean, key?: string) => void;
|
|
12
|
+
sort: Ref<{
|
|
11
13
|
descending?: OrderMethod;
|
|
12
14
|
sortKey?: string;
|
|
13
15
|
}, ITTableSort | {
|
|
@@ -22,7 +24,7 @@ export declare const useTTable: <T>() => {
|
|
|
22
24
|
};
|
|
23
25
|
}) => Promise<void>;
|
|
24
26
|
triggerApi: () => Promise<void>;
|
|
25
|
-
pagination:
|
|
27
|
+
pagination: Ref<{
|
|
26
28
|
current: number;
|
|
27
29
|
limit: number;
|
|
28
30
|
count: number;
|
|
@@ -32,8 +34,12 @@ export declare const useTTable: <T>() => {
|
|
|
32
34
|
count: number;
|
|
33
35
|
}>;
|
|
34
36
|
resetPagination: () => void;
|
|
35
|
-
tableData: [[] | T] extends [
|
|
37
|
+
tableData: [[] | T] extends [Ref<any, any>] ? import("@vue/shared").IfAny<Ref<any, any> & ([] | T), Ref<Ref<any, any> & ([] | T), Ref<any, any> & ([] | T)>, Ref<any, any> & ([] | T)> : Ref<[] | import("vue").UnwrapRef<T>, [] | T | import("vue").UnwrapRef<T>>;
|
|
36
38
|
handlePageChange: (current: number) => void;
|
|
37
39
|
handlePageSizeChange: (pageSize: number) => void;
|
|
40
|
+
selectedRows: Ref<ITableRow<T>[], ITableRow<T>[]>;
|
|
41
|
+
selectedIds: Ref<(string | number)[], (string | number)[]>;
|
|
42
|
+
handleSelectionChange: (_keys: string | number | (string | number)[], selectedRowData: ITableRow<T>[]) => void;
|
|
43
|
+
handleClearSelection: () => void;
|
|
38
44
|
};
|
|
39
45
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
2
|
import { OrderMethod } from '../types/enum.ts.js';
|
|
3
3
|
export const useTTable = ()=>{
|
|
4
|
+
const selectedRows = ref([]);
|
|
5
|
+
const selectedIds = ref([]);
|
|
4
6
|
const isLoading = ref(false);
|
|
5
7
|
const isPagination = ref(false);
|
|
6
|
-
let callBack;
|
|
7
8
|
const sort = ref({});
|
|
8
9
|
const tableData = ref([]);
|
|
9
10
|
const pagination = ref({
|
|
@@ -11,6 +12,9 @@ export const useTTable = ()=>{
|
|
|
11
12
|
limit: 20,
|
|
12
13
|
count: 0
|
|
13
14
|
});
|
|
15
|
+
let callBack;
|
|
16
|
+
let rowKey = 'id';
|
|
17
|
+
const getRowKey = (row)=>row[rowKey];
|
|
14
18
|
// 更新数据
|
|
15
19
|
const triggerApi = ()=>{
|
|
16
20
|
isLoading.value = true;
|
|
@@ -30,9 +34,10 @@ export const useTTable = ()=>{
|
|
|
30
34
|
isLoading.value = false;
|
|
31
35
|
});
|
|
32
36
|
};
|
|
33
|
-
const initHook = (callBackFn, isShowPagination)=>{
|
|
37
|
+
const initHook = (callBackFn, isShowPagination, key = 'id')=>{
|
|
34
38
|
callBack = callBackFn;
|
|
35
39
|
isPagination.value = isShowPagination;
|
|
40
|
+
rowKey = key;
|
|
36
41
|
};
|
|
37
42
|
// sortKey 为必传
|
|
38
43
|
const handleSortChange = (config, { col })=>{
|
|
@@ -67,6 +72,19 @@ export const useTTable = ()=>{
|
|
|
67
72
|
count: 0
|
|
68
73
|
};
|
|
69
74
|
};
|
|
75
|
+
const handleSelectionChange = (_keys, selectedRowData)=>{
|
|
76
|
+
const currentPageIds = tableData.value.map(getRowKey);
|
|
77
|
+
const otherPageRows = selectedRows.value.filter((row)=>!currentPageIds.includes(getRowKey(row)));
|
|
78
|
+
selectedRows.value = [
|
|
79
|
+
...otherPageRows,
|
|
80
|
+
...selectedRowData
|
|
81
|
+
];
|
|
82
|
+
selectedIds.value = selectedRows.value.map(getRowKey);
|
|
83
|
+
};
|
|
84
|
+
const handleClearSelection = ()=>{
|
|
85
|
+
selectedRows.value = [];
|
|
86
|
+
selectedIds.value = [];
|
|
87
|
+
};
|
|
70
88
|
return {
|
|
71
89
|
isLoading,
|
|
72
90
|
initHook,
|
|
@@ -77,6 +95,10 @@ export const useTTable = ()=>{
|
|
|
77
95
|
resetPagination,
|
|
78
96
|
tableData,
|
|
79
97
|
handlePageChange,
|
|
80
|
-
handlePageSizeChange
|
|
98
|
+
handlePageSizeChange,
|
|
99
|
+
selectedRows,
|
|
100
|
+
selectedIds,
|
|
101
|
+
handleSelectionChange,
|
|
102
|
+
handleClearSelection
|
|
81
103
|
};
|
|
82
104
|
};
|
|
@@ -13,4 +13,6 @@ export declare const useToolHttp: (apiPrefix: string, spaceId?: Ref<string>) =>
|
|
|
13
13
|
abort(): void;
|
|
14
14
|
};
|
|
15
15
|
getToolReferringAgents: (toolId: number) => Promise<import("@/types").IReferringAgent[]>;
|
|
16
|
+
addToolFavorite: (id: number) => Promise<unknown>;
|
|
17
|
+
removeToolFavorite: (id: number) => Promise<unknown>;
|
|
16
18
|
};
|
|
@@ -86,11 +86,25 @@ export const useToolHttp = (apiPrefix, spaceId)=>{
|
|
|
86
86
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
87
87
|
}
|
|
88
88
|
}).then((data)=>data.map(transferReferringAgentApi2ReferringAgent));
|
|
89
|
+
// 收藏 Tool
|
|
90
|
+
const addToolFavorite = (id)=>fetch.post(`${apiPrefix}/tool/v1/tool/${id}/add_favorite/`, undefined, {
|
|
91
|
+
headers: {
|
|
92
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
// 取消收藏 Tool
|
|
96
|
+
const removeToolFavorite = (id)=>fetch.delete(`${apiPrefix}/tool/v1/tool/${id}/remove_favorite/`, undefined, {
|
|
97
|
+
headers: {
|
|
98
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
99
|
+
}
|
|
100
|
+
});
|
|
89
101
|
return {
|
|
90
102
|
deleteTool,
|
|
91
103
|
restoreTool,
|
|
92
104
|
getTools,
|
|
93
105
|
getToolCount,
|
|
94
|
-
getToolReferringAgents
|
|
106
|
+
getToolReferringAgents,
|
|
107
|
+
addToolFavorite,
|
|
108
|
+
removeToolFavorite
|
|
95
109
|
};
|
|
96
110
|
};
|
|
@@ -331,7 +331,8 @@ import { transferTool2ToolApi, transferToolApi2Tool } from './tool.ts.js';
|
|
|
331
331
|
description: data.description,
|
|
332
332
|
updated_by: data.updatedBy,
|
|
333
333
|
created_by: data.createdBy,
|
|
334
|
-
agent_version: data.agentVersion
|
|
334
|
+
agent_version: data.agentVersion,
|
|
335
|
+
group_type: data.groupType
|
|
335
336
|
});
|
|
336
337
|
/**
|
|
337
338
|
* ui转换为接口使用
|
|
@@ -72,7 +72,8 @@ import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPag
|
|
|
72
72
|
content: data.content,
|
|
73
73
|
created_by: data.createdBy,
|
|
74
74
|
created_at: data.createdAt,
|
|
75
|
-
updated_by: data.updatedBy
|
|
75
|
+
updated_by: data.updatedBy,
|
|
76
|
+
group_type: data.groupType
|
|
76
77
|
});
|
|
77
78
|
};
|
|
78
79
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResourceStatus } from '@/enums';
|
|
2
|
-
import type { IBaseCountParam, IBaseCountParamApi, IPaginationParam, IPaginationParamApi, IPaginationResponse, IPaginationResponseApi, IReferringAgent, IReferringAgentApi, IResourceCommon, IResourceCommonApi, IResourceCommonSearchParams, IResourceCommonSearchParamsApi, IResourceCount, IResourceCountApi, IResourceFormCommon, IResourceFormCommonApi, IResourceReference, IResourceReferenceApi, ISortParam, ISortParamApi, ITagTree, ITagTreeApi, ITagTreeNode, ITagTreeNodeApi, IVariable, IVariableApi
|
|
2
|
+
import type { IApprovalSettingValue, IApprovalSettingValueApi, IBaseCountParam, IBaseCountParamApi, IPaginationParam, IPaginationParamApi, IPaginationResponse, IPaginationResponseApi, IReferringAgent, IReferringAgentApi, IResourceCommon, IResourceCommonApi, IResourceCommonSearchParams, IResourceCommonSearchParamsApi, IResourceCount, IResourceCountApi, IResourceFormCommon, IResourceFormCommonApi, IResourceReference, IResourceReferenceApi, ISortParam, ISortParamApi, ITagTree, ITagTreeApi, ITagTreeNode, ITagTreeNodeApi, IVariable, IVariableApi } from '@/types/common';
|
|
3
3
|
/**
|
|
4
4
|
* 接口转换为ui使用
|
|
5
5
|
* @param data ITagsTreeApi
|
|
@@ -78,6 +78,8 @@ import { transferResourcePermission2ResourcePermissionApi, transferResourcePermi
|
|
|
78
78
|
spaceId: data.space_id,
|
|
79
79
|
approvers: data.approvers,
|
|
80
80
|
ticketUrl: data.ticket_url,
|
|
81
|
+
favorite: data.favorite,
|
|
82
|
+
favoriteCount: data.favorite_count,
|
|
81
83
|
permission: transferResourcePermissionApi2ResourcePermission(data.permission)
|
|
82
84
|
});
|
|
83
85
|
/**
|
|
@@ -94,6 +96,8 @@ import { transferResourcePermission2ResourcePermissionApi, transferResourcePermi
|
|
|
94
96
|
space_id: data.spaceId,
|
|
95
97
|
approvers: data.approvers,
|
|
96
98
|
ticket_url: data.ticketUrl,
|
|
99
|
+
favorite: data.favorite,
|
|
100
|
+
favorite_count: data.favoriteCount,
|
|
97
101
|
permission: transferResourcePermission2ResourcePermissionApi(data.permission)
|
|
98
102
|
});
|
|
99
103
|
/**
|
|
@@ -172,7 +172,9 @@ import { transferBaseCountParam2BaseCountParamApi, transferIApprovalSettingValue
|
|
|
172
172
|
syncErrorMessage: data.sync_error_message,
|
|
173
173
|
mcpType: data.mcp_type,
|
|
174
174
|
detailUrl: data.detail_url,
|
|
175
|
-
refCount: data.ref_count
|
|
175
|
+
refCount: data.ref_count,
|
|
176
|
+
favorite: data.favorite,
|
|
177
|
+
favoriteCount: data.favorite_count
|
|
176
178
|
});
|
|
177
179
|
};
|
|
178
180
|
/**
|
|
@@ -203,7 +205,9 @@ import { transferBaseCountParam2BaseCountParamApi, transferIApprovalSettingValue
|
|
|
203
205
|
server_config: data.serverConfig,
|
|
204
206
|
sync_error_message: data.syncErrorMessage,
|
|
205
207
|
mcp_type: data.mcpType,
|
|
206
|
-
detail_url: data.detailUrl
|
|
208
|
+
detail_url: data.detailUrl,
|
|
209
|
+
favorite: data.favorite,
|
|
210
|
+
favorite_count: data.favoriteCount
|
|
207
211
|
});
|
|
208
212
|
};
|
|
209
213
|
/**
|
|
@@ -96,7 +96,8 @@ import { transferBaseCountParam2BaseCountParamApi, transferIPaginationParam2IPag
|
|
|
96
96
|
is_public: data.isPublic,
|
|
97
97
|
content: data.content,
|
|
98
98
|
updated_by: data.updatedBy,
|
|
99
|
-
tag_names: data.tagNames
|
|
99
|
+
tag_names: data.tagNames,
|
|
100
|
+
group_type: data.groupType
|
|
100
101
|
});
|
|
101
102
|
};
|
|
102
103
|
export const transferPromptCount2PromptCountApi = (data)=>{
|
|
@@ -92,6 +92,8 @@ import { transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortP
|
|
|
92
92
|
downloadCount: data.download_count,
|
|
93
93
|
installCount: data.install_count,
|
|
94
94
|
refCount: data.ref_count,
|
|
95
|
+
favorite: data.favorite,
|
|
96
|
+
favoriteCount: data.favorite_count,
|
|
95
97
|
scanner: data.scanner ? {
|
|
96
98
|
effectiveStatus: data.scanner.effective_status,
|
|
97
99
|
effectiveStatusCn: data.scanner.effective_status_cn,
|
|
@@ -116,6 +118,8 @@ import { transferIPaginationParam2IPaginationParamApi, transferISortParam2ISortP
|
|
|
116
118
|
skill_markdown: data.skillMarkdown,
|
|
117
119
|
download_count: data.downloadCount,
|
|
118
120
|
install_count: data.installCount,
|
|
121
|
+
favorite: data.favorite,
|
|
122
|
+
favorite_count: data.favoriteCount,
|
|
119
123
|
scanner: data.scanner ? {
|
|
120
124
|
effective_status: data.scanner.effectiveStatus,
|
|
121
125
|
effective_status_cn: data.scanner.effectiveStatusCn,
|
|
@@ -95,14 +95,18 @@ import { transferBaseCountParam2BaseCountParamApi, transferIApprovalSettingValue
|
|
|
95
95
|
id: data.tool_id
|
|
96
96
|
})), transferIApprovalSettingValueApi2IApprovalSettingValue(data)), {
|
|
97
97
|
id: data.tool_id,
|
|
98
|
-
refCount: data.ref_count
|
|
98
|
+
refCount: data.ref_count,
|
|
99
|
+
favorite: data.favorite,
|
|
100
|
+
favoriteCount: data.favorite_count
|
|
99
101
|
});
|
|
100
102
|
/**
|
|
101
103
|
* ui转换为接口使用(完整资源)
|
|
102
104
|
* @param data ITool
|
|
103
105
|
* @returns IToolApi
|
|
104
106
|
*/ export const transferTool2ToolApi = (data)=>_object_spread_props(_object_spread({}, transferToolForm2ToolFormApi(data), transferResourceCommon2ResourceCommonApi(data), transferIApprovalSettingValue2IApprovalSettingValueApi(data)), {
|
|
105
|
-
tool_id: data.id
|
|
107
|
+
tool_id: data.id,
|
|
108
|
+
favorite: data.favorite,
|
|
109
|
+
favorite_count: data.favoriteCount
|
|
106
110
|
});
|
|
107
111
|
/**
|
|
108
112
|
* ui转换为接口使用
|
package/dist/types/agent.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IBaseCountParam, IBaseCountParamApi, IContent, IPaginationParam, IPaginationParamApi, IResourceCommon, IResourceCommonApi, IResourceCommonSearchParams, IResourceCommonSearchParamsApi, IResourceFormCommon, IResourceFormCommonApi, ISortParam, ISortParamApi, IVariable, IVariableApi } from './common';
|
|
2
|
-
import { AgentCommandType, AgentDeployMode, AgentType, EnumCharacter, Module, PromptSource, ResourceStatus, UserScope } from './enum';
|
|
2
|
+
import { AgentCommandType, AgentDeployMode, AgentType, EnumCharacter, GroupType, Module, PromptSource, ResourceStatus, UserScope } from './enum';
|
|
3
3
|
import type { IKnowledge, IKnowledgeApi, IKnowledgebase, IKnowledgebaseApi, IKnowledgeQuerySetting, IKnowledgeQuerySettingApi } from './knowledge';
|
|
4
4
|
import type { IMcp, IMcpApi } from './mcp';
|
|
5
5
|
import type { ISkill, ISkillApi } from './skill';
|
|
@@ -265,6 +265,7 @@ export interface IAgentListParam extends IPaginationParam, IResourceCommonSearch
|
|
|
265
265
|
updatedBy?: string;
|
|
266
266
|
createdBy?: string;
|
|
267
267
|
agentVersion?: string;
|
|
268
|
+
groupType?: GroupType;
|
|
268
269
|
}
|
|
269
270
|
export interface IAgentListParamApi extends IPaginationParamApi, IResourceCommonSearchParamsApi, ISortParamApi {
|
|
270
271
|
agent_type: AgentType;
|
|
@@ -282,6 +283,7 @@ export interface IAgentListParamApi extends IPaginationParamApi, IResourceCommon
|
|
|
282
283
|
updated_by?: string;
|
|
283
284
|
created_by?: string;
|
|
284
285
|
agent_version?: string;
|
|
286
|
+
group_type?: GroupType;
|
|
285
287
|
}
|
|
286
288
|
export interface IResourceApply {
|
|
287
289
|
resourceType: Module;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IBaseCountParam, IBaseCountParamApi, IContent, IPaginationParam, IPaginationParamApi, IResourceCommon, IResourceCommonApi, IResourceCommonSearchParams, IResourceCommonSearchParamsApi, IResourceFormCommon, IResourceFormCommonApi, ISortParam, ISortParamApi, IVariable, IVariableApi } from './common';
|
|
2
|
-
import { EnumCharacter, Module } from './enum';
|
|
2
|
+
import { EnumCharacter, GroupType, Module } from './enum';
|
|
3
3
|
import { IResourcePermission, IResourcePermissionApi } from './permission';
|
|
4
4
|
export interface ICollectionFormApi extends Omit<IResourceFormCommonApi, 'description'> {
|
|
5
5
|
collection_name: string;
|
|
@@ -65,6 +65,7 @@ export interface ICollectionListParam extends IPaginationParam, ISortParam, IRes
|
|
|
65
65
|
createdAt?: string;
|
|
66
66
|
updatedBy?: string;
|
|
67
67
|
permission?: IResourcePermission;
|
|
68
|
+
groupType?: GroupType;
|
|
68
69
|
}
|
|
69
70
|
export interface ICollectionListParamApi extends IPaginationParamApi, ISortParamApi, IResourceCommonSearchParamsApi {
|
|
70
71
|
fuzzy?: string;
|
|
@@ -84,6 +85,7 @@ export interface ICollectionListParamApi extends IPaginationParamApi, ISortParam
|
|
|
84
85
|
created_at?: string;
|
|
85
86
|
updated_by?: string;
|
|
86
87
|
permission?: IResourcePermissionApi;
|
|
88
|
+
group_type?: GroupType;
|
|
87
89
|
}
|
|
88
90
|
export type ICollectionCountParam = IBaseCountParam;
|
|
89
91
|
export type ICollectionCountParamApi = IBaseCountParamApi;
|
package/dist/types/common.d.ts
CHANGED
|
@@ -109,6 +109,8 @@ export interface IResourceCommon<T = ResourceStatus> {
|
|
|
109
109
|
spaceId?: string;
|
|
110
110
|
approvers?: string[];
|
|
111
111
|
ticketUrl?: string;
|
|
112
|
+
favorite?: boolean;
|
|
113
|
+
favoriteCount?: number;
|
|
112
114
|
permission: IResourcePermission;
|
|
113
115
|
}
|
|
114
116
|
export interface IResourceCommonApi<T = ResourceStatus> {
|
|
@@ -121,6 +123,8 @@ export interface IResourceCommonApi<T = ResourceStatus> {
|
|
|
121
123
|
space_id: string;
|
|
122
124
|
approvers?: string[];
|
|
123
125
|
ticket_url?: string;
|
|
126
|
+
favorite?: boolean;
|
|
127
|
+
favorite_count?: number;
|
|
124
128
|
permission: IResourcePermissionApi;
|
|
125
129
|
}
|
|
126
130
|
export interface IPaginationResponseApi<T> {
|
package/dist/types/enum.d.ts
CHANGED
|
@@ -278,6 +278,7 @@ export declare enum GroupType {
|
|
|
278
278
|
All = "all",
|
|
279
279
|
Space = "space",
|
|
280
280
|
User = "user",
|
|
281
|
+
Favorite = "favorite",
|
|
281
282
|
Deleted = "deleted"
|
|
282
283
|
}
|
|
283
284
|
export declare enum OrderMethod {
|
|
@@ -343,7 +344,9 @@ export declare enum PromptOrderBy {
|
|
|
343
344
|
CreatedAt = "created_at",
|
|
344
345
|
Likes = "likes",
|
|
345
346
|
UsedCount = "used_count",
|
|
346
|
-
PromptName = "prompt_name"
|
|
347
|
+
PromptName = "prompt_name",
|
|
348
|
+
UpdatedAt = "updated_at",
|
|
349
|
+
UpdatedBy = "updated_by"
|
|
347
350
|
}
|
|
348
351
|
export declare enum IsSensitiveParam {
|
|
349
352
|
Null = "null",
|
package/dist/types/enum.ts.js
CHANGED
|
@@ -311,6 +311,7 @@ export var GroupType;
|
|
|
311
311
|
GroupType["All"] = "all";
|
|
312
312
|
GroupType["Space"] = "space";
|
|
313
313
|
GroupType["User"] = "user";
|
|
314
|
+
GroupType["Favorite"] = "favorite";
|
|
314
315
|
GroupType["Deleted"] = "deleted";
|
|
315
316
|
})(GroupType || (GroupType = {}));
|
|
316
317
|
export var OrderMethod;
|
|
@@ -390,6 +391,8 @@ export var PromptOrderBy;
|
|
|
390
391
|
PromptOrderBy["Likes"] = "likes";
|
|
391
392
|
PromptOrderBy["UsedCount"] = "used_count";
|
|
392
393
|
PromptOrderBy["PromptName"] = "prompt_name";
|
|
394
|
+
PromptOrderBy["UpdatedAt"] = "updated_at";
|
|
395
|
+
PromptOrderBy["UpdatedBy"] = "updated_by";
|
|
393
396
|
})(PromptOrderBy || (PromptOrderBy = {}));
|
|
394
397
|
export var IsSensitiveParam;
|
|
395
398
|
(function(IsSensitiveParam) {
|
package/dist/types/mcp.d.ts
CHANGED
|
@@ -80,6 +80,8 @@ export interface IMcpApi extends IMcpFormApi, IResourceCommonApi {
|
|
|
80
80
|
detail_url?: string;
|
|
81
81
|
selected_tools?: IMcpToolApi[];
|
|
82
82
|
ref_count?: number;
|
|
83
|
+
favorite?: boolean;
|
|
84
|
+
favorite_count?: number;
|
|
83
85
|
}
|
|
84
86
|
export interface IMcpToolOutputParam {
|
|
85
87
|
paramName: string;
|
|
@@ -109,6 +111,8 @@ export interface IMcp extends IMcpForm, IResourceCommon {
|
|
|
109
111
|
detailUrl?: string;
|
|
110
112
|
selectedTools?: IMcpTool[];
|
|
111
113
|
refCount?: number;
|
|
114
|
+
favorite?: boolean;
|
|
115
|
+
favoriteCount?: number;
|
|
112
116
|
}
|
|
113
117
|
export interface IRegisterMcpParam {
|
|
114
118
|
mcps: {
|
package/dist/types/prompt.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IBaseCountParam, IBaseCountParamApi, IPaginationParam, IPaginationParamApi, IResourceCommon, IResourceCommonApi, IResourceCommonSearchParams, IResourceCommonSearchParamsApi, IResourceFormCommon, IResourceFormCommonApi, ISortParam, ISortParamApi, IVariable, IVariableApi } from './common';
|
|
2
|
-
import { EnumCharacter, Module, PromptOrderBy } from './enum';
|
|
2
|
+
import { EnumCharacter, GroupType, Module, PromptOrderBy } from './enum';
|
|
3
3
|
import { IResourcePermission, IResourcePermissionApi } from './permission';
|
|
4
4
|
export interface IPromptsApiParams extends IPaginationParamApi, IResourceCommonSearchParamsApi, ISortParamApi<PromptOrderBy> {
|
|
5
5
|
fuzzy?: string;
|
|
@@ -18,6 +18,7 @@ export interface IPromptsApiParams extends IPaginationParamApi, IResourceCommonS
|
|
|
18
18
|
content?: string;
|
|
19
19
|
updated_by?: string;
|
|
20
20
|
permission?: IResourcePermissionApi;
|
|
21
|
+
group_type?: GroupType;
|
|
21
22
|
}
|
|
22
23
|
export interface IPromptsParams extends IPaginationParam, IResourceCommonSearchParams, ISortParam<PromptOrderBy> {
|
|
23
24
|
fuzzy?: string;
|
|
@@ -36,6 +37,7 @@ export interface IPromptsParams extends IPaginationParam, IResourceCommonSearchP
|
|
|
36
37
|
content?: string;
|
|
37
38
|
updatedBy?: string;
|
|
38
39
|
permission?: IResourcePermission;
|
|
40
|
+
groupType?: GroupType;
|
|
39
41
|
}
|
|
40
42
|
export interface IPromptFormApi extends IResourceFormCommonApi {
|
|
41
43
|
prompt_name: string;
|
package/dist/types/skill.d.ts
CHANGED
|
@@ -72,6 +72,8 @@ export interface ISkill extends ISkillForm, IResourceCommon<SkillStatus> {
|
|
|
72
72
|
downloadCount?: number;
|
|
73
73
|
installCount?: number;
|
|
74
74
|
refCount?: number;
|
|
75
|
+
favorite?: boolean;
|
|
76
|
+
favoriteCount?: number;
|
|
75
77
|
scanner?: ISkillScanner;
|
|
76
78
|
envs?: ISkillEnv[];
|
|
77
79
|
bkaiDependencies?: {
|
|
@@ -85,6 +87,8 @@ export interface ISkillApi extends ISkillFormApi, IResourceCommonApi<SkillStatus
|
|
|
85
87
|
download_count?: number;
|
|
86
88
|
install_count?: number;
|
|
87
89
|
ref_count?: number;
|
|
90
|
+
favorite?: boolean;
|
|
91
|
+
favorite_count?: number;
|
|
88
92
|
scanner?: ISkillScannerApi;
|
|
89
93
|
envs?: ISkillEnvApi[];
|
|
90
94
|
bkai_dependencies?: {
|
package/dist/types/tool.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export interface IToolFormApi extends IResourceFormCommonApi {
|
|
|
35
35
|
export interface IToolApi extends IToolFormApi, Omit<IResourceCommonApi, 'id'>, IApprovalSettingValueApi {
|
|
36
36
|
tool_id: number;
|
|
37
37
|
ref_count?: number;
|
|
38
|
+
favorite?: boolean;
|
|
39
|
+
favorite_count?: number;
|
|
38
40
|
}
|
|
39
41
|
export interface IToolForm extends IResourceFormCommon {
|
|
40
42
|
toolName: string;
|
|
@@ -51,6 +53,8 @@ export interface IToolForm extends IResourceFormCommon {
|
|
|
51
53
|
}
|
|
52
54
|
export interface ITool extends IToolForm, IResourceCommon, IApprovalSettingValue {
|
|
53
55
|
refCount?: number;
|
|
56
|
+
favorite?: boolean;
|
|
57
|
+
favoriteCount?: number;
|
|
54
58
|
}
|
|
55
59
|
export interface IApplicationTool extends ITool {
|
|
56
60
|
resourceId: number;
|
package/package.json
CHANGED