ci(release): tolerate plugin logs before agent json

This commit is contained in:
Peter Steinberger
2026-04-24 05:58:41 +01:00
parent 493306fa58
commit 9f731f49ea

View File

@@ -2431,7 +2431,10 @@ function parseAgentPayloadTexts(stdout) {
: [];
return [...directTexts, ...payloadTexts];
} catch {
return stdout.trim() ? [stdout] : [];
const finalTextMatches = [
...stdout.matchAll(/"(?:finalAssistantVisibleText|finalAssistantRawText)"\s*:\s*"([^"]*)"/gu),
].map((match) => match[1]);
return finalTextMatches.length > 0 ? finalTextMatches : stdout.trim() ? [stdout] : [];
}
}