MCPcopy Create free account
hub / github.com/ShipSecAI/studio / mapStatusToLifecycle

Function mapStatusToLifecycle

frontend/src/store/executionStore.ts:99–117  ·  view source on GitHub ↗
(status: ExecutionStatus | undefined)

Source from the content-addressed store, hash-verified

97const terminalKey = (nodeId: string, stream = 'pty') => `${nodeId}:${stream}`;
98
99const mapStatusToLifecycle = (status: ExecutionStatus | undefined): ExecutionLifecycle => {
100 switch (status) {
101 case 'QUEUED':
102 return 'queued';
103 case 'RUNNING':
104 return 'running';
105 case 'COMPLETED':
106 return 'completed';
107 case 'FAILED':
108 return 'failed';
109 case 'CANCELLED':
110 case 'TERMINATED':
111 return 'cancelled';
112 case 'TIMED_OUT':
113 return 'failed';
114 default:
115 return 'idle';
116 }
117};
118
119const mergeById = (existing: ExecutionLog[], incoming: ExecutionLog[]): ExecutionLog[] => {
120 if (incoming.length === 0) return existing;

Callers 1

executionStore.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected