Drop unused domain Zod statics (#26927)

This commit is contained in:
Kit Langton
2026-05-11 16:10:58 -04:00
committed by GitHub
parent 0bced8ec96
commit 45adfedd64
7 changed files with 16 additions and 41 deletions
+4 -11
View File
@@ -14,17 +14,14 @@ import { containsPath } from "../project/instance-context"
import * as Log from "@opencode-ai/core/util/log"
import { Protected } from "./protected"
import { Ripgrep } from "./ripgrep"
import { zod } from "@opencode-ai/core/effect-zod"
import { NonNegativeInt, type DeepMutable, withStatics } from "@opencode-ai/core/schema"
import { NonNegativeInt, type DeepMutable } from "@opencode-ai/core/schema"
export const Info = Schema.Struct({
path: Schema.String,
added: NonNegativeInt,
removed: NonNegativeInt,
status: Schema.Literals(["added", "deleted", "modified"]),
})
.annotate({ identifier: "File" })
.pipe(withStatics((s) => ({ zod: zod(s) })))
}).annotate({ identifier: "File" })
export type Info = DeepMutable<Schema.Schema.Type<typeof Info>>
export const Node = Schema.Struct({
@@ -33,9 +30,7 @@ export const Node = Schema.Struct({
absolute: Schema.String,
type: Schema.Literals(["file", "directory"]),
ignored: Schema.Boolean,
})
.annotate({ identifier: "FileNode" })
.pipe(withStatics((s) => ({ zod: zod(s) })))
}).annotate({ identifier: "FileNode" })
export type Node = DeepMutable<Schema.Schema.Type<typeof Node>>
const Hunk = Schema.Struct({
@@ -62,9 +57,7 @@ export const Content = Schema.Struct({
patch: Schema.optional(Patch),
encoding: Schema.optional(Schema.Literal("base64")),
mimeType: Schema.optional(Schema.String),
})
.annotate({ identifier: "FileContent" })
.pipe(withStatics((s) => ({ zod: zod(s) })))
}).annotate({ identifier: "FileContent" })
export type Content = DeepMutable<Schema.Schema.Type<typeof Content>>
export const Event = {
+2 -3
View File
@@ -11,8 +11,7 @@ import { Global } from "@opencode-ai/core/global"
import * as Log from "@opencode-ai/core/util/log"
import { sanitizedProcessEnv } from "@opencode-ai/core/util/opencode-process"
import { which } from "@/util/which"
import { zod } from "@opencode-ai/core/effect-zod"
import { NonNegativeInt, withStatics } from "@opencode-ai/core/schema"
import { NonNegativeInt } from "@opencode-ai/core/schema"
const log = Log.create({ service: "ripgrep" })
const VERSION = "15.1.0"
@@ -69,7 +68,7 @@ export const SearchMatch = Schema.Struct({
end: NonNegativeInt,
}),
),
}).pipe(withStatics((s) => ({ zod: zod(s) })))
})
export const Match = Schema.Struct({
type: Schema.Literal("match"),