MCPcopy Index your code
hub / github.com/Dimillian/CodexMonitor / classifyTurnStatus

Function classifyTurnStatus

src/features/threads/utils/threadRpc.ts:255–289  ·  view source on GitHub ↗
(status: string)

Source from the content-addressed store, hash-verified

253type TurnStatusKind = "active" | "terminal" | "unknown";
254
255function classifyTurnStatus(status: string): TurnStatusKind {
256 if (!status) {
257 return "unknown";
258 }
259 if (
260 status === "inprogress" ||
261 status === "running" ||
262 status === "processing" ||
263 status === "pending" ||
264 status === "started" ||
265 status === "queued" ||
266 status === "waiting" ||
267 status === "blocked" ||
268 status === "needsinput" ||
269 status === "requiresaction" ||
270 status === "awaitinginput" ||
271 status === "waitingforinput"
272 ) {
273 return "active";
274 }
275 if (
276 status === "completed" ||
277 status === "done" ||
278 status === "failed" ||
279 status === "error" ||
280 status === "canceled" ||
281 status === "cancelled" ||
282 status === "aborted" ||
283 status === "stopped" ||
284 status === "interrupted"
285 ) {
286 return "terminal";
287 }
288 return "unknown";
289}
290
291function getExplicitActiveTurnState(
292 thread: Record<string, unknown>,

Callers 1

getResumedTurnStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected