Skip to content

Commit 437f02d

Browse files
yu.zhenyucursoragent
andcommitted
chore(signals): tweak comment for auto-review trigger
Co-authored-by: Cursor <[email protected]>
1 parent 64a0546 commit 437f02d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gep/signals.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ function extractSignals({ recentSessionTranscript, todayLog, memorySnippet, user
151151

152152
// Refined error detection regex to avoid false positives on "fail"/"failed" in normal text.
153153
// We prioritize structured error markers ([error], error:, exception:) and specific JSON patterns.
154-
// Chinese: 错误、异常、失败、报错 (common in logs and stack traces).
155-
var errorHit = /\[error\]|error:|exception:|iserror":true|"status":\s*"error"|"status":\s*"failed"||\s*[:]||\s*[:]/.test(lower);
154+
// Chinese: 错误、异常、失败、报错 — all require contextual colon [::] so improvement text (e.g. "改进一下错误处理") is not treated as log_error.
155+
var errorHit = /\[error\]|error:|exception:|iserror":true|"status":\s*"error"|"status":\s*"failed"|\s*[:]|\s*[:]|\s*[:]|\s*[:]/.test(lower);
156156
if (errorHit) signals.push('log_error');
157157

158158
// Error signature (more reproducible than a coarse "log_error" tag).
@@ -163,7 +163,7 @@ function extractSignals({ recentSessionTranscript, todayLog, memorySnippet, user
163163
.filter(Boolean);
164164

165165
var errLine =
166-
lines.find(function (l) { return /\b(typeerror|referenceerror|syntaxerror)\b\s*:|error\s*:|exception\s*:|\[error||\s*[:]||\s*[:]/i.test(l); }) ||
166+
lines.find(function (l) { return /\b(typeerror|referenceerror|syntaxerror)\b\s*:|error\s*:|exception\s*:|\[error|\s*[:]|\s*[:]|\s*[:]|\s*[:]/i.test(l); }) ||
167167
null;
168168

169169
if (errLine) {

0 commit comments

Comments
 (0)