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 <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim 2026-02-23 02:42:45 +09:00
parent 0dc5f56af4
commit b709fa8e83

View File

@ -82,7 +82,7 @@ export function createSessionHooks(args: {
isHookEnabled("preemptive-compaction") && isHookEnabled("preemptive-compaction") &&
pluginConfig.experimental?.preemptive_compaction pluginConfig.experimental?.preemptive_compaction
? safeHook("preemptive-compaction", () => ? safeHook("preemptive-compaction", () =>
createPreemptiveCompactionHook(ctx, pluginConfig, modelCacheState as any)) createPreemptiveCompactionHook(ctx, pluginConfig, modelCacheState))
: null : null
const sessionRecovery = isHookEnabled("session-recovery") const sessionRecovery = isHookEnabled("session-recovery")
@ -175,7 +175,7 @@ export function createSessionHooks(args: {
const anthropicContextWindowLimitRecovery = isHookEnabled("anthropic-context-window-limit-recovery") const anthropicContextWindowLimitRecovery = isHookEnabled("anthropic-context-window-limit-recovery")
? safeHook("anthropic-context-window-limit-recovery", () => ? safeHook("anthropic-context-window-limit-recovery", () =>
createAnthropicContextWindowLimitRecoveryHook(ctx, { experimental: pluginConfig.experimental })) createAnthropicContextWindowLimitRecoveryHook(ctx, { experimental: pluginConfig.experimental, pluginConfig }))
: null : null
const autoUpdateChecker = isHookEnabled("auto-update-checker") const autoUpdateChecker = isHookEnabled("auto-update-checker")