/** `response.output_item.added` for assistant message → OpenAI message id (e.g. msg-cc-…). */
export function getOpenAIMessageItemIdFromOutputItemAdded(event) {
    if (!event)
        return null;
    const e = event;
    if (e.type !== 'response.output_item.added')
        return null;
    const item = e.item;
    if ((item === null || item === void 0 ? void 0 : item.type) !== 'message' || typeof item.id !== 'string' || item.id.length === 0) {
        return null;
    }
    return item.id;
}
//# sourceMappingURL=getOpenAIMessageItemIdFromOutputItemAdded.js.map
