(input: PatchInput)
| 331 | } |
| 332 | |
| 333 | function patchDir(input: PatchInput) { |
| 334 | if (input.global) return input.config ?? Global.Path.config |
| 335 | const git = input.vcs === "git" && input.worktree !== "/" |
| 336 | const root = git ? input.worktree : input.directory |
| 337 | return path.join(root, ".opencode") |
| 338 | } |
| 339 | |
| 340 | function patchName(kind: Kind): "opencode" | "tui" { |
| 341 | if (kind === "server") return "opencode" |