hit-cxf
2026-04-23 2f48fc1d4c80a4c25a04d5f4e1e6c19fbb3528db
aigc-director/aigc-claw/frontend/lib/workflowApi.ts
@@ -19,9 +19,8 @@
export interface ProjectStatus {
  session_id: string;
  current_stage: string;
  status: string;
  status: Record<string, string>;
  error: string | null;
  stages_completed: string[];
}
export interface StreamEvent {
@@ -53,6 +52,7 @@
export async function startProject(params: {
  idea: string;
  file_path?: string;
  style?: string;
  video_ratio?: string;
  llm_model?: string;
@@ -64,6 +64,7 @@
  enable_concurrency?: boolean;
  web_search?: boolean;
  expand_idea?: boolean;
  episodes?: number;
}): Promise<{ session_id: string; status: string; params: any }> {
  const resp = await fetch('/api/project/start', {
    method: 'POST',
@@ -151,12 +152,10 @@
export async function deleteSession(
  sessionId: string,
  password: string,
): Promise<{ status: string }> {
  const resp = await fetch(`/api/sessions/${sessionId}`, {
    method: 'DELETE',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ password }),
  });
  if (!resp.ok) {
    const err = await resp.json().catch(() => ({ detail: '删除失败' }));