refactor(flags): route event system through runtime flags (#27323)

This commit is contained in:
Shoubhit Dash
2026-05-13 17:44:09 +05:30
committed by GitHub
parent 098bdd8ae2
commit f13fc5a8a8
11 changed files with 80 additions and 46 deletions

View File

@@ -28,6 +28,7 @@ import { testEffect } from "../lib/effect"
import { CrossSpawnSpawner } from "@opencode-ai/core/cross-spawn-spawner"
import { TestConfig } from "../fixture/config"
import { SyncEvent } from "@/sync"
import { RuntimeFlags } from "@/effect/runtime-flags"
void Log.init({ print: false })
@@ -225,6 +226,7 @@ const deps = Layer.mergeAll(
Bus.layer,
Config.defaultLayer,
SyncEvent.defaultLayer,
RuntimeFlags.layer({ experimentalEventSystem: true }),
)
const env = Layer.mergeAll(
@@ -257,6 +259,7 @@ function compactionProcessLayer(options?: CompactionProcessOptions) {
? SessionProcessorModule.SessionProcessor.layer.pipe(
Layer.provide(summary),
Layer.provide(Image.defaultLayer),
Layer.provide(RuntimeFlags.layer({ experimentalEventSystem: true })),
Layer.provide(status),
)
: layer(options?.result ?? "continue")
@@ -272,6 +275,7 @@ function compactionProcessLayer(options?: CompactionProcessOptions) {
Layer.provide(bus),
Layer.provide(options?.config ?? Config.defaultLayer),
Layer.provide(SyncEvent.defaultLayer),
Layer.provide(RuntimeFlags.layer({ experimentalEventSystem: true })),
)
}