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

Method list_skills

crates/opencode-tui/src/api.rs:477–488  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

475 }
476
477 pub fn list_skills(&self) -> anyhow::Result<Vec<String>> {
478 let url = format!("{}/skill", self.base_url);
479 let response = self.client.get(&url).send()?;
480
481 if !response.status().is_success() {
482 let status = response.status();
483 let text = response.text().unwrap_or_default();
484 anyhow::bail!("Failed to list skills: {} - {}", status, text);
485 }
486
487 Ok(response.json::<Vec<String>>()?)
488 }
489
490 pub fn get_mcp_status(&self) -> anyhow::Result<Vec<McpStatusInfo>> {
491 let url = format!("{}/mcp", self.base_url);

Callers 1

Calls 4

sendMethod · 0.45
getMethod · 0.45
statusMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected