MCPcopy
hub / github.com/openai/codex-plugin-cc / pruneJobs

Function pruneJobs

plugins/codex/scripts/lib/state.mjs:80–84  ·  view source on GitHub ↗
(jobs)

Source from the content-addressed store, hash-verified

78}
79
80function pruneJobs(jobs) {
81 return [...jobs]
82 .sort((left, right) => String(right.updatedAt ?? "").localeCompare(String(left.updatedAt ?? "")))
83 .slice(0, MAX_JOBS);
84}
85
86function removeFileIfExists(filePath) {
87 if (filePath && fs.existsSync(filePath)) {

Callers 1

saveStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected