function normalizeSegment(value) {
    return String(value ?? '').trim();
}
function joinPartId(prefix, ...segments) {
    return [prefix, ...segments.map(normalizeSegment)].join(':');
}
export function createLocalInteractivePartId(kind, ownerId, blockOrdinal) {
    return joinPartId(kind, 'local', ownerId, Math.max(0, Math.floor(Number(blockOrdinal) || 0)));
}
export function createThinkingPartIdFromReasoningItem(itemId) {
    return joinPartId('thinking', 'item', itemId);
}
export function createThinkingPartIdFromStream(turnId, streamId) {
    return joinPartId('thinking', 'stream', turnId, streamId);
}
export function createLocalThinkingPartId(ownerId, blockOrdinal) {
    return createLocalInteractivePartId('thinking', ownerId, blockOrdinal);
}
export function createChecklistPartId(kind, toolCallId) {
    return joinPartId(kind, 'tool', toolCallId);
}
//# sourceMappingURL=transcript-part-id.js.map