Add AI workflow run management with listing and detail retrieval endpoints, including corresponding response structures and UI integration

This commit is contained in:
mlogclub
2026-06-23 23:05:17 +08:00
parent a670084374
commit 1440c3c4c3
10 changed files with 594 additions and 1 deletions
+46
View File
@@ -545,6 +545,40 @@ export type AgentRunLog = {
createdAt: string
}
export type AIWorkflowNodeRun = {
id: number
workflowRunId: number
nodeId: string
nodeType: string
status: number
statusName: string
inputPreview: string
outputPreview: string
errorMessage: string
startedAt: string
endedAt: string
durationMs: number
}
export type AIWorkflowRun = {
id: number
workflowId: number
workflowVersionId: number
conversationId: number
aiAgentId: number
messageId: number
status: number
statusName: string
startedAt: string
endedAt: string
interruptType: string
interruptNodeId: string
errorMessage: string
createdAt: string
updatedAt: string
nodes?: AIWorkflowNodeRun[]
}
export type AdminAgentProfile = {
id: number
userId: number
@@ -1108,6 +1142,18 @@ export function fetchAgentRunLog(id: number) {
return request<AgentRunLog>(`/api/dashboard/agent-run-log/${id}`)
}
export function fetchAIWorkflowRuns(
query?: Record<string, string | number | undefined>
) {
return request<PageResult<AIWorkflowRun>>(
`/api/dashboard/ai-workflow/run/list${toQueryString(query)}`
)
}
export function fetchAIWorkflowRun(id: number) {
return request<AIWorkflowRun>(`/api/dashboard/ai-workflow/run/${id}`)
}
export function updateSkillDefinitionStatus(id: number, status: number) {
return request<void>("/api/dashboard/skill-definition/update_status", {
method: "POST",