feat: 添加执行列表功能以支持工作流执行管理

- 新增执行列表相关接口和数据结构,支持获取执行流和执行项
- 更新创作页面以展示执行流和预览功能,提升用户交互体验
- 优化树形结构展示,确保根据执行流动态生成节点
- 引入文件上传功能,支持用户上传文件并获取文件URL
This commit is contained in:
2026-05-09 11:01:32 +08:00
parent a285c9d982
commit 2e6af6e06c
2 changed files with 145 additions and 71 deletions

View File

@@ -67,6 +67,23 @@ export interface CreationTreeItem {
contentTypes: CreationContentTypeItem[];
}
// 新的执行列表数据结构
export interface ExecutionItem {
timestamp: string;
content: string;
label: string;
}
export interface ExecutionFlowItem {
flowName: string;
items: ExecutionItem[];
}
export interface ExecutionTreeItem {
createDate: string;
flows: ExecutionFlowItem[];
}
export interface CreationListData {
list: unknown[] | null;
total: number;
@@ -74,12 +91,23 @@ export interface CreationListData {
imgAddressPrefix: string;
}
export interface ExecutionListData {
tree: ExecutionTreeItem[];
imgAddressPrefix: string;
}
export interface CreationListResponse {
code: number;
message: string;
data: CreationListData;
}
export interface ExecutionListResponse {
code: number;
message: string;
data: ExecutionListData;
}
export interface CreationSubmitParams {
mode: string;
content_type: string;
@@ -105,6 +133,14 @@ export function getCreationList(params: CreationListParams, requestOptions?: Req
}) as Promise<CreationListResponse>;
}
export function getExecutionList(requestOptions?: RequestOptions) {
return request({
url: '/ai-agent/flow/execution/list',
method: 'get',
requestOptions,
}) as Promise<ExecutionListResponse>;
}
export function getNodeLibraryList(requestOptions?: RequestOptions) {
return request({
url: '/ai-agent/node/library/list',
@@ -260,7 +296,8 @@ export interface ExecuteFlowParams {
desc?: string;
fileUrl?: string[];
flowContent?: FlowInfo;
flowId?: number;
flowId?: string;
flowName?: string;
nodeInputParams?: FlowNode[];
sessionId?: string;
skillName?: string;