|
|
@@ -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 = {
|