core: make InstanceBootstrap into an effect (#22274)

Co-authored-by: Kit Langton <kit.langton@gmail.com>
This commit is contained in:
Brendan Allan 2026-04-13 22:16:40 +08:00 committed by GitHub
parent 3eb6508a64
commit 94f71f59a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 52 additions and 28 deletions

View file

@ -1,3 +1,5 @@
import { AppRuntime } from "@/effect/app-runtime"
const dir = process.env.OPENCODE_E2E_PROJECT_DIR ?? process.cwd()
const title = process.env.OPENCODE_E2E_SESSION_TITLE ?? "E2E Session"
const text = process.env.OPENCODE_E2E_MESSAGE ?? "Seeded for UI e2e"
@ -20,7 +22,7 @@ const seed = async () => {
try {
await Instance.provide({
directory: dir,
init: InstanceBootstrap,
init: () => AppRuntime.runPromise(InstanceBootstrap),
fn: async () => {
await Config.waitForDependencies()
await ToolRegistry.ids()