# shellcheck shell=dash

___x_cmd_ollama_is_installed(){
    if ! ___x_cmd hasbin ollama; then
        if ___x_cmd_runmode_allow_chatty; then
            ___x_cmd ui yesno "You need to install ollama first. Do you want to download it?" || return $?
            ___x_cmd install ollama
        else
            ollama:warn "Ollama not found. Use \`x install ollama\` to download."
            return 1
        fi
    fi
}
