Przeglądaj źródła

fix(core): provide agent service in location layer

Dax Raad 2 miesięcy temu
rodzic
commit
b82aa3865b
1 zmienionych plików z 7 dodań i 4 usunięć
  1. 7 4
      packages/core/src/location-layer.ts

+ 7 - 4
packages/core/src/location-layer.ts

@@ -4,13 +4,16 @@ import { Catalog } from "./catalog"
 import { PluginBoot } from "./plugin/boot"
 import { PluginBoot } from "./plugin/boot"
 import { Policy } from "./policy"
 import { Policy } from "./policy"
 import { Config } from "./config"
 import { Config } from "./config"
+import { AgentV2 } from "./agent"
 
 
 export class LocationServiceMap extends LayerMap.Service<LocationServiceMap>()("@opencode/example/LocationServiceMap", {
 export class LocationServiceMap extends LayerMap.Service<LocationServiceMap>()("@opencode/example/LocationServiceMap", {
   lookup: (ref: Location.Ref) => {
   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
     return result
   },
   },
   idleTimeToLive: "60 minutes",
   idleTimeToLive: "60 minutes",