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

Function list_commands

crates/opencode-server/src/routes.rs:4368–4386  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4366}
4367
4368async fn list_commands() -> Result<Json<Vec<CommandInfo>>> {
4369 Ok(Json(vec![
4370 CommandInfo {
4371 id: "build".to_string(),
4372 name: "Build".to_string(),
4373 description: Some("Build the project".to_string()),
4374 },
4375 CommandInfo {
4376 id: "test".to_string(),
4377 name: "Test".to_string(),
4378 description: Some("Run tests".to_string()),
4379 },
4380 CommandInfo {
4381 id: "lint".to_string(),
4382 name: "Lint".to_string(),
4383 description: Some("Run linter".to_string()),
4384 },
4385 ]))
4386}
4387
4388#[derive(Debug, Serialize)]
4389struct AgentInfo {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected