diff --git a/src/hooks/anthropic-context-window-limit-recovery/empty-content-recovery-sdk.ts b/src/hooks/anthropic-context-window-limit-recovery/empty-content-recovery-sdk.ts index f95a0b51..28154ad8 100644 --- a/src/hooks/anthropic-context-window-limit-recovery/empty-content-recovery-sdk.ts +++ b/src/hooks/anthropic-context-window-limit-recovery/empty-content-recovery-sdk.ts @@ -20,13 +20,10 @@ function messageHasContentFromSDK(message: SDKMessage): boolean { const parts = message.parts if (!parts || parts.length === 0) return false - let hasIgnoredParts = false - for (const part of parts) { const type = part.type if (!type) continue if (IGNORE_TYPES.has(type)) { - hasIgnoredParts = true continue } diff --git a/src/hooks/anthropic-context-window-limit-recovery/message-builder.ts b/src/hooks/anthropic-context-window-limit-recovery/message-builder.ts index 17f24220..ea6a6a7f 100644 --- a/src/hooks/anthropic-context-window-limit-recovery/message-builder.ts +++ b/src/hooks/anthropic-context-window-limit-recovery/message-builder.ts @@ -32,13 +32,10 @@ function messageHasContentFromSDK(message: SDKMessage): boolean { const parts = message.parts if (!parts || parts.length === 0) return false - let hasIgnoredParts = false - for (const part of parts) { const type = part.type if (!type) continue if (IGNORE_TYPES.has(type)) { - hasIgnoredParts = true continue }