|
|
@@ -51,6 +51,7 @@ import { InstanceState } from "@/effect/instance-state"
|
|
|
import { TaskTool, type TaskPromptOps } from "@/tool/task"
|
|
|
import { SessionRunState } from "./run-state"
|
|
|
import { EffectBridge } from "@/effect/bridge"
|
|
|
+import { RuntimeFlags } from "@/effect/runtime-flags"
|
|
|
import { SyncEvent } from "@/sync"
|
|
|
import { SessionEvent } from "@/v2/session-event"
|
|
|
import { Modelv2 } from "@/v2/model"
|
|
|
@@ -202,6 +203,7 @@ export const layer = Layer.effect(
|
|
|
const llm = yield* LLM.Service
|
|
|
const references = yield* Reference.Service
|
|
|
const sync = yield* SyncEvent.Service
|
|
|
+ const flags = yield* RuntimeFlags.Service
|
|
|
const runner = Effect.fn("SessionPrompt.runner")(function* () {
|
|
|
return yield* EffectBridge.make()
|
|
|
})
|
|
|
@@ -384,7 +386,7 @@ export const layer = Layer.effect(
|
|
|
const userMessage = input.messages.findLast((msg) => msg.info.role === "user")
|
|
|
if (!userMessage) return input.messages
|
|
|
|
|
|
- if (!Flag.OPENCODE_EXPERIMENTAL_PLAN_MODE) {
|
|
|
+ if (!flags.experimentalPlanMode) {
|
|
|
if (input.agent.name === "plan") {
|
|
|
userMessage.parts.push({
|
|
|
id: PartID.ascending(),
|
|
|
@@ -2024,6 +2026,7 @@ export const defaultLayer = Layer.suspend(() =>
|
|
|
Bus.layer,
|
|
|
CrossSpawnSpawner.defaultLayer,
|
|
|
SyncEvent.defaultLayer,
|
|
|
+ RuntimeFlags.defaultLayer,
|
|
|
),
|
|
|
),
|
|
|
),
|