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 9c47d652..1482c154 100644 --- a/src/hooks/anthropic-context-window-limit-recovery/message-builder.ts +++ b/src/hooks/anthropic-context-window-limit-recovery/message-builder.ts @@ -42,8 +42,6 @@ function messageHasContentFromSDK(message: SDKMessage): boolean { } if (TOOL_TYPES.has(type)) return true - - return true } return false diff --git a/src/shared/opencode-http-api.ts b/src/shared/opencode-http-api.ts index 84eb3260..69942afc 100644 --- a/src/shared/opencode-http-api.ts +++ b/src/shared/opencode-http-api.ts @@ -1,12 +1,9 @@ import { getServerBasicAuthHeader } from "./opencode-server-auth" import { log } from "./logger" +import { isRecord } from "./record-type-guard" type UnknownRecord = Record -function isRecord(value: unknown): value is UnknownRecord { - return typeof value === "object" && value !== null -} - function getInternalClient(client: unknown): UnknownRecord | null { if (!isRecord(client)) { return null