import { analyzeChatProcessMedia, stripChatProcessHistoricalImages } from '../../../router/virtual-router/engine-selection/native-router-hotpath.js';
export function stripHistoricalImageAttachments(messages) {
    if (!Array.isArray(messages) || !messages.length) {
        return messages;
    }
    const placeholderText = '[Image omitted]';
    const stripped = stripChatProcessHistoricalImages(messages, placeholderText);
    if (stripped.changed !== true || !Array.isArray(stripped.messages)) {
        return messages;
    }
    return stripped.messages;
}
export function containsImageAttachment(messages) {
    if (!Array.isArray(messages) || !messages.length) {
        return false;
    }
    return analyzeChatProcessMedia(messages).containsCurrentTurnImage === true;
}
