feat(core): add location-scoped config loading
This commit is contained in:
parent
5a5d981c4e
commit
9e556b0f6c
26 changed files with 727 additions and 195 deletions
12
packages/core/test/fixture/location.ts
Normal file
12
packages/core/test/fixture/location.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { Location } from "@opencode-ai/core/location"
|
||||
import { Project } from "@opencode-ai/core/project"
|
||||
import { AbsolutePath } from "@opencode-ai/core/schema"
|
||||
|
||||
export function location(ref: Location.Ref, input: { projectDirectory?: AbsolutePath; vcs?: Project.Vcs } = {}) {
|
||||
return {
|
||||
directory: ref.directory,
|
||||
workspaceID: ref.workspaceID,
|
||||
project: { id: Project.ID.global, directory: input.projectDirectory ?? ref.directory },
|
||||
vcs: input.vcs,
|
||||
} satisfies Location.Interface
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue