MCPcopy Create free account
hub / github.com/QLHazyCoder/FlowPilot / formatAutoRunFailureReasons

Function formatAutoRunFailureReasons

background/auto-run-controller.js:79–93  ·  view source on GitHub ↗
(reasons = [])

Source from the content-addressed store, hash-verified

77 }
78
79 function formatAutoRunFailureReasons(reasons = []) {
80 if (!Array.isArray(reasons) || !reasons.length) {
81 return '未知错误';
82 }
83
84 const counts = new Map();
85 for (const reason of reasons) {
86 const normalized = String(reason || '').trim() || '未知错误';
87 counts.set(normalized, (counts.get(normalized) || 0) + 1);
88 }
89
90 return Array.from(counts.entries())
91 .map(([reason, count]) => (count > 1 ? `${reason}(${count}次)` : reason))
92 .join(';');
93 }
94
95 async function logAutoRunFinalSummary(totalRuns, roundSummaries = []) {
96 const summaries = buildAutoRunRoundSummaries(totalRuns, roundSummaries);

Callers 1

logAutoRunFinalSummaryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected