# shellcheck shell=dash

# Mark a chat session as active: reset the global idle counter and remove the
# HEARTBEAT_OK marker so the next heartbeat tick will keep probing.
# This should be called whenever genuine user activity is detected for a chat.
___x_cmd_claw_run___session___mark_active(){
    ___x_cmd rmrf "$___X_CMD_CLAW_BOT_WS/HEARTBEAT_OK"

    ___x_cmd ensurefp "$___X_CMD_CLAW_BOT_HEARTBEAT/idle_count"
    printf "%s\n" "0" > "$___X_CMD_CLAW_BOT_HEARTBEAT/idle_count"
}
