feat(core): split vcs backend selection
This commit is contained in:
parent
8ede176244
commit
ef1c76a2bf
6 changed files with 125 additions and 32 deletions
|
|
@ -4,12 +4,16 @@ import { AbsolutePath } from "@opencode-ai/core/schema"
|
|||
import { Effect, Layer } from "effect"
|
||||
import { tmpdir } from "./tmpdir"
|
||||
|
||||
export function location(ref: Location.Ref, input: { projectDirectory?: AbsolutePath; vcs?: Project.Vcs } = {}) {
|
||||
export function location(
|
||||
ref: Location.Ref,
|
||||
input: { projectDirectory?: AbsolutePath; vcs?: Project.Vcs; vcsBackend?: Project.Vcs } = {},
|
||||
) {
|
||||
return {
|
||||
directory: ref.directory,
|
||||
workspaceID: ref.workspaceID,
|
||||
project: { id: Project.ID.global, directory: input.projectDirectory ?? ref.directory },
|
||||
vcs: input.vcs,
|
||||
vcsBackend: input.vcsBackend ?? input.vcs,
|
||||
} satisfies Location.Interface
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue