Drop prompt input Zod statics (#26923)

This commit is contained in:
Kit Langton
2026-05-11 16:49:08 -04:00
committed by GitHub
parent 9067218b74
commit cc95197d72
4 changed files with 16 additions and 52 deletions

View File

@@ -46,8 +46,6 @@ import { Truncate } from "@/tool/truncate"
import { decodeDataUrl } from "@/util/data-url"
import { Process } from "@/util/process"
import { Cause, Effect, Exit, Latch, Layer, Option, Scope, Context, Schema, Types } from "effect"
import { zod } from "@opencode-ai/core/effect-zod"
import { withStatics } from "@opencode-ai/core/schema"
import * as EffectLogger from "@opencode-ai/core/effect/logger"
import { InstanceState } from "@/effect/instance-state"
import { TaskTool, type TaskPromptOps } from "@/tool/task"
@@ -2054,14 +2052,12 @@ export const PromptInput = Schema.Struct({
MessageV2.SubtaskPartInput,
]).annotate({ discriminator: "type" }),
),
}).pipe(withStatics((s) => ({ zod: zod(s) })))
})
export type PromptInput = Schema.Schema.Type<typeof PromptInput>
export class LoopInput extends Schema.Class<LoopInput>("SessionPrompt.LoopInput")({
sessionID: SessionID,
}) {
static readonly zod = zod(this)
}
}) {}
export const ShellInput = Schema.Struct({
sessionID: SessionID,
@@ -2069,7 +2065,7 @@ export const ShellInput = Schema.Struct({
agent: Schema.String,
model: Schema.optional(ModelRef),
command: Schema.String,
}).pipe(withStatics((s) => ({ zod: zod(s) })))
})
export type ShellInput = Schema.Schema.Type<typeof ShellInput>
export const CommandInput = Schema.Struct({
@@ -2097,7 +2093,7 @@ export const CommandInput = Schema.Struct({
]).annotate({ discriminator: "type" }),
),
),
}).pipe(withStatics((s) => ({ zod: zod(s) })))
})
export type CommandInput = Schema.Schema.Type<typeof CommandInput>
/** @internal Exported for testing */