refactor(core): consolidate references (#31539)

This commit is contained in:
Dax
2026-06-09 12:08:58 -04:00
committed by GitHub
parent 0bb677cef9
commit 6566ede935
65 changed files with 687 additions and 2730 deletions
+1 -4
View File
@@ -11,7 +11,6 @@ import { Search } from "@opencode-ai/core/filesystem/search"
import { Effect, Layer } from "effect"
import { Config } from "@/config/config"
import { Service } from "./bootstrap-service"
import { Reference } from "@/reference/reference"
export { Service } from "./bootstrap-service"
export type { Interface } from "./bootstrap-service"
@@ -27,7 +26,6 @@ export const layer = Layer.effect(
const lsp = yield* LSP.Service
const plugin = yield* Plugin.Service
const project = yield* Project.Service
const reference = yield* Reference.Service
const search = yield* Search.Service
const shareNext = yield* ShareNext.Service
const snapshot = yield* Snapshot.Service
@@ -52,7 +50,7 @@ export const layer = Layer.effect(
// Each service self-manages its own slow work via Effect.forkScoped against
// its per-instance state scope. We just await materialization here.
yield* Effect.forEach(
[reference, lsp, shareNext, format, vcs, snapshot, project],
[lsp, shareNext, format, vcs, snapshot, project],
(s) => s.init().pipe(Effect.catchCause((cause) => Effect.logWarning("init failed", { cause }))),
{ concurrency: "unbounded", discard: true },
).pipe(Effect.withSpan("InstanceBootstrap.init"))
@@ -69,7 +67,6 @@ export const defaultLayer: Layer.Layer<Service> = layer.pipe(
LSP.defaultLayer,
Plugin.defaultLayer,
Project.defaultLayer,
Reference.defaultLayer,
Search.defaultLayer,
ShareNext.defaultLayer,
Snapshot.defaultLayer,