@wu529778790/open-im 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -71,15 +71,12 @@ export async function sendThinkingMessage(chatId, replyToMessageId, toolId = 'cl
|
|
|
71
71
|
await bot.telegram.editMessageText(Number(chatId), msg.message_id, undefined, formatMessage('正在思考...', 'thinking', '请稍候', toolId), { reply_markup: buildStopKeyboard(msg.message_id) });
|
|
72
72
|
return String(msg.message_id);
|
|
73
73
|
}
|
|
74
|
-
//
|
|
74
|
+
// 检查错误是否可忽略(只忽略真正无害的错误)
|
|
75
75
|
function isIgnorableError(err) {
|
|
76
76
|
if (err && typeof err === 'object' && 'message' in err) {
|
|
77
77
|
const msg = String(err.message);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
msg.includes('can\'t parse entities') ||
|
|
81
|
-
msg.includes('message to edit not found') ||
|
|
82
|
-
msg.includes('message is not modified'));
|
|
78
|
+
// 只忽略 "not modified" 类错误(内容没有变化)
|
|
79
|
+
return msg.includes('not modified') || msg.includes('message is not modified');
|
|
83
80
|
}
|
|
84
81
|
return false;
|
|
85
82
|
}
|