use qdrant_client::qdrant::{Condition, Filter};

use super::payload::SESSION_ID_KEY;
use crate::error::{AiError, AiResult};

pub(super) fn validate_session_id(session_id: &str) -> AiResult<()> {
    if session_id.trim().is_empty() {
        return Err(AiError::Config("rag session_id is required".to_string()));
    }
    Ok(())
}

pub(super) fn session_filter(session_id: &str) -> Filter {
    Filter::all([Condition::matches(SESSION_ID_KEY, session_id.to_string())])
}
