@blueking/ai-ui-sdk 0.1.19-beta.31 → 0.1.19-beta.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/render-auth/auth-dialog.script.vue.js.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-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-dataset/components/batch-delete-dataset-data/index.script.vue.js +86 -0
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +16 -0
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.d.ts +16 -0
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +5 -0
- package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.script.vue.js.js +133 -0
- package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.css +4 -0
- package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.d.ts +16 -0
- package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.js +5 -0
- 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.script.vue.js.js +176 -0
- package/dist/components/render-dataset/components/dataset-data-valid/index.vue.css +4 -0
- package/dist/components/render-dataset/components/dataset-data-valid/index.vue.d.ts +16 -0
- package/dist/components/render-dataset/components/dataset-data-valid/index.vue.js +5 -0
- 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 +2 -2
- 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 +2 -2
- package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
- package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/search-dataset-data/index.script.vue.js.js +14 -0
- package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.script.vue.js.js +61 -39
- package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +17 -0
- 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.d.ts +2 -2
- package/dist/components/render-dataset-list/components/main.vue.js +1 -1
- package/dist/components/render-dataset-list/components/table.vue.d.ts +2 -2
- 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-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 +5 -5
- package/dist/components/render-file-type-icon/index.vue.js +1 -1
- package/dist/components/render-header/index.vue.css +3 -3
- package/dist/components/render-header/index.vue.js +1 -1
- package/dist/components/render-like/index.vue.css +5 -5
- package/dist/components/render-like/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-t-table/index.script.vue.js +2 -1
- package/dist/components/render-t-table/index.vue.css +28 -25
- package/dist/components/render-t-table/index.vue.js +1 -1
- package/dist/components/render-tag-tree/index.script.vue.js.js +34 -18
- package/dist/components/render-tag-tree/index.vue.css +7 -7
- package/dist/components/render-tag-tree/index.vue.d.ts +1 -0
- package/dist/components/render-tag-tree/index.vue.js +1 -1
- package/dist/css/tailwind.css +13 -1
- package/dist/hooks/use-common-http.d.ts +4 -0
- package/dist/hooks/use-common-http.ts.js +12 -2
- package/dist/hooks/use-dataset-http.d.ts +2 -1
- package/dist/hooks/use-dataset-http.ts.js +8 -1
- package/dist/hooks/use-t-table.d.ts +2 -2
- package/dist/hooks/use-t-table.ts.js +1 -5
- package/dist/http/helper/agent.d.ts +13 -1
- package/dist/http/helper/agent.ts.js +69 -24
- package/dist/http/helper/dataset.d.ts +7 -1
- package/dist/http/helper/dataset.ts.js +16 -2
- package/dist/transforms.d.ts +1 -0
- package/dist/transforms.ts.js +1 -0
- package/dist/types/agent.d.ts +41 -24
- package/dist/types/dataset.d.ts +14 -0
- package/dist/types/enum.d.ts +8 -1
- package/dist/types/enum.ts.js +8 -0
- package/package.json +1 -1
package/dist/css/tailwind.css
CHANGED
|
@@ -33,6 +33,10 @@
|
|
|
33
33
|
align-items: flex-start !important;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
.g-align-end {
|
|
37
|
+
align-items: end;
|
|
38
|
+
}
|
|
39
|
+
|
|
36
40
|
.g-align-self-center {
|
|
37
41
|
align-self: center !important;
|
|
38
42
|
}
|
|
@@ -1003,9 +1007,17 @@
|
|
|
1003
1007
|
}
|
|
1004
1008
|
|
|
1005
1009
|
.g-z-index-9999 {
|
|
1006
|
-
z-index: 9999;
|
|
1010
|
+
z-index: 9999 !important;
|
|
1007
1011
|
}
|
|
1008
1012
|
|
|
1009
1013
|
.g-fill-current-color {
|
|
1010
1014
|
fill: currentColor;
|
|
1011
1015
|
}
|
|
1016
|
+
|
|
1017
|
+
.g-line-clamp-3 {
|
|
1018
|
+
display: -webkit-box !important;
|
|
1019
|
+
-webkit-box-orient: vertical !important;
|
|
1020
|
+
-webkit-line-clamp: 3 !important;
|
|
1021
|
+
overflow: hidden !important;
|
|
1022
|
+
word-break: break-word;
|
|
1023
|
+
}
|
|
@@ -5,4 +5,8 @@ export declare const useCommonHttp: (apiPrefix: string, spaceId?: Ref<string>) =
|
|
|
5
5
|
(module: Module, subModule: Module, tagName: string, groupType?: GroupType, generateType?: EnumCharacter): Promise<import("@/types/common").ITagTree>;
|
|
6
6
|
abort(): void;
|
|
7
7
|
};
|
|
8
|
+
getMarketTagTree: {
|
|
9
|
+
(module: Module, tagName: string): Promise<import("@/types/common").ITagTree>;
|
|
10
|
+
abort(): void;
|
|
11
|
+
};
|
|
8
12
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fetch, { withAbort } from '../http/fetch/index.ts.js';
|
|
2
2
|
import { transferTagTreeApiToTagTree } from '../http/helper/common.ts.js';
|
|
3
3
|
export const useCommonHttp = (apiPrefix, spaceId)=>{
|
|
4
|
-
//
|
|
4
|
+
// 获取资源标签树
|
|
5
5
|
const getTagTree = withAbort((signal, module, subModule, tagName, groupType, generateType)=>fetch.get(`${apiPrefix}/${module}/v1/${subModule}/tag_tree/`, {
|
|
6
6
|
tag_name: tagName,
|
|
7
7
|
group_type: groupType,
|
|
@@ -12,7 +12,17 @@ export const useCommonHttp = (apiPrefix, spaceId)=>{
|
|
|
12
12
|
},
|
|
13
13
|
signal
|
|
14
14
|
}).then((data)=>transferTagTreeApiToTagTree(data)));
|
|
15
|
+
// 获取市场标签树
|
|
16
|
+
const getMarketTagTree = withAbort((signal, module, tagName)=>fetch.get(`${apiPrefix}/market/v1/${module}/tag_tree/`, {
|
|
17
|
+
tag_name: tagName
|
|
18
|
+
}, {
|
|
19
|
+
headers: {
|
|
20
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
21
|
+
},
|
|
22
|
+
signal
|
|
23
|
+
}).then((data)=>transferTagTreeApiToTagTree(data)));
|
|
15
24
|
return {
|
|
16
|
-
getTagTree
|
|
25
|
+
getTagTree,
|
|
26
|
+
getMarketTagTree
|
|
17
27
|
};
|
|
18
28
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
|
-
import type { IBatchRetryReviewDatasetData, IBatchReviewDatasetData, IComponent, IDatasetApi, IDatasetDataApi, IDatasetDataForm, IDatasetDataParam, IDatasetForm, IDatasetInfo, IDatasetListParam, IDatasetStatusInfo, IOperatRecordParam, ISchema, IUserInfoForm } from '@/types/dataset';
|
|
2
|
+
import type { IBatchRetryReviewDatasetData, IBatchReviewDatasetData, IBatchUpdateDatasetDataValidity, IComponent, IDatasetApi, IDatasetDataApi, IDatasetDataForm, IDatasetDataParam, IDatasetForm, IDatasetInfo, IDatasetListParam, IDatasetStatusInfo, IOperatRecordParam, ISchema, IUserInfoForm } from '@/types/dataset';
|
|
3
3
|
import { Module } from '@/types/enum';
|
|
4
4
|
import type { ITagApi } from '@/types/meta';
|
|
5
5
|
export declare const useDatasetHttp: (apiPrefix?: string, spaceId?: Ref<string>) => {
|
|
@@ -46,6 +46,7 @@ export declare const useDatasetHttp: (apiPrefix?: string, spaceId?: Ref<string>)
|
|
|
46
46
|
}>;
|
|
47
47
|
batchReviewDatasetData: (data: IBatchReviewDatasetData) => Promise<unknown>;
|
|
48
48
|
batchRetryReviewDatasetData: (data: IBatchRetryReviewDatasetData) => Promise<unknown>;
|
|
49
|
+
batchUpdateDatasetDataValidity: (data: IBatchUpdateDatasetDataValidity) => Promise<unknown>;
|
|
49
50
|
getTags: (module: Module) => Promise<import("@/types/meta").ITag[]>;
|
|
50
51
|
plusTag: (tagNames: string[][], module: Module) => Promise<ITagApi>;
|
|
51
52
|
checkTag: (tagNames: string[][], module: Module) => Promise<boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import fetch from '../http/fetch/index.ts.js';
|
|
2
|
-
import { transferBatchRetryReviewDatasetData2BatchRetryReviewDatasetDataApi, transferBatchReviewDatasetData2BatchReviewDatasetDataApi, transferCompanyApi2Company, transferCompanyParticipantApi2CompanyParticipantList, transferCreateDatasetDataResultApi2CreateDatasetDataResult, transferDatasetApi2Dataset, transferDatasetApiGuideApi2DatasetApiGuide, transferDatasetDataApi2DatasetData, transferDatasetDataFileApi2DatasetDataFile, transferDatasetDataForm2DatasetDataFormApi, transferDatasetDataParam2DatasetDataParamApi, transferDatasetForm2DatasetFormApi, transferDatasetListParam2DatasetListParamApi, transferOperatRecordApi2OperatRecord, transferOperatRecordParam2OperatRecordParamApi, transferUserInfoApi2UserInfo, transferUserInfoForm2UserInfoFormApi } from '../http/helper/dataset.ts.js';
|
|
2
|
+
import { transferBatchRetryReviewDatasetData2BatchRetryReviewDatasetDataApi, transferBatchReviewDatasetData2BatchReviewDatasetDataApi, transferBatchUpdateDatasetDataValidity2BatchUpdateDatasetDataValidityApi, transferCompanyApi2Company, transferCompanyParticipantApi2CompanyParticipantList, transferCreateDatasetDataResultApi2CreateDatasetDataResult, transferDatasetApi2Dataset, transferDatasetApiGuideApi2DatasetApiGuide, transferDatasetDataApi2DatasetData, transferDatasetDataFileApi2DatasetDataFile, transferDatasetDataForm2DatasetDataFormApi, transferDatasetDataParam2DatasetDataParamApi, transferDatasetForm2DatasetFormApi, transferDatasetListParam2DatasetListParamApi, transferOperatRecordApi2OperatRecord, transferOperatRecordParam2OperatRecordParamApi, transferUserInfoApi2UserInfo, transferUserInfoForm2UserInfoFormApi } from '../http/helper/dataset.ts.js';
|
|
3
3
|
import { transferTagApi2Tag } from '../http/helper/meta.ts.js';
|
|
4
4
|
const datasetPerfix = 'dataset/v1';
|
|
5
5
|
const metaPerfix = 'meta/v1';
|
|
@@ -201,6 +201,12 @@ export const useDatasetHttp = (apiPrefix, spaceId)=>{
|
|
|
201
201
|
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
202
202
|
}
|
|
203
203
|
});
|
|
204
|
+
// 批量修改有效性
|
|
205
|
+
const batchUpdateDatasetDataValidity = (data)=>fetch.post(`${apiPrefix}/${datasetPerfix}/dataset_item/batch_valid/`, transferBatchUpdateDatasetDataValidity2BatchUpdateDatasetDataValidityApi(data), {
|
|
206
|
+
headers: {
|
|
207
|
+
'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
|
|
208
|
+
}
|
|
209
|
+
});
|
|
204
210
|
// 获取tag列表
|
|
205
211
|
const getTags = (module)=>fetch.get(`${apiPrefix}/${datasetPerfix}/tag/`, {
|
|
206
212
|
scope_name: module
|
|
@@ -258,6 +264,7 @@ export const useDatasetHttp = (apiPrefix, spaceId)=>{
|
|
|
258
264
|
getCompanyParticipantList,
|
|
259
265
|
batchReviewDatasetData,
|
|
260
266
|
batchRetryReviewDatasetData,
|
|
267
|
+
batchUpdateDatasetDataValidity,
|
|
261
268
|
getTags,
|
|
262
269
|
plusTag,
|
|
263
270
|
checkTag
|
|
@@ -13,12 +13,8 @@ export const useTTable = ()=>{
|
|
|
13
13
|
});
|
|
14
14
|
// 更新数据
|
|
15
15
|
const triggerApi = ()=>{
|
|
16
|
-
if (!callBack) {
|
|
17
|
-
console.error('先调用initHook初始化回调函数');
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
16
|
isLoading.value = true;
|
|
21
|
-
callBack({
|
|
17
|
+
return callBack({
|
|
22
18
|
page: pagination.value.current,
|
|
23
19
|
pageSize: pagination.value.limit,
|
|
24
20
|
orderBy: sort.value.sortKey,
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import type { IAgentInfo, IAgentInfoApi } from '@/types/agent';
|
|
1
|
+
import type { IAgentCommand, IAgentCommandApi, IAgentInfo, IAgentInfoApi } from '@/types/agent';
|
|
2
2
|
/**
|
|
3
3
|
* 转换agentapi为agent
|
|
4
4
|
* @param data IAgentInfoApi
|
|
5
5
|
* @returns IAgentInfo
|
|
6
6
|
*/
|
|
7
7
|
export declare const transferAgentInfoApi2AgentInfo: (data: IAgentInfoApi) => IAgentInfo;
|
|
8
|
+
/**
|
|
9
|
+
* 接口转换为ui使用
|
|
10
|
+
* @param data IAgentCommandApi
|
|
11
|
+
* @returns IAgentCommand
|
|
12
|
+
*/
|
|
13
|
+
export declare const transferAgentCommandApi2AgentCommand: (data: IAgentCommandApi) => IAgentCommand;
|
|
14
|
+
/**
|
|
15
|
+
* ui转换为接口使用
|
|
16
|
+
* @param data IAgentCommand
|
|
17
|
+
* @returns IAgentCommandApi
|
|
18
|
+
*/
|
|
19
|
+
export declare const transferAgentCommand2AgentCommandApi: (data: IAgentCommand) => IAgentCommandApi;
|
|
@@ -3,34 +3,14 @@
|
|
|
3
3
|
* @param data IAgentInfoApi
|
|
4
4
|
* @returns IAgentInfo
|
|
5
5
|
*/ export const transferAgentInfoApi2AgentInfo = (data)=>{
|
|
6
|
-
var _data_conversation_settings, _data_conversation_settings1, _data_conversation_settings_commands, _data_conversation_settings2, _data_conversation_settings3, _data_prompt_setting;
|
|
6
|
+
var _data_conversation_settings, _data_conversation_settings1, _data_conversation_settings_commands, _data_conversation_settings2, _data_conversation_settings3, _data_conversation_settings4, _data_prompt_setting;
|
|
7
7
|
return {
|
|
8
8
|
conversationSettings: {
|
|
9
9
|
openingRemark: data === null || data === void 0 ? void 0 : (_data_conversation_settings = data.conversation_settings) === null || _data_conversation_settings === void 0 ? void 0 : _data_conversation_settings.opening_remark,
|
|
10
10
|
predefinedQuestions: data === null || data === void 0 ? void 0 : (_data_conversation_settings1 = data.conversation_settings) === null || _data_conversation_settings1 === void 0 ? void 0 : _data_conversation_settings1.predefined_questions,
|
|
11
|
-
commands:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
icon: command.icon,
|
|
15
|
-
components: command.components.map((component)=>({
|
|
16
|
-
type: component.type,
|
|
17
|
-
name: component.name,
|
|
18
|
-
key: component.key,
|
|
19
|
-
placeholder: component.placeholder,
|
|
20
|
-
default: component.default,
|
|
21
|
-
required: component.required,
|
|
22
|
-
fillBack: component.fill_back,
|
|
23
|
-
fillRegx: component.fill_regx,
|
|
24
|
-
rows: component.rows,
|
|
25
|
-
min: component.min,
|
|
26
|
-
max: component.max,
|
|
27
|
-
options: component.options
|
|
28
|
-
})),
|
|
29
|
-
content: command.content,
|
|
30
|
-
agentId: command.agent_id,
|
|
31
|
-
status: command.status
|
|
32
|
-
})),
|
|
33
|
-
enableChatSession: data === null || data === void 0 ? void 0 : (_data_conversation_settings3 = data.conversation_settings) === null || _data_conversation_settings3 === void 0 ? void 0 : _data_conversation_settings3.enable_chat_session
|
|
11
|
+
commands: ((_data_conversation_settings2 = data.conversation_settings) === null || _data_conversation_settings2 === void 0 ? void 0 : (_data_conversation_settings_commands = _data_conversation_settings2.commands) === null || _data_conversation_settings_commands === void 0 ? void 0 : _data_conversation_settings_commands.map(transferAgentCommandApi2AgentCommand)) || [],
|
|
12
|
+
enableChatSession: data === null || data === void 0 ? void 0 : (_data_conversation_settings3 = data.conversation_settings) === null || _data_conversation_settings3 === void 0 ? void 0 : _data_conversation_settings3.enable_chat_session,
|
|
13
|
+
enableWordSelectionPopup: data === null || data === void 0 ? void 0 : (_data_conversation_settings4 = data.conversation_settings) === null || _data_conversation_settings4 === void 0 ? void 0 : _data_conversation_settings4.enable_word_selection_popup
|
|
34
14
|
},
|
|
35
15
|
promptSetting: {
|
|
36
16
|
content: data === null || data === void 0 ? void 0 : (_data_prompt_setting = data.prompt_setting) === null || _data_prompt_setting === void 0 ? void 0 : _data_prompt_setting.content
|
|
@@ -44,3 +24,68 @@
|
|
|
44
24
|
saasUrl: data === null || data === void 0 ? void 0 : data.saas_url
|
|
45
25
|
};
|
|
46
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* 接口转换为ui使用
|
|
29
|
+
* @param data IAgentCommandApi
|
|
30
|
+
* @returns IAgentCommand
|
|
31
|
+
*/ export const transferAgentCommandApi2AgentCommand = (data)=>{
|
|
32
|
+
return {
|
|
33
|
+
id: data.id,
|
|
34
|
+
name: data.name,
|
|
35
|
+
icon: data.icon,
|
|
36
|
+
agentId: data.agent_id,
|
|
37
|
+
agentName: data.agent_name,
|
|
38
|
+
content: data.content,
|
|
39
|
+
status: data.status,
|
|
40
|
+
enableFillBack: data.enable_fill_back,
|
|
41
|
+
fillBackComponentKey: data.fill_back_component_key,
|
|
42
|
+
fillRegx: data.fill_regx,
|
|
43
|
+
alias: data.alias,
|
|
44
|
+
components: data.components.map((component)=>({
|
|
45
|
+
type: component.type,
|
|
46
|
+
name: component.name,
|
|
47
|
+
key: component.key,
|
|
48
|
+
placeholder: component.placeholder,
|
|
49
|
+
default: component.default,
|
|
50
|
+
required: component.required,
|
|
51
|
+
rows: component.rows,
|
|
52
|
+
options: component.options,
|
|
53
|
+
min: component.min,
|
|
54
|
+
max: component.max,
|
|
55
|
+
multiple: component.multiple
|
|
56
|
+
}))
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* ui转换为接口使用
|
|
61
|
+
* @param data IAgentCommand
|
|
62
|
+
* @returns IAgentCommandApi
|
|
63
|
+
*/ export const transferAgentCommand2AgentCommandApi = (data)=>{
|
|
64
|
+
const result = {
|
|
65
|
+
id: data.id,
|
|
66
|
+
name: data.name,
|
|
67
|
+
icon: data.icon,
|
|
68
|
+
agent_id: data.agentId,
|
|
69
|
+
agent_name: data.agentName,
|
|
70
|
+
content: data.content,
|
|
71
|
+
status: data.status,
|
|
72
|
+
enable_fill_back: data.enableFillBack,
|
|
73
|
+
fill_back_component_key: data.fillBackComponentKey,
|
|
74
|
+
fill_regx: data.fillRegx,
|
|
75
|
+
alias: data.alias,
|
|
76
|
+
components: data.components.map((component)=>({
|
|
77
|
+
type: component.type,
|
|
78
|
+
name: component.name,
|
|
79
|
+
key: component.key,
|
|
80
|
+
placeholder: component.placeholder,
|
|
81
|
+
default: component.default,
|
|
82
|
+
required: component.required,
|
|
83
|
+
rows: component.rows,
|
|
84
|
+
options: component.options,
|
|
85
|
+
min: component.min,
|
|
86
|
+
max: component.max,
|
|
87
|
+
multiple: component.multiple
|
|
88
|
+
}))
|
|
89
|
+
};
|
|
90
|
+
return result;
|
|
91
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IBatchRetryReviewDatasetData, IBatchReviewDatasetData, ICompany, ICompanyApi, ICompanyParticipant, ICompanyParticipantApi, ICreataDatasetDataResultApi, IDataset, IDatasetApi, IDatasetApiGuide, IDatasetApiGuideApi, IDatasetData, IDatasetDataApi, IDatasetDataFile, IDatasetDataFileApi, IDatasetDataForm, IDatasetDataFormApi, IDatasetDataParam, IDatasetDataParamApi, IDatasetForm, IDatasetFormApi, IDatasetListParam, IDatasetListParamApi, IOperatRecord, IOperatRecordApi, IOperatRecordParam, IOperatRecordParamApi, IUserInfo, IUserInfoApi, IUserInfoForm, IUserInfoFormApi } from '@/types/dataset';
|
|
1
|
+
import type { IBatchRetryReviewDatasetData, IBatchReviewDatasetData, IBatchUpdateDatasetDataValidity, IBatchUpdateDatasetDataValidityApi, ICompany, ICompanyApi, ICompanyParticipant, ICompanyParticipantApi, ICreataDatasetDataResultApi, IDataset, IDatasetApi, IDatasetApiGuide, IDatasetApiGuideApi, IDatasetData, IDatasetDataApi, IDatasetDataFile, IDatasetDataFileApi, IDatasetDataForm, IDatasetDataFormApi, IDatasetDataParam, IDatasetDataParamApi, IDatasetForm, IDatasetFormApi, IDatasetListParam, IDatasetListParamApi, IOperatRecord, IOperatRecordApi, IOperatRecordParam, IOperatRecordParamApi, IUserInfo, IUserInfoApi, IUserInfoForm, IUserInfoFormApi } from '@/types/dataset';
|
|
2
2
|
/**
|
|
3
3
|
* 接口转换为ui使用
|
|
4
4
|
* @param data ICreataDatasetDataResultApi
|
|
@@ -122,3 +122,9 @@ export declare const transferBatchRetryReviewDatasetData2BatchRetryReviewDataset
|
|
|
122
122
|
dataset_item_ids: number[];
|
|
123
123
|
is_retry_all: boolean;
|
|
124
124
|
};
|
|
125
|
+
/**
|
|
126
|
+
* ui 转接口
|
|
127
|
+
* @param data IBatchUpdateDatasetDataValidity
|
|
128
|
+
* @returns IBatchUpdateDatasetDataValidityApi
|
|
129
|
+
*/
|
|
130
|
+
export declare const transferBatchUpdateDatasetDataValidity2BatchUpdateDatasetDataValidityApi: (data: IBatchUpdateDatasetDataValidity) => IBatchUpdateDatasetDataValidityApi;
|
|
@@ -205,7 +205,7 @@ import { transferResourcePermission } from './permission.ts.js';
|
|
|
205
205
|
* @param data IDatasetDataParam
|
|
206
206
|
* @returns IDatasetDataParamApi
|
|
207
207
|
*/ export const transferDatasetDataParam2DatasetDataParamApi = (data)=>{
|
|
208
|
-
const { datasetId, createdBy, pageSize, ordering, page, sourceTypes, modelType, levels, statuses, reviewStatuses } = data, rest = _object_without_properties(data, [
|
|
208
|
+
const { datasetId, createdBy, pageSize, ordering, page, sourceTypes, modelType, levels, isValid, statuses, reviewStatuses } = data, rest = _object_without_properties(data, [
|
|
209
209
|
"datasetId",
|
|
210
210
|
"createdBy",
|
|
211
211
|
"pageSize",
|
|
@@ -214,6 +214,7 @@ import { transferResourcePermission } from './permission.ts.js';
|
|
|
214
214
|
"sourceTypes",
|
|
215
215
|
"modelType",
|
|
216
216
|
"levels",
|
|
217
|
+
"isValid",
|
|
217
218
|
"statuses",
|
|
218
219
|
"reviewStatuses"
|
|
219
220
|
]);
|
|
@@ -223,6 +224,7 @@ import { transferResourcePermission } from './permission.ts.js';
|
|
|
223
224
|
source_types: sourceTypes,
|
|
224
225
|
model_type: modelType,
|
|
225
226
|
review_statuses: reviewStatuses,
|
|
227
|
+
is_valid: isValid,
|
|
226
228
|
levels,
|
|
227
229
|
statuses,
|
|
228
230
|
page_size: pageSize,
|
|
@@ -263,7 +265,8 @@ import { transferResourcePermission } from './permission.ts.js';
|
|
|
263
265
|
reviewStatusName: data.review_status_name,
|
|
264
266
|
reviewSource: data.review_source,
|
|
265
267
|
reviewReason: data.review_reason,
|
|
266
|
-
reviewLevel: data.review_level
|
|
268
|
+
reviewLevel: data.review_level,
|
|
269
|
+
isValid: data.is_valid
|
|
267
270
|
};
|
|
268
271
|
};
|
|
269
272
|
/**
|
|
@@ -381,3 +384,14 @@ import { transferResourcePermission } from './permission.ts.js';
|
|
|
381
384
|
is_retry_all: d.isRetryAll
|
|
382
385
|
};
|
|
383
386
|
};
|
|
387
|
+
/**
|
|
388
|
+
* ui 转接口
|
|
389
|
+
* @param data IBatchUpdateDatasetDataValidity
|
|
390
|
+
* @returns IBatchUpdateDatasetDataValidityApi
|
|
391
|
+
*/ export const transferBatchUpdateDatasetDataValidity2BatchUpdateDatasetDataValidityApi = (data)=>{
|
|
392
|
+
return {
|
|
393
|
+
dataset_id: data.datasetId,
|
|
394
|
+
dataset_item_ids: data.datasetItemIds,
|
|
395
|
+
is_valid: data.isValid
|
|
396
|
+
};
|
|
397
|
+
};
|
package/dist/transforms.d.ts
CHANGED
package/dist/transforms.ts.js
CHANGED
package/dist/types/agent.d.ts
CHANGED
|
@@ -1,27 +1,35 @@
|
|
|
1
|
+
import { AgentCommandType, ResourceStatus } from './enum';
|
|
1
2
|
import type { ISessionPrompt } from '@/types/session';
|
|
2
3
|
export interface IAgentCommandComponentApi {
|
|
3
|
-
type:
|
|
4
|
+
type: AgentCommandType;
|
|
4
5
|
name: string;
|
|
5
6
|
key: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
multiple?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
default?: string | number | string[] | number[];
|
|
10
|
+
required?: boolean;
|
|
11
|
+
rows?: number;
|
|
12
|
+
min?: number;
|
|
13
|
+
max?: number;
|
|
14
|
+
options?: Array<{
|
|
15
|
+
label: string;
|
|
16
|
+
value: string | number;
|
|
17
|
+
}>;
|
|
15
18
|
}
|
|
16
19
|
export interface IAgentCommandApi {
|
|
17
20
|
id: string;
|
|
18
21
|
name: string;
|
|
19
22
|
icon: string;
|
|
23
|
+
enable_fill_back?: boolean;
|
|
24
|
+
fill_back_component_key?: string;
|
|
25
|
+
fill_regx?: string;
|
|
20
26
|
components: IAgentCommandComponentApi[];
|
|
21
27
|
content: string | null;
|
|
22
28
|
agent_id: number;
|
|
23
|
-
|
|
29
|
+
agent_name: string;
|
|
30
|
+
status?: ResourceStatus;
|
|
24
31
|
selectedText?: string | null;
|
|
32
|
+
alias?: string;
|
|
25
33
|
}
|
|
26
34
|
export interface IAgentInfoApi {
|
|
27
35
|
conversation_settings?: {
|
|
@@ -29,6 +37,7 @@ export interface IAgentInfoApi {
|
|
|
29
37
|
predefined_questions?: string[];
|
|
30
38
|
commands?: IAgentCommandApi[];
|
|
31
39
|
enable_chat_session?: boolean;
|
|
40
|
+
enable_word_selection_popup?: boolean;
|
|
32
41
|
};
|
|
33
42
|
prompt_setting?: {
|
|
34
43
|
content?: ISessionPrompt[];
|
|
@@ -42,30 +51,37 @@ export interface IAgentInfoApi {
|
|
|
42
51
|
saas_url?: string;
|
|
43
52
|
}
|
|
44
53
|
export interface IAgentCommandComponent {
|
|
45
|
-
type: string;
|
|
46
|
-
name: string;
|
|
47
|
-
key: string;
|
|
48
|
-
placeholder?: string | null;
|
|
49
|
-
default?: string | null;
|
|
50
|
-
required?: boolean;
|
|
51
|
-
fillBack?: boolean;
|
|
52
|
-
fillRegx?: string | null;
|
|
53
|
-
rows?: number | null;
|
|
54
|
-
min?: number | null;
|
|
55
|
-
max?: number | null;
|
|
56
|
-
options?: any;
|
|
57
54
|
hide?: boolean;
|
|
58
55
|
selectedText?: string | null;
|
|
59
56
|
showSendButton?: boolean;
|
|
57
|
+
type: AgentCommandType;
|
|
58
|
+
name?: string;
|
|
59
|
+
key: string;
|
|
60
|
+
multiple?: boolean;
|
|
61
|
+
placeholder?: string | null;
|
|
62
|
+
default?: string | number | string[] | number[];
|
|
63
|
+
required?: boolean;
|
|
64
|
+
rows?: number;
|
|
65
|
+
min?: number;
|
|
66
|
+
max?: number;
|
|
67
|
+
options?: Array<{
|
|
68
|
+
label: string;
|
|
69
|
+
value: string | number;
|
|
70
|
+
}>;
|
|
60
71
|
}
|
|
61
72
|
export interface IAgentCommand {
|
|
62
73
|
id: string;
|
|
63
74
|
name: string;
|
|
64
75
|
icon?: string;
|
|
76
|
+
enableFillBack?: boolean;
|
|
77
|
+
fillBackComponentKey?: string;
|
|
78
|
+
fillRegx?: string;
|
|
65
79
|
components: IAgentCommandComponent[];
|
|
66
80
|
content: string | null;
|
|
67
81
|
agentId: number;
|
|
68
|
-
|
|
82
|
+
agentName: string;
|
|
83
|
+
status?: ResourceStatus;
|
|
84
|
+
alias?: string;
|
|
69
85
|
}
|
|
70
86
|
export interface IAgentInfo {
|
|
71
87
|
conversationSettings?: {
|
|
@@ -73,6 +89,7 @@ export interface IAgentInfo {
|
|
|
73
89
|
predefinedQuestions?: string[];
|
|
74
90
|
commands?: IAgentCommand[];
|
|
75
91
|
enableChatSession?: boolean;
|
|
92
|
+
enableWordSelectionPopup?: boolean;
|
|
76
93
|
};
|
|
77
94
|
promptSetting?: {
|
|
78
95
|
content?: ISessionPrompt[];
|
package/dist/types/dataset.d.ts
CHANGED
|
@@ -131,6 +131,7 @@ export interface IDatasetDataApi extends IDatasetDataFormApi {
|
|
|
131
131
|
review_source: string;
|
|
132
132
|
review_reason: string;
|
|
133
133
|
review_level: DatasetDataReviewLevel;
|
|
134
|
+
is_valid: boolean;
|
|
134
135
|
id: number;
|
|
135
136
|
}
|
|
136
137
|
export interface IDatasetData extends IDatasetDataForm {
|
|
@@ -146,6 +147,7 @@ export interface IDatasetData extends IDatasetDataForm {
|
|
|
146
147
|
reviewSource: string;
|
|
147
148
|
reviewReason: string;
|
|
148
149
|
reviewLevel: DatasetDataReviewLevel;
|
|
150
|
+
isValid: boolean;
|
|
149
151
|
id: number;
|
|
150
152
|
}
|
|
151
153
|
export interface IDatasetDataParam extends IPaginationParam, ISortParam {
|
|
@@ -156,6 +158,7 @@ export interface IDatasetDataParam extends IPaginationParam, ISortParam {
|
|
|
156
158
|
sourceTypes?: DatasetDataSourceType[];
|
|
157
159
|
levels?: DatasetDataReviewLevel[];
|
|
158
160
|
statuses?: DatasetDataStatus[];
|
|
161
|
+
isValid?: boolean;
|
|
159
162
|
reviewStatuses?: DatasetDataReviewStatus[];
|
|
160
163
|
}
|
|
161
164
|
export interface IDatasetDataParamApi extends IPaginationParamApi, ISortParamApi {
|
|
@@ -166,6 +169,7 @@ export interface IDatasetDataParamApi extends IPaginationParamApi, ISortParamApi
|
|
|
166
169
|
source_types?: DatasetDataSourceType[];
|
|
167
170
|
levels?: DatasetDataReviewLevel[];
|
|
168
171
|
statuses?: DatasetDataStatus[];
|
|
172
|
+
is_valid?: boolean;
|
|
169
173
|
review_statuses?: DatasetDataReviewStatus[];
|
|
170
174
|
}
|
|
171
175
|
export type IDatasetStatusInfo = Record<DatasetDataReviewLevel & DatasetDataStatus, number>;
|
|
@@ -326,3 +330,13 @@ export interface IBatchRetryReviewDatasetDataApi {
|
|
|
326
330
|
dataset_item_ids?: number[];
|
|
327
331
|
is_retry_all?: boolean;
|
|
328
332
|
}
|
|
333
|
+
export interface IBatchUpdateDatasetDataValidity {
|
|
334
|
+
datasetId: number;
|
|
335
|
+
datasetItemIds: number[];
|
|
336
|
+
isValid: boolean;
|
|
337
|
+
}
|
|
338
|
+
export interface IBatchUpdateDatasetDataValidityApi {
|
|
339
|
+
dataset_id: number;
|
|
340
|
+
dataset_item_ids: number[];
|
|
341
|
+
is_valid: boolean;
|
|
342
|
+
}
|
package/dist/types/enum.d.ts
CHANGED
|
@@ -151,7 +151,8 @@ export declare enum Module {
|
|
|
151
151
|
Default = "default",
|
|
152
152
|
PromptVariables = "prompt_variables",
|
|
153
153
|
Dataset = "dataset",
|
|
154
|
-
Meta = "meta"
|
|
154
|
+
Meta = "meta",
|
|
155
|
+
Cr = "cr"
|
|
155
156
|
}
|
|
156
157
|
export declare enum ResourcePermissionAction {
|
|
157
158
|
AccessModel = "access_model",
|
|
@@ -244,3 +245,9 @@ export declare enum OrderMethod {
|
|
|
244
245
|
Asc = "asc",
|
|
245
246
|
Desc = "desc"
|
|
246
247
|
}
|
|
248
|
+
export declare enum AgentCommandType {
|
|
249
|
+
Text = "text",
|
|
250
|
+
Textarea = "textarea",
|
|
251
|
+
Number = "number",
|
|
252
|
+
Select = "select"
|
|
253
|
+
}
|
package/dist/types/enum.ts.js
CHANGED
|
@@ -172,6 +172,7 @@ export var Module;
|
|
|
172
172
|
Module["PromptVariables"] = "prompt_variables";
|
|
173
173
|
Module["Dataset"] = "dataset";
|
|
174
174
|
Module["Meta"] = "meta";
|
|
175
|
+
Module["Cr"] = "cr";
|
|
175
176
|
})(Module || (Module = {}));
|
|
176
177
|
export var ResourcePermissionAction;
|
|
177
178
|
(function(ResourcePermissionAction) {
|
|
@@ -274,3 +275,10 @@ export var OrderMethod;
|
|
|
274
275
|
OrderMethod["Asc"] = "asc";
|
|
275
276
|
OrderMethod["Desc"] = "desc";
|
|
276
277
|
})(OrderMethod || (OrderMethod = {}));
|
|
278
|
+
export var AgentCommandType;
|
|
279
|
+
(function(AgentCommandType) {
|
|
280
|
+
AgentCommandType["Text"] = "text";
|
|
281
|
+
AgentCommandType["Textarea"] = "textarea";
|
|
282
|
+
AgentCommandType["Number"] = "number";
|
|
283
|
+
AgentCommandType["Select"] = "select";
|
|
284
|
+
})(AgentCommandType || (AgentCommandType = {}));
|