Skip to content

Commit c88046d

Browse files
authored
commit (#3235)
1 parent feb6eae commit c88046d

File tree

1 file changed

+9
-3
lines changed
  • crates/chat-cli/src/cli/chat/tools/execute

1 file changed

+9
-3
lines changed

crates/chat-cli/src/cli/chat/tools/execute/mod.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,10 @@ mod tests {
288288
use std::collections::HashMap;
289289

290290
use super::*;
291-
use crate::cli::agent::{Agent, ToolSettingTarget};
291+
use crate::cli::agent::{
292+
Agent,
293+
ToolSettingTarget,
294+
};
292295

293296
#[test]
294297
fn test_requires_acceptance_for_readonly_commands() {
@@ -620,7 +623,6 @@ mod tests {
620623

621624
#[tokio::test]
622625
async fn test_eval_perm_denied_commands_invalid_regex() {
623-
624626
let os = Os::new().await.unwrap();
625627
let agent = Agent {
626628
name: "test_agent".to_string(),
@@ -640,7 +642,11 @@ mod tests {
640642
// Test command that should be denied by the pattern
641643
let pwd_cmd = serde_json::from_value::<ExecuteCommand>(serde_json::json!({"command": "pwd",})).unwrap();
642644
let res = pwd_cmd.eval_perm(&os, &agent);
643-
assert!(matches!(res, PermissionEvalResult::Deny(_)), "Invalid regex should deny all commands, got {:?}", res);
645+
assert!(
646+
matches!(res, PermissionEvalResult::Deny(_)),
647+
"Invalid regex should deny all commands, got {:?}",
648+
res
649+
);
644650
}
645651

646652
#[tokio::test]

0 commit comments

Comments
 (0)