mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-19 22:53:08 +00:00
Fix agent output summary for pipeline steps (#812)
* Changes from fix/agent-output-summary-for-pipeline-steps * feat: Optimize pipeline summary extraction and fix regex vulnerability * fix: Use fallback summary for pipeline steps when extraction fails * fix: Strip follow-up session scaffold from pipeline step fallback summaries
This commit is contained in:
14
apps/ui/src/lib/summary-selection.ts
Normal file
14
apps/ui/src/lib/summary-selection.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export type SummaryValue = string | null | undefined;
|
||||
|
||||
/**
|
||||
* Returns the first summary candidate that contains non-whitespace content.
|
||||
* The original string is returned (without trimming) to preserve formatting.
|
||||
*/
|
||||
export function getFirstNonEmptySummary(...candidates: SummaryValue[]): string | null {
|
||||
for (const candidate of candidates) {
|
||||
if (typeof candidate === 'string' && candidate.trim().length > 0) {
|
||||
return candidate;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user