fix: 1.1.45 地区闸门不再因单个 CDN 噪声 IP 误拦第二轮。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
叫我小杨同学andCursor committed 2026-10-02 02:35:24 +08:00
1 parent 11aa390cc3
commit 8ba88623a0
4 files changed
+69 -4

No files matched your search

+40
View File
@@ -3750,6 +3750,46 @@ const NEW_TOOL_PATCHES = [
],
markers: ["[dsh-purge] guard undefined messages"],
},
{
id: 68,
name: "SYSTEM_NODES_CONTENT_GUARD",
layer: "代码",
layer_en: "Code",
desc: "systemNodes/derive 对缺 content 兜底,避免回退后第二轮 gateway/internal / guard missing message content",
file: ["agent-loop", "session"],
replacements: [
{
pattern:
"function textOf(message) {\n" +
"\tconst [block] = message.content;\n" +
"\treturn message.content.length === 1 && block?.type === \"text\" ? block.text : void 0;\n" +
"}",
replace:
"function textOf(message) {\n" +
"\tconst content = Array.isArray(message?.content) ? message.content : [];\n" +
"\tconst [block] = content;\n" +
"\treturn content.length === 1 && block?.type === \"text\" ? block.text : void 0; // [dsh-purge] guard undefined content\n" +
"}",
},
{
pattern: "\t\t\tconst text = event.data.message.content.length === 0 ? \"\" : textOf(event.data.message);",
replace:
"\t\t\tconst content = event.data?.message?.content;\n" +
"\t\t\tconst text = !Array.isArray(content) || content.length === 0 ? \"\" : textOf(event.data.message); // [dsh-purge] guard undefined content",
},
{
pattern: "\t\t\tif (event.data.message.content.length === 0) return null;",
replace:
"\t\t\tif (!Array.isArray(event.data?.message?.content) || event.data.message.content.length === 0) return null; // [dsh-purge] guard undefined content",
},
{
pattern: "\t\t\tif (firstAttempt) for (const message of decision.messages) this.session.append(\"user/message\", message, { surfaceOp: \"append\" });",
replace:
"\t\t\tif (firstAttempt) for (const message of (Array.isArray(decision.messages) ? decision.messages : [])) this.session.append(\"user/message\", message, { surfaceOp: \"append\" }); // [dsh-purge] guard undefined messages",
},
],
markers: ["[dsh-purge] guard undefined content"],
},
{
id: 56,
name: "REWIND_HIDE_CUT_ONLY",