refactor(core): separate out location node functionality and integrate into v2 (#34119)

This commit is contained in:
James Long
2026-06-26 22:46:07 -04:00
committed by GitHub
parent 4b948c5d74
commit ecdfff5a42
117 changed files with 1450 additions and 1196 deletions
+4 -1
View File
@@ -1,6 +1,7 @@
export * as PtyEnvironment from "./pty-environment"
import { Context, Effect, Layer } from "effect"
import { makeGlobalNode } from "@opencode-ai/core/effect/node"
export interface Interface {
readonly get: (input: { directory: string; cwd: string }) => Effect.Effect<Record<string, string>>
@@ -8,9 +9,11 @@ export interface Interface {
export class Service extends Context.Service<Service, Interface>()("@opencode/ServerPtyEnvironment") {}
export const defaultLayer = Layer.succeed(
export const layer = Layer.succeed(
Service,
Service.of({
get: () => Effect.succeed({}),
}),
)
export const node = makeGlobalNode({ service: Service, layer, deps: [] })