MCPcopy Create free account
hub / github.com/anomalyco/opencode / list

Function list

packages/opencode/src/control-plane/adapters/worktree.ts:61–78  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

59 )
60 },
61 async list(context) {
62 const { AppRuntime, Worktree } = await loadWorktree()
63 const ctx = requireInstance(context)
64 return (
65 await AppRuntime.runPromise(
66 provideContext(
67 Worktree.Service.use((svc) => svc.list()),
68 context,
69 ),
70 )
71 ).map((info) => ({
72 type: "worktree",
73 name: info.name,
74 branch: info.branch,
75 directory: info.directory,
76 projectID: ctx.project.id,
77 }))
78 },
79 async remove(info, context) {
80 const { AppRuntime, Worktree } = await loadWorktree()
81 const config = decodeWorktreeConfig(info)

Callers 1

workspace.tsFile · 0.50

Calls 5

loadWorktreeFunction · 0.85
requireInstanceFunction · 0.85
provideContextFunction · 0.85
listMethod · 0.65
useMethod · 0.45

Tested by

no test coverage detected