From 7d978fc3b680fc952f9242a2486b7f744f0ed107 Mon Sep 17 00:00:00 2001 From: "koalazf.99" Date: Thu, 7 Aug 2025 15:56:07 +0800 Subject: [PATCH] fix shell tool regex pattern for git commit messages Co-authored-by: Qwen-Coder --- packages/core/src/tools/shell.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/tools/shell.ts b/packages/core/src/tools/shell.ts index 7562b748..0713585f 100644 --- a/packages/core/src/tools/shell.ts +++ b/packages/core/src/tools/shell.ts @@ -406,7 +406,7 @@ Co-authored-by: ${gitCoAuthorSettings.name} <${gitCoAuthorSettings.email}>`; // Handle different git commit patterns // Match -m "message" or -m 'message' - const messagePattern = /(-m\s+)(['"])((?:[^\\]|\\.)*)(\2)/; + const messagePattern = /(-m\s+)(['"])((?:\\.|[^\\])*?)(\2)/; const match = command.match(messagePattern); if (match) {