Fix Windows dead-code: gate TUI_SESSION on cfg(unix)
`TUI_SESSION` is only referenced by the `#[cfg(unix)]` TUI (chat.rs), so the Windows target sees it as unused and `-D dead-code` fails the Clippy job. Suppress the lint on non-Unix targets only — the same mechanism backend.rs/provider.rs use — rather than module-wide, since the rest of permissions.rs is live on every platform (main.rs/ACP uses it on Windows). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014f6zfWDT1v5TeSpA29rEyx
Claude committed
Jul 2, 2026 at 12:08 UTC
a4759839b3ee96b39fbe4e819f5db0d65a14c834
1 file changed
+3
src/permissions.rs
+3
index c45c6b9..172b6ee 100644
--- a/src/permissions.rs
+++ b/src/permissions.rs
@@ -34,6 +34,9 @@ use std::sync::{Mutex, OnceLock};
use crate::settings::{self, PermissionMode};
/// Session key used by the interactive TUI, which only ever has one session.
+/// The TUI (`chat.rs`) is `#[cfg(unix)]`, so this is its only consumer and is
+/// dead on non-Unix targets — the rest of the module is used on all platforms.
+#[cfg_attr(not(unix), allow(dead_code))]
pub const TUI_SESSION: &str = "tui";
/// How risky a tool is to run without the user's sign-off.