diff --git a/.claude/optimization-todos.md b/.claude/optimization-todos.md index 72c70446..24d7a556 100644 --- a/.claude/optimization-todos.md +++ b/.claude/optimization-todos.md @@ -132,18 +132,18 @@ Each item has specific file:line references and expected impact estimates. | Item | Status | Completed By | Notes | |------|--------|--------------|-------| -| 1 | ☐ Pending | | | -| 2 | ☐ Pending | | | -| 3 | ☐ Pending | | | +| 1 | ✅ Done | Claude | BufferAccumulator in session.ts, respawn-controller.ts | +| 2 | ✅ Done | Claude | Already had lastIndex resets in place | +| 3 | ✅ Done | Claude | BufferAccumulator auto-trims, no manual limits needed | | 4 | ☐ Pending | | | | 5 | ☐ Pending | | | | 6 | ☐ Pending | | | | 7 | ☐ Pending | | | | 8 | ☐ Pending | | | -| 9 | ☐ Pending | | | +| 9 | ✅ Done | Claude | Removed ANSI_ESCAPE_PATTERN, WHITESPACE_PATTERN | | 10 | ☐ Pending | | | | 11 | ☐ Pending | | | | 12 | ☐ Pending | | | -| 13 | ☐ Pending | | | +| 13 | ☐ Pending | | Not unused - used by CLI | | 14 | ☐ Pending | | | | 15 | ☐ Pending | | | diff --git a/src/respawn-controller.ts b/src/respawn-controller.ts index dbb779a0..ece2a267 100644 --- a/src/respawn-controller.ts +++ b/src/respawn-controller.ts @@ -43,20 +43,7 @@ const MAX_RESPAWN_BUFFER_SIZE = 1024 * 1024; // 1MB */ const RESPAWN_BUFFER_TRIM_SIZE = 512 * 1024; // 512KB -// ========== Pre-compiled Regex Patterns ========== - -/** - * Matches ANSI escape codes for terminal control sequences. - * Used to strip formatting before pattern matching. - * @deprecated Currently unused but kept for potential future use - */ -const ANSI_ESCAPE_PATTERN = /\x1b\[[0-9;]*[HJKmsu?lh]/g; - -/** - * Matches whitespace sequences for normalization. - * @deprecated Currently unused but kept for potential future use - */ -const WHITESPACE_PATTERN = /\s+/g; +// ========== Constants ========== /** * The definitive "ready for input" indicator.