# shellcheck shell=dash

# x coco convert java python,c,cpp

___x_cmd_coco_summary(){
    local lang_prompt=""
    while [ $# -gt 0 ]; do
        case "$1" in
            --cn)       lang_prompt="Please answer the question in Chinese language.";   shift  ;;
            *)          break ;;
        esac
    done

    local file_path="$1"
    [ -f "$file_path" ] ||  N=coco M="Please provide a valid [filepath=$file_path]" log:ret:64
    ___x_cmd_cmds_cat "$file_path" | lang_prompt="${lang_prompt}" ___x_cmd chat --send --type coco,summary --without-repl --history 0 --pipe "FILE-CONTENT" --minion "$___X_CMD_ROOT_MOD/coco/lib/minion/summary.yml"
}

