Convert LoadInput.init to Effect + extract InstanceBootstrap as a Service (#25376)
This commit is contained in:
parent
1571933096
commit
f33aec1139
21 changed files with 224 additions and 154 deletions
|
|
@ -23,6 +23,7 @@ import { AppFileSystem } from "@opencode-ai/core/filesystem"
|
|||
import { InstanceState } from "@/effect/instance-state"
|
||||
import { Context, Duration, Effect, Exit, Fiber, Layer, Option, Schema } from "effect"
|
||||
import { EffectFlock } from "@opencode-ai/core/util/effect-flock"
|
||||
import { containsPath } from "../project/instance-context"
|
||||
import { zod } from "@/util/effect-zod"
|
||||
import { NonNegativeInt, PositiveInt, withStatics, type DeepMutable } from "@/util/schema"
|
||||
import { ConfigAgent } from "./agent"
|
||||
|
|
@ -458,7 +459,7 @@ export const layer = Layer.effect(
|
|||
const pluginScopeForSource = Effect.fnUntraced(function* (source: string) {
|
||||
if (source.startsWith("http://") || source.startsWith("https://")) return "global"
|
||||
if (source === "OPENCODE_CONFIG_CONTENT") return "local"
|
||||
if (Instance.containsPath(source, ctx)) return "local"
|
||||
if (containsPath(source, ctx)) return "local"
|
||||
return "global"
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue