refactor(core): separate out location node functionality and integrate into v2 (#34119)
This commit is contained in:
@@ -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: [] })
|
||||
|
||||
Reference in New Issue
Block a user