True when a skill still uses the legacy whitespace-only tool list.
(&self)
| 226 | |
| 227 | /// True when a skill still uses the legacy whitespace-only tool list. |
| 228 | pub fn uses_legacy_allowed_tools_syntax(&self) -> bool { |
| 229 | let Some(allowed) = &self.allowed_tools else { |
| 230 | return false; |
| 231 | }; |
| 232 | !allowed.contains(',') |
| 233 | && ToolPermission::parse(allowed).is_none() |
| 234 | && allowed.split_whitespace().count() > 1 |
| 235 | } |
| 236 | |
| 237 | /// Check if a tool is allowed by this skill |
| 238 | pub fn is_tool_allowed(&self, tool_name: &str) -> bool { |