feat(editing-planner): 实现生成进度展示 — 任务 2.17
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 186h43m22s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 186h43m25s
Deploy / Deploy Staging (push) Failing after 186h43m53s
CI/CD Pipeline / Frontend Lint (push) Failing after 186h44m20s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 186h44m24s
Deploy / Production Browser E2E (push) Failing after 1845h19m4s
Deploy / Build Production Runtime Images (push) Failing after 1845h19m35s
Deploy / Deploy Production (push) Failing after 1845h50m28s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 186h43m22s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 186h43m25s
Deploy / Deploy Staging (push) Failing after 186h43m53s
CI/CD Pipeline / Frontend Lint (push) Failing after 186h44m20s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 186h44m24s
Deploy / Production Browser E2E (push) Failing after 1845h19m4s
Deploy / Build Production Runtime Images (push) Failing after 1845h19m35s
Deploy / Deploy Production (push) Failing after 1845h50m28s
- 新增 GenerationProgressModal 组件:三阶段 UI(setup → progress → completed/failed) - 集成 React Query 轮询:refetchInterval 2s 轮询任务状态,终态自动停止 - 进度展示:SVG 进度环 + 进度条 + 步骤文案 + 任务 ID - 失败处理:错误信息展示 + 可重试时显示重试按钮 - 对接 createGenerationTask / getTask / retryTask API - V21 设计系统,CSS 类名前缀 ep-gen-
This commit is contained in:
@@ -70,6 +70,12 @@ export const getUserTasks = async (): Promise<TaskItem[]> => {
|
||||
return data.items || [];
|
||||
};
|
||||
|
||||
/** 获取单个任务详情(用于轮询进度) */
|
||||
export const getTask = async (taskId: string): Promise<TaskItem> => {
|
||||
const { data } = await apiClient.get(`/tasks/${taskId}`);
|
||||
return data;
|
||||
};
|
||||
|
||||
/** 重试失败的任务 */
|
||||
export const retryTask = async (taskId: string): Promise<TaskItem> => {
|
||||
const { data } = await apiClient.post(`/tasks/${taskId}/retry`);
|
||||
|
||||
Reference in New Issue
Block a user