1- import { Plugin } from "../plugin"
21import { Format } from "../format"
32import { LSP } from "@/lsp/lsp"
43import { File } from "../file"
@@ -7,6 +6,7 @@ import * as Project from "./project"
76import * as Vcs from "./vcs"
87import { Bus } from "../bus"
98import { Command } from "../command"
9+ import { Plugin } from "../plugin"
1010import { InstanceState } from "@/effect/instance-state"
1111import * as Log from "@opencode-ai/core/util/log"
1212import { FileWatcher } from "@/file/watcher"
@@ -17,20 +17,20 @@ import { Config } from "@/config/config"
1717export const InstanceBootstrap = Effect . gen ( function * ( ) {
1818 const ctx = yield * InstanceState . context
1919 Log . Default . info ( "bootstrapping" , { directory : ctx . directory } )
20- // everything depends on config so eager load it for nice traces
21- yield * Config . Service . use ( ( svc ) => svc . get ( ) )
22- // Plugin can mutate config so it has to be initialized before anything else.
23- yield * Plugin . Service . use ( ( svc ) => svc . init ( ) )
2420 yield * Effect . all (
2521 [
26- LSP . Service ,
27- ShareNext . Service ,
28- Format . Service ,
29- File . Service ,
30- FileWatcher . Service ,
31- Vcs . Service ,
32- Snapshot . Service ,
33- ] . map ( ( s ) => Effect . forkDetach ( s . use ( ( i ) => i . init ( ) ) ) ) ,
22+ Config . Service . use ( ( i ) => i . get ( ) ) ,
23+ ...[
24+ Plugin . Service ,
25+ LSP . Service ,
26+ ShareNext . Service ,
27+ Format . Service ,
28+ File . Service ,
29+ FileWatcher . Service ,
30+ Vcs . Service ,
31+ Snapshot . Service ,
32+ ] . map ( ( s ) => s . use ( ( i ) => i . init ( ) ) ) ,
33+ ] . map ( ( e ) => Effect . forkDetach ( e ) ) ,
3434 ) . pipe ( Effect . withSpan ( "InstanceBootstrap.init" ) )
3535
3636 const projectID = ctx . project . id
0 commit comments