#!/usr/bin/env python3
"""
内容测试问题反馈群消息同步
基于 feishu-group-msg-sync skill + tencent-cos-upload skill
"""
import sys
import os

# 确保 lark-cli 在 PATH 中（crontab 环境下 PATH 受限）
_NODE_BIN = "/root/.nvm/versions/node/v24.14.0/bin"
if _NODE_BIN not in os.environ.get("PATH", ""):
    os.environ["PATH"] = _NODE_BIN + ":" + os.environ.get("PATH", "")

# 引用 skill 中的同步脚本
sys.path.insert(0, '/root/.openclaw/workspace-xiaokui/skills/feishu-group-msg-sync/scripts')
sys.path.insert(0, '/root/.openclaw/workspace-xiaokui/skills/tencent-cos-upload/scripts')

# 覆盖配置
import sync_group_to_sheet as sync
sync.CHAT_ID = "oc_fabff7672e62a9ced7b326ee4a286c26"
sync.SPREADSHEET_TOKEN = "E8vFsCmPBhT4SCtNmnJchqeJnJe"
sync.SHEET_ID = "7bce8f"
sync.LARK_CLI_CONFIG = "/root/.openclaw/credentials/xiaokui"
sync.LAST_SYNC_FILE = "/root/.openclaw/workspace-xiaokui/data/last_feedback_sync_time"
sync.WORK_DIR = "/tmp/feedback_sync_workdir"
sync.COS_BASE_PATH = "vala_llm/user_feedback"

if __name__ == '__main__':
    sync.main()
