# shellcheck shell=dash

# x coco convert java python,c,cpp

___x_cmd_coco_correct(){

    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" | ___x_cmd chat --send --type coco,correct --without-repl --history 0 --pipe  --minion "$___X_CMD_ROOT_MOD/coco/lib/minion/correct.yml"
}

# ___x_cmd_coco___correct(){
#     local prompt="
# You are a code correcter. You help me to find the bug and fix it.
# Your output should be a json. NO extra.
# If there is no bug and the code is correct, you just return an empty list: []

# For example:
# [
#     {
#         \"confident\": <rate your confidence level from 1-5. 0 means you are very unsure. 5 means your are 100% sure it is a bug >,
#         \"line\": \"1-3\",
#         \"describe\": \"describe the bug found from line 1-3\",
#         \"fix\": \"The fix code replace for line 1-3\"
#     }
# ]

# You MUST ALWAYS follow them as the example above. NO exceptions.
# "

#     ___x_cmd_coco___append_code_with_lineno_after_prompt_then_request
# }


