
___x_cmd_coco_get_x_cmd_help(){
    local model=""
    local content=""

    arg:init:x  coco
    while [ $# -gt 0 ]; do
        case "$1" in
            --model)       model="$2";       arg:2:shift ;;
            --content)     content="$2";     arg:2:shift ;;
            *)             break ;;
        esac
    done

    [ -n "$model" ] || N=coco M="Please provide the model name" log:ret:64
    [ -n "$content" ] || N=coco M="Please provide the content to explain" log:ret:64
    coco:info "Get the x-cmd model[$model] help"
    local content_dir
    {
        ___x_cmd chat --request --type coco,histsum \
        --enactnone --no-context-file --tool update_stats \
        --minion "$___X_CMD_ROOT_MOD/coco/lib/minion/get_x_cmd_help.yml" \
        --session "coco/modhelp/$$" --history "99" --attach-text "model:$model
content:$content"
    } | {
        read -r content_dir
        [ -n "$content_dir" ] || return 1
        local content_file="$content_dir/chat.response/content"
        [ -f "$content_file" ] || N=coco M="Not found content file" log:ret:1
        ___x_cmd_cmds cat "$content_dir/chat.response/content"
    }
}

___x_cmd_coco_get_x_cmd_help_unit(){
    local command=""
    arg:init:x  coco
    while [ $# -gt 0 ]; do
        case "$1" in
            --command)     command="$2";       arg:2:shift ;;
            *)             break ;;
        esac
    done
    [ -n "$command" ] || N=coco M="Please provide the command string" log:ret:64
    ___x_cmd help -c "$command"
}
