mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-06 07:29:42 +02:00
refactor: pre-compile regex patterns and remove dead code
- task.ts: Cache completion phrase regex in constructor instead of re-creating on every checkCompletion() call. Add escapeRegex helper for safe RegExp construction from user-provided phrases. - ralph-tracker.ts: Remove commented-out COMPLETION_SIGNAL_PATTERN Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -209,9 +209,6 @@ const ALL_COUNT_PATTERN = /all\s+(\d+)\s+(?:tasks?|files?|items?)/i;
|
||||
*/
|
||||
const TASK_DONE_PATTERN = /(?:task|item|todo)\s*(?:#?\d+|"\s*[^"]+\s*")?\s*(?:is\s+)?(?:done|completed?|finished)|(?:completed?|done|finished)\s+(?:task|item)\s*(?:#?\d+)?|marking\s+(?:.*?\s+)?(?:as\s+)?completed?|marked\s+(?:.*?\s+)?(?:as\s+)?completed?/i;
|
||||
|
||||
// Generic completion signal pattern - commented out due to false positive risk
|
||||
// const COMPLETION_SIGNAL_PATTERN = /^(?:done|completed?|finished|all\s+set)!?\s*$/i;
|
||||
|
||||
// ---------- Utility Patterns ----------
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user