import { formatPayloadForCommandInput } from '../utils.js'; import type { DevHostFlowEntry, DevHostFlowRunState } from '../types.js'; import { Button } from './ui/Button.js'; type FlowListProps = { flows: DevHostFlowEntry[]; flowRuns: DevHostFlowRunState[]; hasRunningFlow: (flowName: string) => boolean; onRunFlow: (flow: DevHostFlowEntry) => void; onStopFlow: (runId: string) => void; }; const getStatusLabel = (status: DevHostFlowRunState['status']) => { if (status === 'running') { return 'Running'; } if (status === 'succeeded') { return 'Completed'; } if (status === 'failed') { return 'Failed'; } if (status === 'aborted') { return 'Stopped'; } return status; }; export const FlowList = ({ flows, flowRuns, hasRunningFlow, onRunFlow, onStopFlow }: FlowListProps) => { if (flows.length === 0) { return
{formatPayloadForCommandInput(flowRun.result)}
) : null}