@blueking/ai-ui-sdk 0.4.1-beta.1 → 0.4.1-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-agent/agent-search.script.vue.js.js +1 -1
- package/dist/components/render-agent/agent-type.vue.css +3 -3
- package/dist/components/render-agent/agent-type.vue.js +1 -1
- package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
- package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
- package/dist/components/render-auto-refresh/index.vue.css +8 -8
- package/dist/components/render-auto-refresh/index.vue.js +1 -1
- package/dist/components/render-card/agent/prefix-info-tool.vue.css +5 -5
- package/dist/components/render-card/agent/prefix-info-tool.vue.js +1 -1
- package/dist/components/render-card/base/approval-strategy-popover.script.vue.js.js +7 -7
- package/dist/components/render-card/base.script.vue.js +8 -7
- 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/knowledgebase/actions.script.vue.js.js +5 -41
- package/dist/components/render-card/knowledgebase/actions.vue.d.ts +2 -3
- package/dist/components/render-card/knowledgebase/index.script.vue.js.js +14 -4
- package/dist/components/render-card/knowledgebase/index.vue.d.ts +3 -1
- package/dist/components/render-card/llm/corner-badge.vue.css +3 -3
- package/dist/components/render-card/llm/corner-badge.vue.js +1 -1
- package/dist/components/render-card/llm/icons.vue.css +2 -2
- package/dist/components/render-card/llm/icons.vue.js +1 -1
- package/dist/components/render-card/llm/info.vue.css +1 -1
- package/dist/components/render-card/llm/info.vue.js +1 -1
- package/dist/components/render-card/llm/tag-prefix.vue.css +3 -3
- package/dist/components/render-card/llm/tag-prefix.vue.js +1 -1
- package/dist/components/render-card/mcp/name-suffix.vue.css +2 -2
- package/dist/components/render-card/mcp/name-suffix.vue.js +1 -1
- package/dist/components/render-card/prompt/icons.vue.css +1 -1
- package/dist/components/render-card/prompt/icons.vue.js +1 -1
- package/dist/components/render-card/prompt/index.script.vue.js.js +4 -4
- package/dist/components/render-card/role/index.script.vue.js.js +15 -14
- package/dist/components/render-card/role/index.vue.d.ts +1 -0
- package/dist/components/render-card/skill/tag-prefix.vue.css +3 -3
- package/dist/components/render-card/skill/tag-prefix.vue.js +1 -1
- package/dist/components/render-card/tool/actions.script.vue.js.js +26 -42
- package/dist/components/render-card/tool/index.script.vue.js.js +13 -13
- package/dist/components/render-card/tool/index.vue.d.ts +2 -2
- package/dist/components/render-card/tool/prefix-info-tool.script.vue.js.js +1 -1
- package/dist/components/render-checkbox/index.vue.css +9 -9
- package/dist/components/render-checkbox/index.vue.js +1 -1
- package/dist/components/render-choose-tag/index.vue.css +7 -7
- package/dist/components/render-choose-tag/index.vue.js +1 -1
- package/dist/components/render-collapse/index.vue.css +2 -2
- package/dist/components/render-collapse/index.vue.js +1 -1
- package/dist/components/render-collection/actions/index.script.vue.js.js +59 -128
- package/dist/components/render-collection/actions/index.vue.d.ts +1 -3
- package/dist/components/render-collection/content/index.script.vue.js +2 -2
- package/dist/components/render-collection/content/index.vue.css +4 -4
- package/dist/components/render-collection/content/index.vue.js +1 -1
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +3 -3
- package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.css +1 -1
- package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
- package/dist/components/render-dataset/components/dataset-data-valid/index.vue.css +1 -1
- package/dist/components/render-dataset/components/dataset-data-valid/index.vue.js +1 -1
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
- package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
- package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
- package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
- package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset/index.vue.css +1 -1
- package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
- package/dist/components/render-dataset/components/plus-dataset-data/form/api.script.vue.js.js +6 -6
- 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/components/header.script.vue.js.js +3 -3
- 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.script.vue.js +3 -2
- package/dist/components/render-dialog/choose-resource.vue.css +3 -3
- package/dist/components/render-dialog/choose-resource.vue.js +1 -1
- package/dist/components/render-dialog/choose-result.vue.css +14 -14
- package/dist/components/render-dialog/choose-result.vue.js +1 -1
- package/dist/components/render-dialog/choose-space.vue.css +9 -9
- package/dist/components/render-dialog/choose-space.vue.js +1 -1
- package/dist/components/render-dialog/index.vue.css +6 -6
- package/dist/components/render-dialog/index.vue.js +1 -1
- package/dist/components/render-file-card/index.vue.css +11 -11
- package/dist/components/render-file-card/index.vue.js +1 -1
- package/dist/components/render-file-type-icon/index.vue.css +6 -6
- package/dist/components/render-file-type-icon/index.vue.js +1 -1
- package/dist/components/render-generate-tag/index.vue.css +5 -5
- package/dist/components/render-generate-tag/index.vue.js +1 -1
- package/dist/components/render-header/index.script.vue.js.js +68 -45
- package/dist/components/render-header/index.vue.d.ts +5 -1
- package/dist/components/render-header/index.vue.js +0 -2
- 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-knowledge/search/index.script.vue.js.js +36 -27
- package/dist/components/render-knowledge/search/index.vue.d.ts +1 -0
- package/dist/components/render-prompt/actions/index.script.vue.js.js +56 -114
- package/dist/components/render-prompt/actions/index.vue.d.ts +0 -1
- package/dist/components/render-prompt/content/index.vue.css +1 -1
- package/dist/components/render-prompt/content/index.vue.js +1 -1
- package/dist/components/render-reference/index.vue.css +2 -2
- package/dist/components/render-reference/index.vue.js +1 -1
- package/dist/components/render-relate-agent/index.script.vue.js +46 -21
- package/dist/components/render-relate-agent/index.vue.d.ts +3 -1
- package/dist/components/render-resource-version/index.vue.css +2 -2
- package/dist/components/render-resource-version/index.vue.js +1 -1
- package/dist/components/render-router-tab/index.script.vue.js.js +2 -2
- 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-select/index.script.vue.js.js +7 -7
- package/dist/components/render-search-select/index.vue.d.ts +1 -1
- package/dist/components/render-select-plus-extension/index.vue.css +3 -3
- package/dist/components/render-select-plus-extension/index.vue.js +1 -1
- package/dist/components/render-skill/actions/index.script.vue.js.js +9 -12
- package/dist/components/render-skill/actions/index.vue.d.ts +0 -1
- package/dist/components/render-skill/install/index.script.vue.js.js +22 -16
- package/dist/components/render-t-table/index.vue.css +27 -27
- package/dist/components/render-t-table/index.vue.js +1 -1
- package/dist/components/render-tag-tree/index.vue.css +7 -7
- package/dist/components/render-tag-tree/index.vue.js +1 -1
- package/dist/components/render-tags/index.vue.css +6 -6
- package/dist/components/render-tags/index.vue.js +1 -1
- package/dist/components/render-tree/index.script.vue.js +3 -3
- package/dist/components.d.ts +1 -2
- package/dist/components.ts.js +1 -2
- package/dist/css/g-utilities.css +66 -37
- package/dist/css/g-utilities.manifest.json +12 -7
- package/dist/hooks/use-scroll-load.d.ts +1 -0
- package/dist/hooks/use-scroll-load.ts.js +2 -1
- package/dist/hooks/use-skill-http.d.ts +2 -2
- package/dist/hooks/use-skill-http.ts.js +2 -2
- package/dist/hooks/use-style.ts.js +2 -9
- package/dist/hooks.d.ts +0 -4
- package/dist/hooks.ts.js +0 -4
- package/dist/http/helper/agent.d.ts +1 -7
- package/dist/http/helper/agent.ts.js +2 -28
- package/dist/http/helper/knowledge.d.ts +10 -1
- package/dist/http/helper/knowledge.ts.js +82 -21
- package/dist/http/helper/permission.ts.js +4 -2
- package/dist/http/helper/skill.d.ts +2 -1
- package/dist/http/helper/skill.ts.js +8 -0
- package/dist/https.d.ts +0 -1
- package/dist/https.ts.js +0 -1
- package/dist/transforms.d.ts +0 -1
- package/dist/transforms.ts.js +0 -1
- package/dist/types/agent.d.ts +5 -44
- package/dist/types/enum.d.ts +15 -2
- package/dist/types/enum.ts.js +15 -1
- package/dist/types/knowledge.d.ts +113 -12
- package/dist/types/permission.d.ts +2 -0
- package/dist/types/skill.d.ts +8 -2
- package/dist/types.d.ts +0 -1
- package/dist/types.ts.js +0 -1
- package/package.json +2 -8
- package/dist/common/chart-helper.d.ts +0 -39
- package/dist/common/chart-helper.ts.js +0 -196
- package/dist/components/render-header/index.vue.css +0 -13
- package/dist/components/render-like/index.script.vue.js.js +0 -312
- package/dist/components/render-like/index.vue.css +0 -20
- package/dist/components/render-like/index.vue.d.ts +0 -31
- package/dist/components/render-like/index.vue.js +0 -5
- package/dist/helpers.d.ts +0 -1
- package/dist/helpers.ts.js +0 -1
- package/dist/hooks/use-chat.d.ts +0 -1083
- package/dist/hooks/use-chat.ts.js +0 -678
- package/dist/hooks/use-reference-doc.d.ts +0 -14
- package/dist/hooks/use-reference-doc.ts.js +0 -176
- package/dist/hooks/use-session-http.d.ts +0 -38
- package/dist/hooks/use-session-http.ts.js +0 -159
- package/dist/hooks/use-summary.d.ts +0 -9
- package/dist/hooks/use-summary.ts.js +0 -55
- package/dist/hooks/use-think.d.ts +0 -21
- package/dist/hooks/use-think.ts.js +0 -136
- package/dist/http/helper/session.d.ts +0 -65
- package/dist/http/helper/session.ts.js +0 -267
- package/dist/types/session.d.ts +0 -199
- package/dist/types/session.ts.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IKnowledge, IKnowledgeApi, IKnowledgebase, IKnowledgebaseApi, IKnowledgebaseCountParam, IKnowledgebaseCountParamApi, IKnowledgebaseListParam, IKnowledgeCountParam, IKnowledgeCountParamApi, IKnowledgeListParam, IKnowledgeQuerySetting, IKnowledgeQuerySettingApi } from '@/types/knowledge';
|
|
1
|
+
import type { IIngestionStageSnapshot, IIngestionStageSnapshotApi, IKnowledge, IKnowledgeApi, IKnowledgebase, IKnowledgebaseApi, IKnowledgebaseCountParam, IKnowledgebaseCountParamApi, IKnowledgebaseListParam, IKnowledgeCountParam, IKnowledgeCountParamApi, IKnowledgeListParam, IKnowledgePipeline, IKnowledgePipelineApi, IKnowledgeQuerySetting, IKnowledgeQuerySettingApi, IPipelineVersionDiff, IPipelineVersionDiffApi, IPipelineVersionHandleType, IPipelineVersionHandleTypeApi } from '@/types/knowledge';
|
|
2
2
|
/**
|
|
3
3
|
* 从路径中获取文件信息
|
|
4
4
|
* @param path 路径
|
|
@@ -14,6 +14,9 @@ export declare const getFileInfoFromPath: (path: string) => {
|
|
|
14
14
|
* @returns IKnowledgeApi
|
|
15
15
|
*/
|
|
16
16
|
export declare const transferKnowledge: (data: IKnowledge) => IKnowledgeApi;
|
|
17
|
+
export declare const transferIngestionStageSnapshotApi2IngestionStageSnapshot: (data: IIngestionStageSnapshotApi) => IIngestionStageSnapshot;
|
|
18
|
+
export declare const transferPipelineVersionHandleTypeApi2PipelineVersionHandleType: (data?: IPipelineVersionHandleTypeApi | null) => IPipelineVersionHandleType | undefined;
|
|
19
|
+
export declare const transferPipelineVersionDiffApi2PipelineVersionDiff: (data?: IPipelineVersionDiffApi) => IPipelineVersionDiff | undefined;
|
|
17
20
|
/**
|
|
18
21
|
* 接口转换为ui使用
|
|
19
22
|
* @param data IKnowledgeApi
|
|
@@ -41,6 +44,12 @@ export declare const transferKnowledgebase2KnowledgeApi: (data: IKnowledgebase)
|
|
|
41
44
|
* @returns IKnowledgebase
|
|
42
45
|
*/
|
|
43
46
|
export declare const transferKnowledgebaseApi: (data: IKnowledgebaseApi) => IKnowledgebase;
|
|
47
|
+
/**
|
|
48
|
+
* 接口转换为ui使用
|
|
49
|
+
* @param data IKnowledgePipelineApi
|
|
50
|
+
* @returns IKnowledgePipeline
|
|
51
|
+
*/
|
|
52
|
+
export declare const transferKnowledgePipelineApi2KnowledgePipeline: (data: IKnowledgePipelineApi) => IKnowledgePipeline;
|
|
44
53
|
/**
|
|
45
54
|
* 接口转换为ui
|
|
46
55
|
* @param data IKnowledgeQuerySetting
|
|
@@ -80,7 +80,6 @@ import { transferResourcePermissionApi2ResourcePermission } from './permission.t
|
|
|
80
80
|
tag_names: data.tagNames,
|
|
81
81
|
config: {
|
|
82
82
|
splitter: data.splitter,
|
|
83
|
-
handle_type: data.handleType,
|
|
84
83
|
update_frequency: data.updateFrequency,
|
|
85
84
|
headers: data.headers,
|
|
86
85
|
csv_delimiter: data.csvDelimiter
|
|
@@ -102,12 +101,62 @@ import { transferResourcePermissionApi2ResourcePermission } from './permission.t
|
|
|
102
101
|
approvers: data.approvers,
|
|
103
102
|
ticket_url: data.ticketUrl
|
|
104
103
|
});
|
|
104
|
+
const transferIngestionVectorChildStageApi2IngestionVectorChildStage = (data)=>({
|
|
105
|
+
stage: data.stage,
|
|
106
|
+
stageLabel: data.stage_label,
|
|
107
|
+
status: data.status,
|
|
108
|
+
statusLabel: data.status_label,
|
|
109
|
+
startedAt: data.started_at,
|
|
110
|
+
documentTotal: data.document_total,
|
|
111
|
+
completedCount: data.completed_count,
|
|
112
|
+
durationMs: data.duration_ms,
|
|
113
|
+
errorMessage: data.error_message
|
|
114
|
+
});
|
|
115
|
+
export const transferIngestionStageSnapshotApi2IngestionStageSnapshot = (data)=>{
|
|
116
|
+
var _data_output_summary_stages;
|
|
117
|
+
return {
|
|
118
|
+
stage: data.stage,
|
|
119
|
+
stageLabel: data.stage_label,
|
|
120
|
+
status: data.status,
|
|
121
|
+
statusLabel: data.status_label,
|
|
122
|
+
startedAt: data.started_at,
|
|
123
|
+
durationMs: data.duration_ms,
|
|
124
|
+
inputSummary: data.input_summary,
|
|
125
|
+
outputSummary: data.output_summary ? {
|
|
126
|
+
documentTotal: data.output_summary.document_total,
|
|
127
|
+
completedCount: data.output_summary.completed_count,
|
|
128
|
+
stages: (_data_output_summary_stages = data.output_summary.stages) === null || _data_output_summary_stages === void 0 ? void 0 : _data_output_summary_stages.map(transferIngestionVectorChildStageApi2IngestionVectorChildStage)
|
|
129
|
+
} : undefined,
|
|
130
|
+
strategySummary: data.strategy_summary,
|
|
131
|
+
errorMessage: data.error_message
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
export const transferPipelineVersionHandleTypeApi2PipelineVersionHandleType = (data)=>{
|
|
135
|
+
if (!(data === null || data === void 0 ? void 0 : data.pipeline_code)) return undefined;
|
|
136
|
+
return {
|
|
137
|
+
id: data.id,
|
|
138
|
+
pipelineCode: data.pipeline_code,
|
|
139
|
+
versionCode: data.version_code,
|
|
140
|
+
isDefault: data.is_default
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
export const transferPipelineVersionDiffApi2PipelineVersionDiff = (data)=>{
|
|
144
|
+
if (!data) return undefined;
|
|
145
|
+
var _transferPipelineVersionHandleTypeApi2PipelineVersionHandleType, _transferPipelineVersionHandleTypeApi2PipelineVersionHandleType1;
|
|
146
|
+
return {
|
|
147
|
+
status: data.status,
|
|
148
|
+
shouldReclean: data.should_reclean,
|
|
149
|
+
outdatedNodes: data.outdated_nodes,
|
|
150
|
+
current: (_transferPipelineVersionHandleTypeApi2PipelineVersionHandleType = transferPipelineVersionHandleTypeApi2PipelineVersionHandleType(data.current)) !== null && _transferPipelineVersionHandleTypeApi2PipelineVersionHandleType !== void 0 ? _transferPipelineVersionHandleTypeApi2PipelineVersionHandleType : null,
|
|
151
|
+
target: (_transferPipelineVersionHandleTypeApi2PipelineVersionHandleType1 = transferPipelineVersionHandleTypeApi2PipelineVersionHandleType(data.target)) !== null && _transferPipelineVersionHandleTypeApi2PipelineVersionHandleType1 !== void 0 ? _transferPipelineVersionHandleTypeApi2PipelineVersionHandleType1 : null
|
|
152
|
+
};
|
|
153
|
+
};
|
|
105
154
|
/**
|
|
106
155
|
* 接口转换为ui使用
|
|
107
156
|
* @param data IKnowledgeApi
|
|
108
157
|
* @returns IKnowledge
|
|
109
158
|
*/ export const transferKnowledgeApi = (data)=>{
|
|
110
|
-
var _data_config, _data_config1, _data_config2, _data_config3,
|
|
159
|
+
var _data_config, _data_config1, _data_config2, _data_config3, _data_ingestion_stage_snapshots;
|
|
111
160
|
const { fileName = data.file_path, filePath = '' } = getFileInfoFromPath(data.file_path);
|
|
112
161
|
// 返回前端使用的数据
|
|
113
162
|
return {
|
|
@@ -117,11 +166,10 @@ import { transferResourcePermissionApi2ResourcePermission } from './permission.t
|
|
|
117
166
|
url: data.url,
|
|
118
167
|
content: data.content,
|
|
119
168
|
tagNames: data.tag_names,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
csvDelimiter: (_data_config4 = data.config) === null || _data_config4 === void 0 ? void 0 : _data_config4.csv_delimiter,
|
|
169
|
+
splitter: (_data_config = data.config) === null || _data_config === void 0 ? void 0 : _data_config.splitter,
|
|
170
|
+
updateFrequency: (_data_config1 = data.config) === null || _data_config1 === void 0 ? void 0 : _data_config1.update_frequency,
|
|
171
|
+
headers: (_data_config2 = data.config) === null || _data_config2 === void 0 ? void 0 : _data_config2.headers,
|
|
172
|
+
csvDelimiter: (_data_config3 = data.config) === null || _data_config3 === void 0 ? void 0 : _data_config3.csv_delimiter,
|
|
125
173
|
fileName,
|
|
126
174
|
filePath,
|
|
127
175
|
fileSize: data.file_size,
|
|
@@ -141,13 +189,15 @@ import { transferResourcePermissionApi2ResourcePermission } from './permission.t
|
|
|
141
189
|
indexConfig: data.index_config,
|
|
142
190
|
credentialId: data.credential_id,
|
|
143
191
|
approvers: data.approvers,
|
|
144
|
-
ticketUrl: data.ticket_url
|
|
192
|
+
ticketUrl: data.ticket_url,
|
|
193
|
+
ingestionStageSnapshots: (_data_ingestion_stage_snapshots = data.ingestion_stage_snapshots) === null || _data_ingestion_stage_snapshots === void 0 ? void 0 : _data_ingestion_stage_snapshots.map(transferIngestionStageSnapshotApi2IngestionStageSnapshot),
|
|
194
|
+
pipelineVersionDiff: transferPipelineVersionDiffApi2PipelineVersionDiff(data.pipeline_version_diff)
|
|
145
195
|
};
|
|
146
196
|
};
|
|
147
197
|
/**
|
|
148
198
|
* 接口文件夹转换为knowledgbase
|
|
149
199
|
*/ export const transferKnowledgeApi2Knowledgebase = (knowledge, knowledgebase)=>{
|
|
150
|
-
var _knowledge_config,
|
|
200
|
+
var _knowledge_config, _knowledge_children;
|
|
151
201
|
const { fileName = knowledge.file_path, filePath = '' } = getFileInfoFromPath(knowledge.file_path);
|
|
152
202
|
const data = {
|
|
153
203
|
id: knowledge.id,
|
|
@@ -155,8 +205,7 @@ import { transferResourcePermissionApi2ResourcePermission } from './permission.t
|
|
|
155
205
|
knowledgebaseCode: '',
|
|
156
206
|
fileName,
|
|
157
207
|
filePath,
|
|
158
|
-
|
|
159
|
-
updateFrequency: (_knowledge_config1 = knowledge.config) === null || _knowledge_config1 === void 0 ? void 0 : _knowledge_config1.update_frequency,
|
|
208
|
+
updateFrequency: (_knowledge_config = knowledge.config) === null || _knowledge_config === void 0 ? void 0 : _knowledge_config.update_frequency,
|
|
160
209
|
name: knowledge.knowledge_name,
|
|
161
210
|
number: knowledge.knowledge_count,
|
|
162
211
|
folderNumber: knowledge.folder_num,
|
|
@@ -180,9 +229,7 @@ import { transferResourcePermissionApi2ResourcePermission } from './permission.t
|
|
|
180
229
|
* @param data IKnowledgebase
|
|
181
230
|
* @returns IKnowledgebaseApi
|
|
182
231
|
*/ export const transferKnowledgebase = (data)=>({
|
|
183
|
-
|
|
184
|
-
handle_type: data.handleType
|
|
185
|
-
},
|
|
232
|
+
pipeline_codes: data.pipelineCodes,
|
|
186
233
|
id: data.id,
|
|
187
234
|
name: data.name,
|
|
188
235
|
type: data.type,
|
|
@@ -203,7 +250,6 @@ import { transferResourcePermissionApi2ResourcePermission } from './permission.t
|
|
|
203
250
|
id: data.id,
|
|
204
251
|
config: {
|
|
205
252
|
splitter: '',
|
|
206
|
-
handle_type: data.handleType,
|
|
207
253
|
update_frequency: data.updateFrequency
|
|
208
254
|
},
|
|
209
255
|
created_type: data.createdType,
|
|
@@ -218,12 +264,12 @@ import { transferResourcePermissionApi2ResourcePermission } from './permission.t
|
|
|
218
264
|
* @param data IKnowledgebaseApi
|
|
219
265
|
* @returns IKnowledgebase
|
|
220
266
|
*/ export const transferKnowledgebaseApi = (data)=>{
|
|
221
|
-
var
|
|
267
|
+
var _data_children;
|
|
222
268
|
const knowledgebase = {
|
|
223
269
|
id: data.id,
|
|
224
270
|
spaceId: data.space_id,
|
|
225
271
|
filePath: '',
|
|
226
|
-
|
|
272
|
+
pipelineCodes: data.pipeline_codes,
|
|
227
273
|
name: data.name,
|
|
228
274
|
type: data.type,
|
|
229
275
|
knowledgebaseCode: data.knowledgebase_code,
|
|
@@ -245,14 +291,29 @@ import { transferResourcePermissionApi2ResourcePermission } from './permission.t
|
|
|
245
291
|
children: (_data_children = data.children) === null || _data_children === void 0 ? void 0 : _data_children.map((child)=>transferKnowledgeApi2Knowledgebase(child, knowledgebase))
|
|
246
292
|
});
|
|
247
293
|
};
|
|
294
|
+
/**
|
|
295
|
+
* 接口转换为ui使用
|
|
296
|
+
* @param data IKnowledgePipelineApi
|
|
297
|
+
* @returns IKnowledgePipeline
|
|
298
|
+
*/ export const transferKnowledgePipelineApi2KnowledgePipeline = (data)=>{
|
|
299
|
+
var _data_pipelines;
|
|
300
|
+
return {
|
|
301
|
+
code: data.code,
|
|
302
|
+
displayName: data.display_name,
|
|
303
|
+
description: data.description,
|
|
304
|
+
isDefault: data.is_default,
|
|
305
|
+
supportedFileSuffixes: data.supported_file_suffixes,
|
|
306
|
+
pipelines: (_data_pipelines = data.pipelines) === null || _data_pipelines === void 0 ? void 0 : _data_pipelines.map(transferKnowledgePipelineApi2KnowledgePipeline)
|
|
307
|
+
};
|
|
308
|
+
};
|
|
248
309
|
/**
|
|
249
310
|
* 接口转换为ui
|
|
250
311
|
* @param data IKnowledgeQuerySetting
|
|
251
312
|
* @returns IKnowledgeQuerySettingApi
|
|
252
313
|
*/ export const transferKnowledgeQuerySetting = (data)=>({
|
|
253
|
-
|
|
254
|
-
query_function: data.queryFunction,
|
|
314
|
+
recall_channels: data.recallChannels,
|
|
255
315
|
document_fragment_count: data.documentFragmentCount,
|
|
316
|
+
rrf_weights: data.rrfWeights,
|
|
256
317
|
knowledge_resource_fine_grained_score_type: data.knowledgeResourceFineGrainedScoreType,
|
|
257
318
|
knowledge_resource_reject_threshold: data.knowledgeResourceRejectThreshold,
|
|
258
319
|
independent_query_mode: data.independentQueryMode,
|
|
@@ -268,9 +329,9 @@ import { transferResourcePermissionApi2ResourcePermission } from './permission.t
|
|
|
268
329
|
* @param data IKnowledgeQuerySettingApi
|
|
269
330
|
* @returns IKnowledgeQuerySetting
|
|
270
331
|
*/ export const transferKnowledgeQuerySettingApi = (data)=>({
|
|
271
|
-
|
|
272
|
-
queryFunction: data.query_function,
|
|
332
|
+
recallChannels: data.recall_channels,
|
|
273
333
|
documentFragmentCount: data.document_fragment_count,
|
|
334
|
+
rrfWeights: data.rrf_weights,
|
|
274
335
|
knowledgeResourceFineGrainedScoreType: data.knowledge_resource_fine_grained_score_type,
|
|
275
336
|
knowledgeResourceRejectThreshold: data.knowledge_resource_reject_threshold,
|
|
276
337
|
independentQueryMode: data.independent_query_mode,
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
createMcp: data.create_mcp,
|
|
39
39
|
manageMcp: data.manage_mcp,
|
|
40
40
|
viewMcp: data.view_mcp,
|
|
41
|
-
useMcp: data.use_mcp
|
|
41
|
+
useMcp: data.use_mcp,
|
|
42
|
+
manageProject: data.manage_project
|
|
42
43
|
} : undefined;
|
|
43
44
|
/**
|
|
44
45
|
* ui转换为接口使用
|
|
@@ -80,7 +81,8 @@
|
|
|
80
81
|
create_mcp: data.createMcp,
|
|
81
82
|
manage_mcp: data.manageMcp,
|
|
82
83
|
view_mcp: data.viewMcp,
|
|
83
|
-
use_mcp: data.useMcp
|
|
84
|
+
use_mcp: data.useMcp,
|
|
85
|
+
manage_project: data.manageProject
|
|
84
86
|
} : undefined;
|
|
85
87
|
/**
|
|
86
88
|
* 接口转换为ui
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ISkill, ISkillApi, ISkillBuildLog, ISkillBuildLogApi, ISkillCountParam, ISkillCountParamApi, ISkillForm, ISkillFormApi, ISkillInstallGuide, ISkillInstallGuideApi, ISkillInstallTarget, ISkillInstallTargetApi, ISkillListParam, ISkillListParamApi, ISkillOpenclawWindowsInstallParam, ISkillOpenclawWindowsInstallParamApi, ISkillOpenclawWindowsInstallTasks, ISkillOpenclawWindowsInstallTasksApi, ISkillOpenclawWindowsInstallTaskStatusParam, ISkillOpenclawWindowsInstallTaskStatusParamApi, ISkillOpenclawWindowsInstance, ISkillOpenclawWindowsInstanceApi, ISkillOpenclawWindowsInstanceStatusMap, ISkillOpenclawWindowsInstanceStatusMapApi, ISkillOpenclawWindowsInstanceStatusParam, ISkillOpenclawWindowsInstanceStatusParamApi } from '@/types/skill';
|
|
1
|
+
import type { ISkill, ISkillApi, ISkillBuildLog, ISkillBuildLogApi, ISkillCountParam, ISkillCountParamApi, ISkillForm, ISkillFormApi, ISkillInstallGuide, ISkillInstallGuideApi, ISkillInstallTarget, ISkillInstallTargetApi, ISkillListParam, ISkillListParamApi, ISkillOpenclawWindowsInstallParam, ISkillOpenclawWindowsInstallParamApi, ISkillOpenclawWindowsInstallTasks, ISkillOpenclawWindowsInstallTasksApi, ISkillOpenclawWindowsInstallTaskStatusMap, ISkillOpenclawWindowsInstallTaskStatusMapApi, ISkillOpenclawWindowsInstallTaskStatusParam, ISkillOpenclawWindowsInstallTaskStatusParamApi, ISkillOpenclawWindowsInstance, ISkillOpenclawWindowsInstanceApi, ISkillOpenclawWindowsInstanceStatusMap, ISkillOpenclawWindowsInstanceStatusMapApi, ISkillOpenclawWindowsInstanceStatusParam, ISkillOpenclawWindowsInstanceStatusParamApi } from '@/types/skill';
|
|
2
2
|
/**
|
|
3
3
|
* ui转换为接口使用(表单字段)
|
|
4
4
|
* @param data ISkillForm
|
|
@@ -43,5 +43,6 @@ export declare const transferSkillOpenclawWindowsInstance2SkillOpenclawWindowsIn
|
|
|
43
43
|
export declare const transferSkillOpenclawWindowsInstallParam2SkillOpenclawWindowsInstallParamApi: (data: ISkillOpenclawWindowsInstallParam) => ISkillOpenclawWindowsInstallParamApi;
|
|
44
44
|
export declare const transferSkillOpenclawWindowsInstallTasksApi2SkillOpenclawWindowsInstallTasks: (data: ISkillOpenclawWindowsInstallTasksApi) => ISkillOpenclawWindowsInstallTasks;
|
|
45
45
|
export declare const transferSkillOpenclawWindowsInstallTaskStatusParam2SkillOpenclawWindowsInstallTaskStatusParamApi: (data: ISkillOpenclawWindowsInstallTaskStatusParam) => ISkillOpenclawWindowsInstallTaskStatusParamApi;
|
|
46
|
+
export declare const transferSkillOpenclawWindowsInstallTaskStatusMapApi2SkillOpenclawWindowsInstallTaskStatusMap: (data: ISkillOpenclawWindowsInstallTaskStatusMapApi) => ISkillOpenclawWindowsInstallTaskStatusMap;
|
|
46
47
|
export declare const transferSkillOpenclawWindowsInstanceStatusParam2SkillOpenclawWindowsInstanceStatusParamApi: (data: ISkillOpenclawWindowsInstanceStatusParam) => ISkillOpenclawWindowsInstanceStatusParamApi;
|
|
47
48
|
export declare const transferSkillOpenclawWindowsInstanceStatusMapApi2SkillOpenclawWindowsInstanceStatusMap: (data: ISkillOpenclawWindowsInstanceStatusMapApi) => ISkillOpenclawWindowsInstanceStatusMap;
|
|
@@ -195,6 +195,14 @@ export const transferSkillOpenclawWindowsInstallTasksApi2SkillOpenclawWindowsIns
|
|
|
195
195
|
export const transferSkillOpenclawWindowsInstallTaskStatusParam2SkillOpenclawWindowsInstallTaskStatusParamApi = (data)=>({
|
|
196
196
|
task_ids: data.taskIds
|
|
197
197
|
});
|
|
198
|
+
export const transferSkillOpenclawWindowsInstallTaskStatusMapApi2SkillOpenclawWindowsInstallTaskStatusMap = (data)=>{
|
|
199
|
+
return Object.entries(data).reduce((result, [taskId, task])=>_object_spread_props(_object_spread({}, result), {
|
|
200
|
+
[taskId]: {
|
|
201
|
+
status: task.status,
|
|
202
|
+
failMsg: task.fail_msg
|
|
203
|
+
}
|
|
204
|
+
}), {});
|
|
205
|
+
};
|
|
198
206
|
export const transferSkillOpenclawWindowsInstanceStatusParam2SkillOpenclawWindowsInstanceStatusParamApi = (data)=>({
|
|
199
207
|
skill_id: data.skillId,
|
|
200
208
|
workspaces: data.workspaces.map(transferSkillOpenclawWindowsInstance2SkillOpenclawWindowsInstanceApi)
|
package/dist/https.d.ts
CHANGED
package/dist/https.ts.js
CHANGED
package/dist/transforms.d.ts
CHANGED
package/dist/transforms.ts.js
CHANGED
package/dist/types/agent.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
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, ResourceStatus, UserScope } from './enum';
|
|
2
|
+
import { AgentCommandType, AgentDeployMode, AgentType, EnumCharacter, 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';
|
|
6
6
|
import type { ITool, IToolApi } from './tool';
|
|
7
|
-
import type { ISessionPrompt } from '@/types/session';
|
|
8
7
|
export interface IAgentCommandComponentApi {
|
|
9
8
|
type: AgentCommandType;
|
|
10
9
|
name: string;
|
|
@@ -42,25 +41,6 @@ export interface IAgentCommandApi {
|
|
|
42
41
|
updated_at?: string;
|
|
43
42
|
updated_by?: string;
|
|
44
43
|
}
|
|
45
|
-
export interface IAgentInfoApi {
|
|
46
|
-
conversation_settings?: {
|
|
47
|
-
opening_remark?: string;
|
|
48
|
-
predefined_questions?: string[];
|
|
49
|
-
commands?: IAgentCommandApi[];
|
|
50
|
-
enable_chat_session?: boolean;
|
|
51
|
-
enable_word_selection_popup?: boolean;
|
|
52
|
-
};
|
|
53
|
-
prompt_setting?: {
|
|
54
|
-
content?: ISessionPrompt[];
|
|
55
|
-
};
|
|
56
|
-
agent_name: string;
|
|
57
|
-
chat_group?: {
|
|
58
|
-
enabled: boolean;
|
|
59
|
-
staff: string[];
|
|
60
|
-
username: string;
|
|
61
|
-
};
|
|
62
|
-
saas_url?: string;
|
|
63
|
-
}
|
|
64
44
|
export interface IAgentCommandComponent {
|
|
65
45
|
hide?: boolean;
|
|
66
46
|
selectedText?: string | null;
|
|
@@ -99,25 +79,6 @@ export interface IAgentCommand {
|
|
|
99
79
|
updatedAt?: string;
|
|
100
80
|
updatedBy?: string;
|
|
101
81
|
}
|
|
102
|
-
export interface IAgentInfo {
|
|
103
|
-
conversationSettings?: {
|
|
104
|
-
openingRemark?: string;
|
|
105
|
-
predefinedQuestions?: string[];
|
|
106
|
-
commands?: IAgentCommand[];
|
|
107
|
-
enableChatSession?: boolean;
|
|
108
|
-
enableWordSelectionPopup?: boolean;
|
|
109
|
-
};
|
|
110
|
-
promptSetting?: {
|
|
111
|
-
content?: ISessionPrompt[];
|
|
112
|
-
};
|
|
113
|
-
agentName?: string;
|
|
114
|
-
chatGroup?: {
|
|
115
|
-
enabled: boolean;
|
|
116
|
-
staff: string[];
|
|
117
|
-
username: string;
|
|
118
|
-
};
|
|
119
|
-
saasUrl?: string;
|
|
120
|
-
}
|
|
121
82
|
export interface IAgentFormApi extends IResourceFormCommonApi {
|
|
122
83
|
agent_code: string;
|
|
123
84
|
agent_name: string;
|
|
@@ -146,14 +107,14 @@ export interface IAgentFormApi extends IResourceFormCommonApi {
|
|
|
146
107
|
llm_code?: string;
|
|
147
108
|
};
|
|
148
109
|
prompt_setting?: {
|
|
149
|
-
prompt_type?:
|
|
110
|
+
prompt_type?: PromptSource;
|
|
150
111
|
prompt_content?: string;
|
|
151
112
|
collection_id: number;
|
|
152
113
|
collection_name?: string;
|
|
153
114
|
collection_variables?: IVariableApi[];
|
|
154
115
|
collection_content?: IContent[];
|
|
155
116
|
llm_code: string;
|
|
156
|
-
|
|
117
|
+
fallback_model?: string;
|
|
157
118
|
temperature?: number;
|
|
158
119
|
context_window?: number;
|
|
159
120
|
llm_token_limit?: number;
|
|
@@ -204,14 +165,14 @@ export interface IAgentForm extends IResourceFormCommon {
|
|
|
204
165
|
llmCode?: string;
|
|
205
166
|
};
|
|
206
167
|
promptSetting?: {
|
|
207
|
-
promptType?:
|
|
168
|
+
promptType?: PromptSource;
|
|
208
169
|
promptContent?: string;
|
|
209
170
|
collectionId: number;
|
|
210
171
|
collectionName?: string;
|
|
211
172
|
collectionVariables?: IVariable[];
|
|
212
173
|
collectionContent?: IContent[];
|
|
213
174
|
llmCode: string;
|
|
214
|
-
|
|
175
|
+
fallbackModel?: string;
|
|
215
176
|
temperature?: number;
|
|
216
177
|
contextWindow?: number;
|
|
217
178
|
llmTokenLimit?: number;
|
package/dist/types/enum.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ export declare enum FileStatus {
|
|
|
75
75
|
Init = "init",
|
|
76
76
|
Uploading = "uploading",
|
|
77
77
|
Uploaded = "uploaded",
|
|
78
|
+
UploadedOutdated = "uploaded_outdated",
|
|
78
79
|
Deleting = "deleting",
|
|
79
80
|
Deleted = "deleted",
|
|
80
81
|
Failed = "failed"
|
|
@@ -82,7 +83,8 @@ export declare enum FileStatus {
|
|
|
82
83
|
export declare enum ResourceStatus {
|
|
83
84
|
Deleted = "deleted",
|
|
84
85
|
NoPermission = "no_permission",
|
|
85
|
-
PermissionPending = "permission-pending"
|
|
86
|
+
PermissionPending = "permission-pending",
|
|
87
|
+
Ready = "ready"
|
|
86
88
|
}
|
|
87
89
|
export declare enum SkillStatus {
|
|
88
90
|
Publishing = "publishing",
|
|
@@ -109,6 +111,12 @@ export declare enum McpInstallTargetType {
|
|
|
109
111
|
Cursor = "cursor",
|
|
110
112
|
Openclaw = "openclaw"
|
|
111
113
|
}
|
|
114
|
+
export declare enum IngestionStageStatus {
|
|
115
|
+
Running = "running",
|
|
116
|
+
Succeeded = "succeeded",
|
|
117
|
+
Failed = "failed",
|
|
118
|
+
Pending = "pending"
|
|
119
|
+
}
|
|
112
120
|
export declare enum KnowledgePathType {
|
|
113
121
|
File = "file",
|
|
114
122
|
Folder = "folder"
|
|
@@ -218,7 +226,8 @@ export declare enum ResourcePermissionAction {
|
|
|
218
226
|
CreateMcp = "create_mcp",
|
|
219
227
|
ManageMcp = "manage_mcp",
|
|
220
228
|
ViewMcp = "view_mcp",
|
|
221
|
-
UseMcp = "use_mcp"
|
|
229
|
+
UseMcp = "use_mcp",
|
|
230
|
+
ManageProject = "manage_project"
|
|
222
231
|
}
|
|
223
232
|
export declare enum PlatformPermissionAction {
|
|
224
233
|
AccessPlatform = "access_platform",
|
|
@@ -313,6 +322,10 @@ export declare enum AgentDeployMode {
|
|
|
313
322
|
CodePackage = "code_package",
|
|
314
323
|
AuthorizedVcs = "authorized_vcs"
|
|
315
324
|
}
|
|
325
|
+
export declare enum PromptSource {
|
|
326
|
+
UserDefine = "user_define",
|
|
327
|
+
Collection = "collection"
|
|
328
|
+
}
|
|
316
329
|
export declare enum UserScope {
|
|
317
330
|
Public = "public",
|
|
318
331
|
Custom = "custom"
|
package/dist/types/enum.ts.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// 传给 ai 的类型
|
|
2
1
|
export var SessionPromptRole;
|
|
3
2
|
(function(SessionPromptRole) {
|
|
4
3
|
SessionPromptRole["System"] = "system";
|
|
@@ -83,6 +82,7 @@ export var FileStatus;
|
|
|
83
82
|
FileStatus["Init"] = "init";
|
|
84
83
|
FileStatus["Uploading"] = "uploading";
|
|
85
84
|
FileStatus["Uploaded"] = "uploaded";
|
|
85
|
+
FileStatus["UploadedOutdated"] = "uploaded_outdated";
|
|
86
86
|
FileStatus["Deleting"] = "deleting";
|
|
87
87
|
FileStatus["Deleted"] = "deleted";
|
|
88
88
|
FileStatus["Failed"] = "failed";
|
|
@@ -92,6 +92,7 @@ export var ResourceStatus;
|
|
|
92
92
|
ResourceStatus["Deleted"] = "deleted";
|
|
93
93
|
ResourceStatus["NoPermission"] = "no_permission";
|
|
94
94
|
ResourceStatus["PermissionPending"] = "permission-pending";
|
|
95
|
+
ResourceStatus["Ready"] = "ready";
|
|
95
96
|
})(ResourceStatus || (ResourceStatus = {}));
|
|
96
97
|
export var SkillStatus;
|
|
97
98
|
(function(SkillStatus) {
|
|
@@ -122,6 +123,13 @@ export var McpInstallTargetType;
|
|
|
122
123
|
McpInstallTargetType["Cursor"] = "cursor";
|
|
123
124
|
McpInstallTargetType["Openclaw"] = "openclaw";
|
|
124
125
|
})(McpInstallTargetType || (McpInstallTargetType = {}));
|
|
126
|
+
export var IngestionStageStatus;
|
|
127
|
+
(function(IngestionStageStatus) {
|
|
128
|
+
IngestionStageStatus["Running"] = "running";
|
|
129
|
+
IngestionStageStatus["Succeeded"] = "succeeded";
|
|
130
|
+
IngestionStageStatus["Failed"] = "failed";
|
|
131
|
+
IngestionStageStatus["Pending"] = "pending";
|
|
132
|
+
})(IngestionStageStatus || (IngestionStageStatus = {}));
|
|
125
133
|
export var KnowledgePathType;
|
|
126
134
|
(function(KnowledgePathType) {
|
|
127
135
|
KnowledgePathType["File"] = "file";
|
|
@@ -244,6 +252,7 @@ export var ResourcePermissionAction;
|
|
|
244
252
|
ResourcePermissionAction["ManageMcp"] = "manage_mcp";
|
|
245
253
|
ResourcePermissionAction["ViewMcp"] = "view_mcp";
|
|
246
254
|
ResourcePermissionAction["UseMcp"] = "use_mcp";
|
|
255
|
+
ResourcePermissionAction["ManageProject"] = "manage_project";
|
|
247
256
|
})(ResourcePermissionAction || (ResourcePermissionAction = {}));
|
|
248
257
|
export var PlatformPermissionAction;
|
|
249
258
|
(function(PlatformPermissionAction) {
|
|
@@ -354,6 +363,11 @@ export var AgentDeployMode;
|
|
|
354
363
|
AgentDeployMode["CodePackage"] = "code_package";
|
|
355
364
|
AgentDeployMode["AuthorizedVcs"] = "authorized_vcs";
|
|
356
365
|
})(AgentDeployMode || (AgentDeployMode = {}));
|
|
366
|
+
export var PromptSource;
|
|
367
|
+
(function(PromptSource) {
|
|
368
|
+
PromptSource["UserDefine"] = "user_define";
|
|
369
|
+
PromptSource["Collection"] = "collection";
|
|
370
|
+
})(PromptSource || (PromptSource = {}));
|
|
357
371
|
export var UserScope;
|
|
358
372
|
(function(UserScope) {
|
|
359
373
|
UserScope["Public"] = "public";
|