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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user