(context)
| 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) |
no test coverage detected