diff --git a/.vala_skill_hashes b/.vala_skill_hashes index 3c555a7..f5bf551 100644 --- a/.vala_skill_hashes +++ b/.vala_skill_hashes @@ -14,4 +14,4 @@ user-feedback-data-source a95eb9142f3019fd193c46f89147dc7e0bf01dfe250202565a86f8 user-feedback-processor 61783a8e9f03a973c187b359a87749ad1993dc71f8364b0a853d8b3ff64c75e8 feishu-group-msg-sync 953534cc3d1cf4489060afe1cf10cad75faedd3f2d699ffa7478d178d528dc51 tencent-cos-upload 2505dbc8c7acdaf95f2228598ae12010e09599a25df4319587c4a3109d828053 -feishu-feedback-sync fa183bd91d2b8d1c6fae7647aa4b3536791e729a1cc8146dfa5b29d4120a8467 +feishu-feedback-sync a02609ee2654a4e336aff015261c128c8ebebdcd330bad4b0f0e9fbaf86a0634 diff --git a/data/last_wechat_sync_id b/data/last_wechat_sync_id index d71bdf5..4fa0673 100644 --- a/data/last_wechat_sync_id +++ b/data/last_wechat_sync_id @@ -1 +1 @@ -1933 +1939 diff --git a/output/daily_feedback/ai_descriptions_wechat_2026-06-03.json b/output/daily_feedback/ai_descriptions_wechat_2026-06-03.json new file mode 100644 index 0000000..9cf1352 --- /dev/null +++ b/output/daily_feedback/ai_descriptions_wechat_2026-06-03.json @@ -0,0 +1,17 @@ +{ + "date": "2026-06-03", + "descriptions": [ + { + "index": 1, + "description": "用户在希沃学习机上使用题目解析功能时经相关人员退。" + }, + { + "index": 2, + "description": "无明确问题" + }, + { + "index": 3, + "description": "无明确问题" + } + ] +} \ No newline at end of file diff --git a/output/daily_feedback/cluster_context_2026-06-01.json b/output/daily_feedback/cluster_context_2026-06-01.json index 930d9eb..091adcb 100644 --- a/output/daily_feedback/cluster_context_2026-06-01.json +++ b/output/daily_feedback/cluster_context_2026-06-01.json @@ -4,6 +4,7 @@ "clusters": [ { "index": 1, + "_idx": 1, "cluster_id": "899638177077092818", "location": { "端": "移动端", @@ -34,6 +35,7 @@ }, { "index": 2, + "_idx": 2, "cluster_id": "8107869671700436169", "location": { "端": "未知", @@ -64,6 +66,7 @@ }, { "index": 3, + "_idx": 3, "cluster_id": "6468786411792047679", "location": { "端": "未知", @@ -94,6 +97,7 @@ }, { "index": 4, + "_idx": 4, "cluster_id": "3173328306480860032", "location": { "端": "未知", diff --git a/output/daily_feedback/cluster_context_2026-06-02.json b/output/daily_feedback/cluster_context_2026-06-02.json index 6314ead..1809add 100644 --- a/output/daily_feedback/cluster_context_2026-06-02.json +++ b/output/daily_feedback/cluster_context_2026-06-02.json @@ -12,7 +12,7 @@ "课程": "", "角色/组件": "" }, - "priority": "P0", + "priority": "P2", "priority_detail": "", "category": "启动/运行异常", "conclusion": "**当前问题排查结论:** 暂无结论排查中", @@ -21,7 +21,7 @@ "sender": "瓦拉英语-茉茉老师(早10晚7)", "content": "[图片] 78d95a2b44601479633367bebabeab5d", "msg_type": "image", - "media_url": "https://static.valavala.com/vala_llm/user_feedback/wechat/image/2026-06/675ebc29ab5013c7312dc774d34511b3.jpg", + "media_url": "", "time": "2026-06-02 19:58:29" }, { diff --git a/output/daily_feedback/wechat_cluster_context_2026-06-01.json b/output/daily_feedback/wechat_cluster_context_2026-06-01.json deleted file mode 100644 index 6ce3831..0000000 --- a/output/daily_feedback/wechat_cluster_context_2026-06-01.json +++ /dev/null @@ -1,472 +0,0 @@ -{ - "date": "2026-06-01", - "clusters": [ - { - "index": 1, - "cluster_id": "8497715766705176818", - "message_count": 1, - "messages": [ - { - "sender": "瓦拉英语-露露班班(早10晚7)", - "content": "[聊天记录] 宇儿和瓦拉英语-露露班主任(早10晚7)\n宇儿: [视频]\n瓦拉英语-露露班主任(早10晚7): 这个学完了一节课\n瓦拉英语-露露班主任(早10晚7): 到主页就返回不了是不\n宇儿: 嗯\n宇儿: 她们还是反应老卡", - "msg_type": "link", - "time": "2026-06-01 10:00:35", - "message_id": "8497715766705176818", - "quote_message_id": "" - } - ] - }, - { - "index": 2, - "cluster_id": "8959736819404669368", - "message_count": 1, - "messages": [ - { - "sender": "瓦拉英语-露露班班(早10晚7)", - "content": "18501743068 希沃的设备 返回页面就一直转圈圈 辛苦老师看看", - "msg_type": "text", - "time": "2026-06-01 10:01:05", - "message_id": "8959736819404669368", - "quote_message_id": "" - } - ] - }, - { - "index": 3, - "cluster_id": "5770409017461047118", - "message_count": 1, - "messages": [ - { - "sender": "kevin", - "content": "如果一直卡着,就杀了进程,重新登录,然后让用户上传一下日志,我们查一下", - "msg_type": "text", - "time": "2026-06-01 10:03:45", - "message_id": "5770409017461047118", - "quote_message_id": "" - } - ] - }, - { - "index": 4, - "cluster_id": "1734666841597352841", - "message_count": 1, - "messages": [ - { - "sender": "瓦拉英语-露露班班(早10晚7)", - "content": "好的", - "msg_type": "text", - "time": "2026-06-01 10:10:40", - "message_id": "1734666841597352841", - "quote_message_id": "" - } - ] - }, - { - "index": 5, - "cluster_id": "899638177077092818", - "message_count": 2, - "messages": [ - { - "sender": "瓦拉英语-露露班班(早10晚7)", - "content": "用户原本在19521303802买的课程,但是把手机号注销了,注销之前没有转课,我们可以帮忙转到13761223038这个手机号上面嘛", - "msg_type": "text", - "time": "2026-06-01 10:11:04", - "message_id": "899638177077092818", - "quote_message_id": "" - }, - { - "sender": "嘿哈", - "content": "哥哥们,人家是手机号注销了,没有办法手验证码换绑手机号\n ↳ 回复 瓦拉英语-露露班主任(早10晚7): 用户原本在19521303802买的课程,但是把手机号注销了,注销之前没有转课,我们可以帮忙转到13761223038这个手机号上面嘛", - "msg_type": "link", - "time": "2026-06-01 10:43:21", - "message_id": "5336594435039773468", - "quote_message_id": "899638177077092818" - } - ] - }, - { - "index": 6, - "cluster_id": "5036623778873503473", - "message_count": 1, - "messages": [ - { - "sender": "kevin", - "content": "@wayne  帮解答一下这个问题呐", - "msg_type": "text", - "time": "2026-06-01 10:12:12", - "message_id": "5036623778873503473", - "quote_message_id": "" - } - ] - }, - { - "index": 7, - "cluster_id": "6781447912925890523", - "message_count": 1, - "messages": [ - { - "sender": "跃馬點煋", - "content": "@lxr 哥", - "msg_type": "text", - "time": "2026-06-01 10:12:59", - "message_id": "6781447912925890523", - "quote_message_id": "" - } - ] - }, - { - "index": 8, - "cluster_id": "8001621837251471169", - "message_count": 1, - "messages": [ - { - "sender": "lxr", - "content": "@wayne 注销那块不是我做的啊,为什么有正式课包还能注销啊,最好把账号恢复一下,然后用班主任的交换课包", - "msg_type": "text", - "time": "2026-06-01 10:20:18", - "message_id": "8001621837251471169", - "quote_message_id": "" - } - ] - }, - { - "index": 9, - "cluster_id": "3304360762644619577", - "message_count": 1, - "messages": [ - { - "sender": "lxr", - "content": "把课包恢复了用换绑手机号就行", - "msg_type": "text", - "time": "2026-06-01 10:22:32", - "message_id": "3304360762644619577", - "quote_message_id": "" - } - ] - }, - { - "index": 10, - "cluster_id": "5316302202889668331", - "message_count": 1, - "messages": [ - { - "sender": "跃馬點煋", - "content": "那我艾特一下礼哥", - "msg_type": "text", - "time": "2026-06-01 10:29:53", - "message_id": "5316302202889668331", - "quote_message_id": "" - } - ] - }, - { - "index": 11, - "cluster_id": "3976414880865758941", - "message_count": 1, - "messages": [ - { - "sender": "跃馬點煋", - "content": "@Break 礼哥,注销这一块辛苦看看?", - "msg_type": "text", - "time": "2026-06-01 10:30:14", - "message_id": "3976414880865758941", - "quote_message_id": "" - } - ] - }, - { - "index": 12, - "cluster_id": "4646649778610992051", - "message_count": 1, - "messages": [ - { - "sender": "Break", - "content": "有正式课也可以注销", - "msg_type": "text", - "time": "2026-06-01 10:31:06", - "message_id": "4646649778610992051", - "quote_message_id": "" - } - ] - }, - { - "index": 13, - "cluster_id": "1031586244770422124", - "message_count": 1, - "messages": [ - { - "sender": "Break", - "content": "这个功能就是这么设计的", - "msg_type": "text", - "time": "2026-06-01 10:31:25", - "message_id": "1031586244770422124", - "quote_message_id": "" - } - ] - }, - { - "index": 14, - "cluster_id": "8107869671700436169", - "message_count": 2, - "messages": [ - { - "sender": "lxr", - "content": "能恢复吗,误操作用户肯定会有找过来的,要不先给恢复下,然后让产品经理看下这块要不要改下", - "msg_type": "text", - "time": "2026-06-01 10:35:09", - "message_id": "8107869671700436169", - "quote_message_id": "" - }, - { - "sender": "Break", - "content": "需要输入验证码的,误操作还好,恢复只能手动\n ↳ 回复 lxr: 能恢复吗,误操作用户肯定会有找过来的,要不先给恢复下,然后让产品经理看下这块要不要改下", - "msg_type": "link", - "time": "2026-06-01 10:44:42", - "message_id": "8636272593866036634", - "quote_message_id": "8107869671700436169" - } - ] - }, - { - "index": 15, - "cluster_id": "8753904227274464688", - "message_count": 1, - "messages": [ - { - "sender": "lxr", - "content": "所以得先恢复注销的账号", - "msg_type": "text", - "time": "2026-06-01 10:44:49", - "message_id": "8753904227274464688", - "quote_message_id": "" - } - ] - }, - { - "index": 16, - "cluster_id": "6294370198613053675", - "message_count": 1, - "messages": [ - { - "sender": "lxr", - "content": "先给手动恢复下吧,这种注销账号的功能其他平台会先给一堆提示告诉用户数据不可恢复,以及包括未退款订单,然后7天之后注销,七天内用户可以撤销注销", - "msg_type": "text", - "time": "2026-06-01 10:46:58", - "message_id": "6294370198613053675", - "quote_message_id": "" - } - ] - }, - { - "index": 17, - "cluster_id": "6468786411792047679", - "message_count": 2, - "messages": [ - { - "sender": "丹咪尼🌹", - "content": "[聊天记录] 群聊的聊天记录\n城美九月: P776848816763467851 买家反馈 闪退 用的 望远镜 退出 还是闪退\n城美九月: [图片]\n城美九月: P776848816763467851上传日志了姐 麻烦您看下\n丹咪尼🌹: 18353383818", - "msg_type": "link", - "time": "2026-06-01 11:54:01", - "message_id": "6468786411792047679", - "quote_message_id": "" - }, - { - "sender": "丹咪尼🌹", - "content": "老师这个问题怎么样了什么原因导致呢\n ↳ 回复 丹咪尼🌹: 群聊的聊天记录城美九月: P776848816763467851 买家反馈 闪退 用的 望远镜 退出 还是闪退\n城美九月: [图片]\n城美九月: P776848816763467851上传日志了姐...", - "msg_type": "link", - "time": "2026-06-01 14:08:27", - "message_id": "2655574180636843298", - "quote_message_id": "6468786411792047679" - } - ] - }, - { - "index": 18, - "cluster_id": "1813933807182726358", - "message_count": 1, - "messages": [ - { - "sender": "丹咪尼🌹", - "content": "买家反馈 闪退 用的 望远镜 退出 还是闪退。11:53分 已上传日志 辛苦老师加急看下原因 @八哥-16619720408", - "msg_type": "text", - "time": "2026-06-01 11:54:33", - "message_id": "1813933807182726358", - "quote_message_id": "" - } - ] - }, - { - "index": 19, - "cluster_id": "3173328306480860032", - "message_count": 2, - "messages": [ - { - "sender": "kevin", - "content": "好的。", - "msg_type": "text", - "time": "2026-06-01 11:55:50", - "message_id": "3173328306480860032", - "quote_message_id": "" - }, - { - "sender": "丹咪尼🌹", - "content": "@kevin", - "msg_type": "text", - "time": "2026-06-01 14:08:30", - "message_id": "9216526394707453017", - "quote_message_id": "3173328306480860032" - } - ] - }, - { - "index": 20, - "cluster_id": "5392691972151946206", - "message_count": 1, - "messages": [ - { - "sender": "kevin", - "content": "日志里没有看到异常信息 不好定位 ", - "msg_type": "text", - "time": "2026-06-01 14:09:06", - "message_id": "5392691972151946206", - "quote_message_id": "" - } - ] - }, - { - "index": 21, - "cluster_id": "2808504464841077816", - "message_count": 1, - "messages": [ - { - "sender": ".oO(王_计)Oo.", - "content": "下一个热更 可以让用户试一下好了没。\n ↳ 回复 瓦拉英语-茉茉班主任(早10晚7): 睿视D1,fish写不出来,还是只能用手机触屏去写呀", - "msg_type": "link", - "time": "2026-06-01 14:13:24", - "message_id": "2808504464841077816", - "quote_message_id": "4677623556994358003" - } - ] - }, - { - "index": 22, - "cluster_id": "4131805594061276620", - "message_count": 1, - "messages": [ - { - "sender": "瓦拉英语-益达老师", - "content": "[视频] 5秒 size:2125764", - "msg_type": "video", - "time": "2026-06-01 20:40:34", - "message_id": "4131805594061276620", - "quote_message_id": "" - } - ] - }, - { - "index": 23, - "cluster_id": "3894792106027277062", - "message_count": 1, - "messages": [ - { - "sender": "瓦拉英语-益达老师", - "content": "老师们好,学员反馈无法翻译,点不出来,麻烦帮忙看下~", - "msg_type": "text", - "time": "2026-06-01 20:41:03", - "message_id": "3894792106027277062", - "quote_message_id": "" - } - ] - }, - { - "index": 24, - "cluster_id": "4135036512185950551", - "message_count": 1, - "messages": [ - { - "sender": "嘿哈", - "content": "哪一关啊", - "msg_type": "text", - "time": "2026-06-01 20:44:14", - "message_id": "4135036512185950551", - "quote_message_id": "" - } - ] - }, - { - "index": 25, - "cluster_id": "6065787554763441024", - "message_count": 1, - "messages": [ - { - "sender": "瓦拉英语-益达老师", - "content": "用户还未回复信息~", - "msg_type": "text", - "time": "2026-06-01 20:48:37", - "message_id": "6065787554763441024", - "quote_message_id": "" - } - ] - }, - { - "index": 26, - "cluster_id": "5520294980734116461", - "message_count": 1, - "messages": [ - { - "sender": "嘿哈", - "content": "发一下用户手机号吧", - "msg_type": "text", - "time": "2026-06-01 20:49:08", - "message_id": "5520294980734116461", - "quote_message_id": "" - } - ] - }, - { - "index": 27, - "cluster_id": "1522063212672902848", - "message_count": 1, - "messages": [ - { - "sender": "瓦拉英语-益达老师", - "content": "13751840966", - "msg_type": "text", - "time": "2026-06-01 20:50:07", - "message_id": "1522063212672902848", - "quote_message_id": "" - } - ] - }, - { - "index": 28, - "cluster_id": "386119994485617174", - "message_count": 1, - "messages": [ - { - "sender": "嘿哈", - "content": "我看了一下应该是配置问题,我明天找大模型老师看一下吧", - "msg_type": "text", - "time": "2026-06-01 21:20:59", - "message_id": "386119994485617174", - "quote_message_id": "" - } - ] - }, - { - "index": 29, - "cluster_id": "8301848475881432153", - "message_count": 1, - "messages": [ - { - "sender": "瓦拉英语-益达老师", - "content": "[表情]", - "msg_type": "sticker", - "time": "2026-06-01 22:15:09", - "message_id": "8301848475881432153", - "quote_message_id": "" - } - ] - } - ] -} \ No newline at end of file diff --git a/output/daily_feedback/wechat_cluster_context_2026-06-02.json b/output/daily_feedback/wechat_cluster_context_2026-06-02.json deleted file mode 100644 index 828e3e7..0000000 --- a/output/daily_feedback/wechat_cluster_context_2026-06-02.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "date": "2026-06-02", - "clusters": [ - { - "index": 1, - "_idx": 1, - "cluster_id": "4437274725416708727", - "message_count": 1, - "priority": "P2", - "priority_detail": "基础优先级: P2(无法精确匹配,默认归为P2)", - "messages": [ - { - "sender": "瓦拉英语-露露班班(早10晚7)", - "content": "[图片] f76c7d140dc870f5ae2b42a6c27621c7", - "msg_type": "image", - "time": "2026-06-02 09:44:34", - "message_id": "4437274725416708727", - "quote_message_id": "" - } - ] - }, - { - "index": 2, - "_idx": 2, - "cluster_id": "8085984444640105314", - "message_count": 1, - "priority": "P0", - "priority_detail": "基础优先级: P0(匹配P0规则:crash)", - "messages": [ - { - "sender": "瓦拉英语-露露班班(早10晚7)", - "content": "京东方小课屏的磨耳朵又出现了白屏,已经引导用户在小程序上听", - "msg_type": "text", - "time": "2026-06-02 09:45:08", - "message_id": "8085984444640105314", - "quote_message_id": "" - } - ] - }, - { - "index": 3, - "_idx": 3, - "cluster_id": "6374990160361275847", - "message_count": 1, - "priority": "P2", - "priority_detail": "基础优先级: P2(无法精确匹配,默认归为P2)", - "messages": [ - { - "sender": ".oO(王_计)Oo.", - "content": "磨耳朵已经在用unity原生重新开发了。让用户再稍微等一下", - "msg_type": "text", - "time": "2026-06-02 09:46:34", - "message_id": "6374990160361275847", - "quote_message_id": "" - } - ] - }, - { - "index": 4, - "_idx": 4, - "cluster_id": "7302252117666642816", - "message_count": 11, - "priority": "P0", - "priority_detail": "基础优先级: P0(匹配P0规则:crash);出现频率: 高概率", - "messages": [ - { - "sender": "瓦拉英语-花花班班(早10晚7-周末休息)", - "content": "13464008928用户用的希沃学习机经常闪退,辛苦老师看下", - "msg_type": "text", - "time": "2026-06-02 20:04:46", - "message_id": "7302252117666642816", - "quote_message_id": "" - }, - { - "sender": "嘿哈", - "content": "让他进入角色后再进入设置页面点击上传日志,不要在选择角色页面进设置页\n ↳ 回复 瓦拉英语-花花班主任(早10晚7): 13464008928用户用的希沃学习机经常闪退,辛苦老师看下", - "msg_type": "link", - "time": "2026-06-02 20:06:00", - "message_id": "3680519818246863462", - "quote_message_id": "7302252117666642816" - }, - { - "sender": "嘿哈", - "content": "确认一下闪退的地点,是只有查看题目解析的时候闪退么?还是说有其他路径\n ↳ 回复 瓦拉英语-花花班主任(早10晚7): 13464008928用户用的希沃学习机经常闪退,辛苦老师看下", - "msg_type": "link", - "time": "2026-06-02 20:06:23", - "message_id": "5476954047159243877", - "quote_message_id": "7302252117666642816" - }, - { - "sender": "瓦拉英语-茉茉老师(早10晚7)", - "content": "[图片] 78d95a2b44601479633367bebabeab5d", - "msg_type": "image", - "time": "2026-06-02 19:58:29", - "message_id": "8392416847465848425", - "quote_message_id": "" - }, - { - "sender": "瓦拉英语-茉茉老师(早10晚7)", - "content": "又有家长反映这个不能用鼠标写", - "msg_type": "text", - "time": "2026-06-02 19:58:47", - "message_id": "6149726619633505263", - "quote_message_id": "" - }, - { - "sender": "瓦拉英语-茉茉老师(早10晚7)", - "content": "这个问题后面怎么解决呀,增加跳过的按钮吗", - "msg_type": "text", - "time": "2026-06-02 19:59:08", - "message_id": "533759990164518435", - "quote_message_id": "" - }, - { - "sender": ".oO(王_计)Oo.", - "content": "已经解决,随下次热更新", - "msg_type": "text", - "time": "2026-06-02 19:59:54", - "message_id": "9092556441259768782", - "quote_message_id": "" - }, - { - "sender": "瓦拉英语-茉茉老师(早10晚7)", - "content": "好的👌", - "msg_type": "text", - "time": "2026-06-02 20:00:54", - "message_id": "6634484585577794512", - "quote_message_id": "" - }, - { - "sender": "瓦拉英语-花花班班(早10晚7-周末休息)", - "content": "[聊天记录] 綦小綦和瓦拉英语-花花班主任(早10晚7)\n綦小綦: [视频]\n綦小綦: 做题或者查看做题情况 都这样一会就闪退\n綦小綦: 你们这系统技术能改进一下吗\n綦小綦: 老卡呢\n綦小綦: 要不就卡顿\n瓦拉英语-花花班主任(早10晚7): 咱们是用的什么设备学习呢\n綦小綦: [图片]\n綦小綦: 我这没有上传日志啊\n綦小綦: 我用的希沃学习机\n綦小綦: 一天闪退好几次", - "msg_type": "link", - "time": "2026-06-02 20:04:20", - "message_id": "5406706268715174985", - "quote_message_id": "" - }, - { - "sender": "瓦拉英语-花花班班(早10晚7-周末休息)", - "content": "好的", - "msg_type": "text", - "time": "2026-06-02 20:09:58", - "message_id": "2006689369710136562", - "quote_message_id": "" - }, - { - "sender": "瓦拉英语-花花班班(早10晚7-周末休息)", - "content": "家长说查看题目解析,它也闪退。然后今天做的是Season1里的第三关点进去也闪退。", - "msg_type": "text", - "time": "2026-06-02 20:29:32", - "message_id": "1516319709508113867", - "quote_message_id": "" - } - ] - } - ] -} \ No newline at end of file diff --git a/scripts/sync_wechat_feedback.py b/scripts/sync_wechat_feedback.py index 3677a0a..32221d1 100755 --- a/scripts/sync_wechat_feedback.py +++ b/scripts/sync_wechat_feedback.py @@ -217,8 +217,8 @@ def main(): env = os.environ.copy() env["LARKSUITE_CLI_CONFIG_DIR"] = CRED_DIR result = subprocess.run( - [CLI, "docs", "+update", "--doc", obj_token, "--as", "bot", - "--mode", "overwrite", "--markdown", f"@{tmp_md}"], + [CLI, "docs", "--api-version", "v2", "+update", "--doc", obj_token, "--as", "bot", + "--command", "overwrite", "--content", f"@{tmp_md}", "--doc-format", "markdown"], env=env, capture_output=True, text=True, timeout=15, cwd=workspace_root) os.unlink(tmp_md_abs) diff --git a/skills/feishu-feedback-sync/scripts/__pycache__/sync_feishu_feedback.cpython-312.pyc b/skills/feishu-feedback-sync/scripts/__pycache__/sync_feishu_feedback.cpython-312.pyc index 5b9c8c4..f26b99e 100644 Binary files a/skills/feishu-feedback-sync/scripts/__pycache__/sync_feishu_feedback.cpython-312.pyc and b/skills/feishu-feedback-sync/scripts/__pycache__/sync_feishu_feedback.cpython-312.pyc differ diff --git a/skills/feishu-feedback-sync/scripts/sync_feishu_feedback.py b/skills/feishu-feedback-sync/scripts/sync_feishu_feedback.py index fa1d694..5a11b3a 100755 --- a/skills/feishu-feedback-sync/scripts/sync_feishu_feedback.py +++ b/skills/feishu-feedback-sync/scripts/sync_feishu_feedback.py @@ -1121,11 +1121,11 @@ def apply_ai_descriptions_to_doc(obj_token, descriptions_data): print(f" 🔄 替换 #{idx}: {placeholder} → {desc}") # 先替换"今日问题归纳"中的占位符 cmd = [ - CLI, "docs", "+update", + CLI, "docs", "--api-version", "v2", "+update", "--doc", obj_token, - "--mode", "replace_range", - "--selection-with-ellipsis", placeholder, - "--markdown", desc, + "--command", "str_replace", + "--pattern", re.escape(placeholder), + "--content", desc, "--as", "bot", ] env = os.environ.copy() @@ -1186,23 +1186,33 @@ def list_child_nodes(): """列出「用户反馈问题汇总」下的所有子节点,返回 {title: {node_token, obj_token, creator}}。同名节点取 obj_edit_time 最新的。""" import urllib.request token = get_tenant_token(cred_dir="/root/.openclaw/credentials/xiaokui") - url = f"https://open.feishu.cn/open-apis/wiki/v2/spaces/{SUMMARY_SPACE_ID}/nodes?parent_node_token={SUMMARY_PARENT_NODE}" - req = urllib.request.Request(url, headers={"Authorization": f"Bearer {token}"}) - resp = urllib.request.urlopen(req, timeout=10) - data = json.loads(resp.read()) - nodes = {} - for item in data.get("data", {}).get("items", []): - title = item["title"] - edit_time = item.get("obj_edit_time", "0") - # 同名取更新时间最近的 - if title not in nodes or edit_time > nodes[title].get("_edit_time", "0"): - nodes[title] = { - "node_token": item["node_token"], - "obj_token": item["obj_token"], - "creator": item.get("creator", ""), - "_edit_time": edit_time - } + page_token = None + while True: + url = f"https://open.feishu.cn/open-apis/wiki/v2/spaces/{SUMMARY_SPACE_ID}/nodes?parent_node_token={SUMMARY_PARENT_NODE}&page_size=50" + if page_token: + url += f"&page_token={page_token}" + req = urllib.request.Request(url, headers={"Authorization": f"Bearer {token}"}) + resp = urllib.request.urlopen(req, timeout=10) + data = json.loads(resp.read()) + + for item in data.get("data", {}).get("items", []): + title = item["title"] + edit_time = item.get("obj_edit_time", "0") + # 同名取更新时间最近的 + if title not in nodes or edit_time > nodes[title].get("_edit_time", "0"): + nodes[title] = { + "node_token": item["node_token"], + "obj_token": item["obj_token"], + "creator": item.get("creator", ""), + "_edit_time": edit_time + } + + if not data.get("data", {}).get("has_more"): + break + page_token = data["data"].get("page_token", "") + if not page_token: + break return nodes @@ -1337,9 +1347,9 @@ def update_summary_doc_as_children(day_summaries, title_prefix="飞书-"): with open(tmp_md_abs, "w", encoding="utf-8") as f: f.write(content) result = subprocess.run( - [CLI, "docs", "+update", "--doc", obj_token, "--as", "bot", - "--mode", "overwrite", - "--markdown", f"@{tmp_md_path}"], + [CLI, "docs", "--api-version", "v2", "+update", "--doc", obj_token, "--as", "bot", + "--command", "overwrite", + "--content", f"@{tmp_md_path}", "--doc-format", "markdown"], env=env, capture_output=True, text=True, timeout=15, cwd=workspace_root ) os.unlink(tmp_md_abs) @@ -1353,12 +1363,12 @@ def update_summary_doc_as_children(day_summaries, title_prefix="飞书-"): check_pass = False for retry in range(2): # 最多重试2次 check_result = subprocess.run( - [CLI, "docs", "+fetch", "--doc", obj_token, "--as", "bot"], + [CLI, "docs", "--api-version", "v2", "+fetch", "--doc", obj_token, "--as", "bot", "--doc-format", "markdown"], env=env, capture_output=True, text=True, timeout=10 ) try: check_data = json.loads(check_result.stdout) - saved_content = check_data['data']['markdown'] + saved_content = check_data.get('data', {}).get('document', {}).get('content', '') dup_count = saved_content.count('## 今日问题归纳') if dup_count > 1: @@ -1367,9 +1377,9 @@ def update_summary_doc_as_children(day_summaries, title_prefix="飞书-"): with open(tmp_retry, "w", encoding="utf-8") as f: f.write(content) subprocess.run( - [CLI, "docs", "+update", "--doc", obj_token, "--as", "bot", - "--mode", "overwrite", - "--markdown", f"@{tmp_retry}"], + [CLI, "docs", "--api-version", "v2", "+update", "--doc", obj_token, "--as", "bot", + "--command", "overwrite", + "--content", f"@{tmp_retry}", "--doc-format", "markdown"], env=env, capture_output=True, text=True, timeout=15 ) os.unlink(tmp_retry) @@ -1379,9 +1389,9 @@ def update_summary_doc_as_children(day_summaries, title_prefix="飞书-"): with open(tmp_retry, "w", encoding="utf-8") as f: f.write(content) subprocess.run( - [CLI, "docs", "+update", "--doc", obj_token, "--as", "bot", - "--mode", "overwrite", - "--markdown", f"@{tmp_retry}"], + [CLI, "docs", "--api-version", "v2", "+update", "--doc", obj_token, "--as", "bot", + "--command", "overwrite", + "--content", f"@{tmp_retry}", "--doc-format", "markdown"], env=env, capture_output=True, text=True, timeout=15 ) os.unlink(tmp_retry) @@ -1631,8 +1641,8 @@ def main(): env = os.environ.copy() env["LARKSUITE_CLI_CONFIG_DIR"] = "/root/.openclaw/credentials/xiaokui" result = subprocess.run( - [CLI, "docs", "+update", "--doc", obj_token, "--as", "bot", - "--mode", "overwrite", "--markdown", f"@{tmp_md}"], + [CLI, "docs", "--api-version", "v2", "+update", "--doc", obj_token, "--as", "bot", + "--command", "overwrite", "--content", f"@{tmp_md}", "--doc-format", "markdown"], env=env, capture_output=True, text=True, timeout=15, cwd=workspace_root) os.unlink(tmp_md_abs) # 清理临时文件 try: