import { resolvePartErrorDetail } from './team-leader-common.js';
export function buildTeamLeaderAggregatedContent(plannedParts, partResults) {
    return [
        '## decomposition',
        JSON.stringify({ parts: plannedParts }, null, 2),
        ...partResults.map((result) => [
            `## ${result.part.id}: ${result.part.title}`,
            result.response.status === 'error'
                ? `[ERROR] ${resolvePartErrorDetail(result)}`
                : result.response.content,
        ].join('\n')),
    ].join('\n\n---\n\n');
}
//# sourceMappingURL=team-leader-aggregation.js.map