Function count_latest_user_resolvable_image_markers
pub async fn count_latest_user_resolvable_image_markers(
messages: &[ChatMessage],
remote_allowed: bool,
path_allowed: Arc<dyn Fn(&Path) -> bool + Send + Sync>,
) -> usize