MCPcopy Create free account
hub / github.com/AI45Lab/Code / is_yolo

Method is_yolo

core/src/hitl.rs:87–93  ·  view source on GitHub ↗

Check if a tool should skip confirmation (YOLO lane check) Returns true if the tool's lane is in YOLO mode, meaning it should be auto-approved even when `PermissionPolicy` returns `Ask`.

(&self, tool_name: &str)

Source from the content-addressed store, hash-verified

85 /// Returns true if the tool's lane is in YOLO mode, meaning it should
86 /// be auto-approved even when `PermissionPolicy` returns `Ask`.
87 pub fn is_yolo(&self, tool_name: &str) -> bool {
88 if !self.enabled {
89 return true; // HITL disabled = everything auto-approved
90 }
91 let lane = SessionLane::from_tool_name(tool_name);
92 self.yolo_lanes.contains(&lane)
93 }
94
95 /// Check if a tool requires confirmation
96 ///

Callers 1

requires_confirmationMethod · 0.80

Calls 1

containsMethod · 0.80

Tested by

no test coverage detected