mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-05 14:39:49 +00:00
fix(core): provide agent service in location layer
This commit is contained in:
parent
ac0d5b8d7b
commit
b82aa3865b
1 changed files with 7 additions and 4 deletions
|
|
@ -4,13 +4,16 @@ import { Catalog } from "./catalog"
|
|||
import { PluginBoot } from "./plugin/boot"
|
||||
import { Policy } from "./policy"
|
||||
import { Config } from "./config"
|
||||
import { AgentV2 } from "./agent"
|
||||
|
||||
export class LocationServiceMap extends LayerMap.Service<LocationServiceMap>()("@opencode/example/LocationServiceMap", {
|
||||
lookup: (ref: Location.Ref) => {
|
||||
const result = Layer.mergeAll(Catalog.defaultLayer, PluginBoot.defaultLayer, Config.defaultLayer).pipe(
|
||||
Layer.provideMerge(Policy.defaultLayer),
|
||||
Layer.provideMerge(Location.defaultLayer(ref)),
|
||||
)
|
||||
const result = Layer.mergeAll(
|
||||
Catalog.defaultLayer,
|
||||
PluginBoot.defaultLayer,
|
||||
Config.defaultLayer,
|
||||
AgentV2.defaultLayer,
|
||||
).pipe(Layer.provideMerge(Policy.defaultLayer), Layer.provideMerge(Location.defaultLayer(ref)))
|
||||
return result
|
||||
},
|
||||
idleTimeToLive: "60 minutes",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue