MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / label

Method label

crates/opencode-tui/src/components/permission.rs:33–50  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

31
32impl PermissionType {
33 pub fn label(&self) -> &'static str {
34 match self {
35 PermissionType::ReadFile => "Read file",
36 PermissionType::WriteFile => "Write file",
37 PermissionType::Edit => "Edit file",
38 PermissionType::ExecuteCommand => "Execute command",
39 PermissionType::Bash => "Run shell command",
40 PermissionType::NetworkRequest => "Network request",
41 PermissionType::Glob => "Glob search",
42 PermissionType::Grep => "Grep search",
43 PermissionType::List => "List directory",
44 PermissionType::Task => "Task operation",
45 PermissionType::WebFetch => "Fetch web content",
46 PermissionType::WebSearch => "Web search",
47 PermissionType::CodeSearch => "Code search",
48 PermissionType::ExternalDirectory => "External directory access",
49 }
50 }
51
52 pub fn icon(&self) -> &'static str {
53 match self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected