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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user