MCPcopy Create free account
hub / github.com/ByBrawe/opencode-loop / jobLabel

Function jobLabel

src/index.js:514–528  ·  view source on GitHub ↗
(job)

Source from the content-addressed store, hash-verified

512}
513function stateValuesEqual(left, right) {
514 if (Object.is(left, right))
515 return true;
516 try {
517 return JSON.stringify(left) === JSON.stringify(right);
518 } catch {
519 return false;
520 }
521}
522function mergeStateJob(baseJob, intendedJob, currentJob) {
523 const merged = structuredClone(currentJob || {});
524 const keys = new Set([
525 ...Object.keys(baseJob || {}),
526 ...Object.keys(intendedJob || {})
527 ]);
528 for (const key of keys) {
529 const baseHas = Object.prototype.hasOwnProperty.call(baseJob || {}, key);
530 const intendedHas = Object.prototype.hasOwnProperty.call(intendedJob || {}, key);
531 const currentHas = Object.prototype.hasOwnProperty.call(currentJob || {}, key);

Callers 2

addLoopFunction · 0.85
statusLoopFunction · 0.85

Calls 1

durationToTextFunction · 0.85

Tested by

no test coverage detected