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

Function list_worktrees

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

Source from the content-addressed store, hash-verified

4164}
4165
4166async fn list_worktrees() -> Json<Vec<WorktreeInfo>> {
4167 let cwd = std::env::current_dir().unwrap_or_default();
4168 let worktrees = worktree::list_worktrees(&cwd).unwrap_or_default();
4169 Json(worktrees.into_iter().map(|w| w.into()).collect())
4170}
4171
4172#[derive(Debug, Deserialize)]
4173pub struct CreateWorktreeRequest {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected