From f587bb56c52ac9e2bbdb85bdd3643a423642fd93 Mon Sep 17 00:00:00 2001 From: echobt Date: Mon, 2 Feb 2026 06:04:35 +0000 Subject: [PATCH] fix(plugins): allow dead_code for unused hook fields The hook registry stores hooks but the hook fields are not yet read as the plugin system is work in progress. Adding allow(dead_code) to silence clippy warnings while keeping the API intact. --- src/cortex-plugins/src/hooks/registry.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/cortex-plugins/src/hooks/registry.rs b/src/cortex-plugins/src/hooks/registry.rs index aaf46e48..1bc77c43 100644 --- a/src/cortex-plugins/src/hooks/registry.rs +++ b/src/cortex-plugins/src/hooks/registry.rs @@ -99,6 +99,7 @@ pub(crate) struct RegisteredModalInjectHook { } /// Registered hook for toast notifications. +#[allow(dead_code)] pub(crate) struct RegisteredToastShowHook { pub plugin_id: String, pub hook: Arc, @@ -106,6 +107,7 @@ pub(crate) struct RegisteredToastShowHook { } /// Registered hook for TUI event subscription. +#[allow(dead_code)] pub(crate) struct RegisteredTuiEventSubscribeHook { pub plugin_id: String, pub hook: Arc, @@ -113,6 +115,7 @@ pub(crate) struct RegisteredTuiEventSubscribeHook { } /// Registered hook for TUI event dispatch. +#[allow(dead_code)] pub(crate) struct RegisteredTuiEventDispatchHook { pub plugin_id: String, pub hook: Arc, @@ -120,6 +123,7 @@ pub(crate) struct RegisteredTuiEventDispatchHook { } /// Registered hook for custom event emission. +#[allow(dead_code)] pub(crate) struct RegisteredCustomEventEmitHook { pub plugin_id: String, pub hook: Arc, @@ -127,6 +131,7 @@ pub(crate) struct RegisteredCustomEventEmitHook { } /// Registered hook for event interception. +#[allow(dead_code)] pub(crate) struct RegisteredEventInterceptHook { pub plugin_id: String, pub hook: Arc, @@ -134,6 +139,7 @@ pub(crate) struct RegisteredEventInterceptHook { } /// Registered hook for animation frames. +#[allow(dead_code)] pub(crate) struct RegisteredAnimationFrameHook { pub plugin_id: String, pub hook: Arc, @@ -141,6 +147,7 @@ pub(crate) struct RegisteredAnimationFrameHook { } /// Registered hook for command.execute.before. +#[allow(dead_code)] pub(crate) struct RegisteredCommandBeforeHook { pub plugin_id: String, pub hook: Arc, @@ -148,6 +155,7 @@ pub(crate) struct RegisteredCommandBeforeHook { } /// Registered hook for command.execute.after. +#[allow(dead_code)] pub(crate) struct RegisteredCommandAfterHook { pub plugin_id: String, pub hook: Arc, @@ -155,6 +163,7 @@ pub(crate) struct RegisteredCommandAfterHook { } /// Registered hook for input interception. +#[allow(dead_code)] pub(crate) struct RegisteredInputInterceptHook { pub plugin_id: String, pub hook: Arc, @@ -162,6 +171,7 @@ pub(crate) struct RegisteredInputInterceptHook { } /// Registered hook for session start. +#[allow(dead_code)] pub(crate) struct RegisteredSessionStartHook { pub plugin_id: String, pub hook: Arc, @@ -169,6 +179,7 @@ pub(crate) struct RegisteredSessionStartHook { } /// Registered hook for session end. +#[allow(dead_code)] pub(crate) struct RegisteredSessionEndHook { pub plugin_id: String, pub hook: Arc, @@ -176,6 +187,7 @@ pub(crate) struct RegisteredSessionEndHook { } /// Registered hook for focus change. +#[allow(dead_code)] pub(crate) struct RegisteredFocusChangeHook { pub plugin_id: String, pub hook: Arc,