#!/bin/bash
# 任务名称：飞书问题反馈归纳与分类（步骤4-6）
# 执行时间：每分钟
# 归属 Agent：小葵 xiaokui

set -e

export PATH=/root/.nvm/versions/node/v24.14.0/bin:$PATH
LOG_FILE="/var/log/xiaokui_feedback_summary.log"

log() {
    echo "[$(date +'%Y-%m-%d %H:%M:%S')] $1" >> "$LOG_FILE"
}

log "=== 归纳与分类开始 ==="

cd /root/.openclaw/workspace-xiaokui
python3 skills/feishu-feedback-sync/scripts/sync_feishu_feedback.py --days 1 --steps 4-6 --skip-dispatch >> "$LOG_FILE" 2>&1

log "=== 归纳与分类结束 ==="
exit 0
