export interface DashboardStats {
  total_agents: number
  enabled_agents: number
  active_agents: number
  completed_agents: number
  total_nodes: number
  total_executions: number
  active_flows: number
}

// Jingrow API请求封装
const jingrowRequest = async (options: { url: string; data: any }) => {
  const response = await fetch(`/api/action/${options.url}`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Accept': 'application/json'
    },
    credentials: 'include',
    body: JSON.stringify(options.data)
  })

  if (!response.ok) {
    throw new Error(`API请求失败: ${response.status}`)
  }

  return response.json()
}

