fix: include pre-answer callback debug in patch flow / 將 pre-answer callback debug 納入 patch 流程
This commit is contained in:
@@ -53,8 +53,9 @@ if 'import fsSync from "node:fs";' not in bot_text:
|
||||
old_raw = 'const data = (callback.data ?? "").trim();'
|
||||
new_raw = '''const data = (callback.data ?? "").trim();
|
||||
const replyEndDebugPath = path.join(process.env.OPENCLAW_STATE_DIR || path.join(process.env.HOME || "", ".openclaw"), "reply-end-debug.log");
|
||||
try { fsSync.appendFileSync(replyEndDebugPath, `[pre-answer] ${new Date().toISOString()} data=${data || "<empty>"}\n`); } catch {}
|
||||
try { fsSync.appendFileSync(replyEndDebugPath, `[raw] ${new Date().toISOString()} data=${data || "<empty>"}\n`); } catch {}'''
|
||||
if old_raw in bot_text and 'reply-end-debug.log' not in bot_text:
|
||||
if old_raw in bot_text and '[pre-answer]' not in bot_text:
|
||||
bot_text = bot_text.replace(old_raw, new_raw, 1)
|
||||
|
||||
old_click = '''const chatId = callbackMessage.chat.id;
|
||||
|
||||
Reference in New Issue
Block a user