import { extractOutputSegmentsWithNative, normalizeContentPartWithNative, normalizeMessageContentPartsWithNative } from '../../router/virtual-router/engine-selection/native-shared-conversion-semantics.js';
export function extractOutputSegments(source, itemsKey = 'output') {
    return extractOutputSegmentsWithNative(source, itemsKey);
}
export function normalizeContentPart(part, reasoningCollector) {
    const normalized = normalizeContentPartWithNative(part, reasoningCollector);
    reasoningCollector.splice(0, reasoningCollector.length, ...normalized.reasoningCollector);
    return normalized.normalized;
}
export function normalizeMessageContentParts(parts, reasoningCollector) {
    const normalized = normalizeMessageContentPartsWithNative(parts, reasoningCollector ?? []);
    if (reasoningCollector) {
        reasoningCollector.splice(0, reasoningCollector.length, ...normalized.reasoningChunks);
    }
    return normalized;
}
