From aedc58833ff71388936ff0b3dfc4ad15241e60d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=AB=E6=88=91=E5=B0=8F=E6=9D=A8=E5=90=8C=E5=AD=A6?= <188421097+HunYiSage@users.noreply.github.com> Date: Thu, 24 Sep 2026 10:34:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bash=20=E8=B6=85=E6=97=B6=E6=AD=A3?= =?UTF-8?q?=E5=88=99=E6=AF=8F=E6=AC=A1=E5=85=8B=E9=9A=86=EF=BC=8C=E9=81=BF?= =?UTF-8?q?=E5=85=8D=20lastIndex=20=E6=AE=8B=E7=95=99=20(#35)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- lib/core.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/core.js b/lib/core.js index 367ae55..6c6c926 100644 --- a/lib/core.js +++ b/lib/core.js @@ -2229,6 +2229,7 @@ const NEW_TOOL_PATCHES = [ // 600000000000000)。 // 现在的做法:锚在 bash-sandbox 行内,`[^\n]*` 必须吃到行尾 —— 这样上一次 // 追加的注记会被整体重写而不是再叠一层,数值也不再有可再匹配的"前缀"。 + // 这条是带 g 的模块级正则,匹配和写入都要克隆后再用,否则 lastIndex 残留会导致永远 pending。 pattern: /(name: '@deepseek-ai\/dsh-bash-sandbox'[\s\S]*?\n {8}timeoutMs: )6[0-9]+[^\n]*/g, replace: "$1600000 // [dsh-purge] bash timeout raised", },