diff --git a/src-tauri/src/commands/ai/audit/mod.rs b/src-tauri/src/commands/ai/audit/mod.rs index 4353c1d..88c87d2 100644 --- a/src-tauri/src/commands/ai/audit/mod.rs +++ b/src-tauri/src/commands/ai/audit/mod.rs @@ -326,7 +326,7 @@ pub(crate) async fn process_tool_calls( .clone(); let allowed_guard = allowed_snapshot.read().await.clone(); // 「信任所有目录」总开关(KV df-ai-path-auth-bypass,默认关):开启后白名单外路径不再挂起 - // 授权弹窗(NeedsAuth→直接放行),黑名单 Denied 仍硬拒(凭据目录自保护不受影响)。 + // 授权弹窗(NeedsAuth 时直接放行),黑名单 Denied 仍硬拒(凭据目录自保护不受影响)。 // 读取失败按关处理(fail-safe,默认行为不变);前端设置页改后下一轮 process_tool_calls 即生效。 let path_auth_bypass = app_handle .state::() diff --git a/src-tauri/src/commands/ai/audit/path_auth.rs b/src-tauri/src/commands/ai/audit/path_auth.rs index 5dedd9c..d2ed7b4 100644 --- a/src-tauri/src/commands/ai/audit/path_auth.rs +++ b/src-tauri/src/commands/ai/audit/path_auth.rs @@ -110,7 +110,7 @@ pub(crate) fn check_file_tool_auth( mod tests { use super::*; - /// bypass 开:白名单外路径 NeedsAuth → 直接 Authorized;bypass 关:行为不变(仍 NeedsAuth)。 + /// bypass 开:白名单外路径 NeedsAuth 时直接 Authorized;bypass 关:行为不变(仍 NeedsAuth)。 #[test] fn test_bypass_on_needs_auth_becomes_authorized() { let allowed = crate::state::AllowedDirs::default();