mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-22 19:55:11 +00:00
13 lines
531 B
TypeScript
13 lines
531 B
TypeScript
import { Layer, LayerMap } from "effect"
|
|
import { Location } from "./location"
|
|
import { Catalog } from "./catalog"
|
|
import { PluginBoot } from "./plugin/boot"
|
|
|
|
export class LocationServiceMap extends LayerMap.Service<LocationServiceMap>()("@opencode/example/LocationServiceMap", {
|
|
lookup: (ref: Location.Ref) =>
|
|
Layer.mergeAll(Catalog.defaultLayer, PluginBoot.defaultLayer).pipe(
|
|
Layer.provide([Layer.succeed(Location.Service, Location.Service.of(ref))]),
|
|
),
|
|
idleTimeToLive: "5 minutes",
|
|
dependencies: [],
|
|
}) {}
|