# shellcheck shell=dash

___X_CMD_MOONSHOT_DEFAULT_ENDPOINT="https://api.moonshot.cn"
___X_CMD_MOONSHOT_DEFAULT_FIRST_MODEL='kimi-latest'
xrc:mod:lib     moonshot cfg  chat/_index model/_index api/_index count/_index api/file

___x_cmd_moonshot___main(){
    [ "$#" -gt 0 ] || set - --help

    local op="$1"; shift
    case "$op" in
        cfg|--cfg)      ___x_cmd_moonshot_cfg         "$@" ;;
        --cur)          ___x_cmd_moonshot_cur         "$@" ;;
        init|--init)    ___x_cmd_moonshot_init        "$@" ;;
        model)          ___x_cmd_moonshot_model       "$@" ;;
        chat)           ___x_cmd_moonshot_chat        "$@" ;;
        file)           ___x_cmd_moonshot_api_file    "$@" ;;
        --has-apikey)   ___x_cmd_moonshot_has_apikey  "$@" ;;

        balance)       ___x_cmd_moonshot_api_balance       ;;
        -h|--help)     ___x_cmd help -m moonshot "$@"      ;;
    esac
}
