fix(ext): correct anti-trigger logic for code/quote blocks + blocker parsing

- trigger-detector: strip code blocks before pattern matching
  (triggers outside code blocks now fire)
- trigger-detector: use code-stripped content for quote and
  reported-speech anti-trigger checks
- state-injector: strip markdown list prefix from blocker text

Tests: 27/27 trigger-detector, 17/17 state-injector passing
This commit is contained in:
张宗平
2026-06-10 20:31:56 +08:00
parent 0dd652948e
commit 0869060284
2 changed files with 21 additions and 24 deletions
@@ -53,7 +53,10 @@ export function readGoalState(cwd: string): GoalState | null {
const passedCriteria = countCheckedBoxes(criteriaSection);
const blockerSection = extractSection(content, "Blocked");
const blocker = blockerSection.trim() || undefined;
const blockerRaw = blockerSection.trim() || undefined;
const blocker = blockerRaw
? blockerRaw.replace(/^[-*]\s*/, "").trim() || undefined
: undefined;
const progressSection = extractSection(content, "Progress Log");
const progressLog = extractIterations(progressSection);