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

Function get_disabled_tools

crates/opencode-tool/src/task.rs:216–228  ·  view source on GitHub ↗
(
    agent: Option<&AgentInfo>,
    _load_skills: Option<&Vec<String>>,
)

Source from the content-addressed store, hash-verified

214}
215
216fn get_disabled_tools(
217 agent: Option<&AgentInfo>,
218 _load_skills: Option<&Vec<String>>,
219) -> Vec<String> {
220 let mut disabled = vec!["todowrite".to_string(), "todoread".to_string()];
221
222 let has_task_permission = agent.map(|a| a.can_use_task).unwrap_or(false);
223 if !has_task_permission {
224 disabled.push("task".to_string());
225 }
226
227 disabled
228}
229
230fn parse_model_ref(raw: Option<&str>) -> AgentModel {
231 let Some(raw) = raw else {

Callers 1

executeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected