From b709fa8e833a6ccd2326731bb68daaff0c12541d Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Mon, 23 Feb 2026 02:42:45 +0900 Subject: [PATCH] fix(plugin/hooks): remove unnecessary as any cast Remove as any from modelCacheState parameter Structural typing works without explicit cast Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- src/plugin/hooks/create-session-hooks.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugin/hooks/create-session-hooks.ts b/src/plugin/hooks/create-session-hooks.ts index 411d0fc3..daa4e12e 100644 --- a/src/plugin/hooks/create-session-hooks.ts +++ b/src/plugin/hooks/create-session-hooks.ts @@ -82,7 +82,7 @@ export function createSessionHooks(args: { isHookEnabled("preemptive-compaction") && pluginConfig.experimental?.preemptive_compaction ? safeHook("preemptive-compaction", () => - createPreemptiveCompactionHook(ctx, pluginConfig, modelCacheState as any)) + createPreemptiveCompactionHook(ctx, pluginConfig, modelCacheState)) : null const sessionRecovery = isHookEnabled("session-recovery") @@ -175,7 +175,7 @@ export function createSessionHooks(args: { const anthropicContextWindowLimitRecovery = isHookEnabled("anthropic-context-window-limit-recovery") ? safeHook("anthropic-context-window-limit-recovery", () => - createAnthropicContextWindowLimitRecoveryHook(ctx, { experimental: pluginConfig.experimental })) + createAnthropicContextWindowLimitRecoveryHook(ctx, { experimental: pluginConfig.experimental, pluginConfig })) : null const autoUpdateChecker = isHookEnabled("auto-update-checker")