(tasks)
| 107 | return wave === null || wave === undefined ? '-' : String(wave); |
| 108 | } |
| 109 | |
| 110 | function serializeWorkQueue(tasks) { |
| 111 | const rows = [ |
| 112 | '| # | Campaign | Scope | Deps | Status | Wave | Agent | Branch | Evidence |', |
| 113 | '|---|----------|-------|------|--------|------|-------|--------|----------|', |
| 114 | ]; |
| 115 | |
| 116 | for (const task of tasks) { |
| 117 | rows.push([ |
| 118 | task.id || '', |
| 119 | task.campaign || '', |
| 120 | formatList(task.scope), |
| 121 | formatList(task.deps), |
| 122 | normalizeStatus(task.status), |
| 123 | formatWave(task.wave), |
| 124 | task.agent || '-', |
| 125 | task.branch || '-', |
| 126 | task.evidence || '-', |
| 127 | ].map((cell) => String(cell).replace(/\|/g, '/')).join(' | ').replace(/^/, '| ').replace(/$/, ' |')); |
| 128 | } |
| 129 | |
| 130 | return rows.join('\n'); |
| 131 | } |
| 132 | |
| 133 | function updateWorkQueue(content, tasks) { |
no test coverage detected