feat(core): expose V2 VCS status and diff APIs (#35129)

This commit is contained in:
Shoubhit Dash 2026-07-03 16:49:03 +05:30 committed by GitHub
commit a1b6c84135
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 970 additions and 0 deletions

View file

@ -17,6 +17,7 @@ export { Provider } from "./provider.js"
export { Reference } from "./reference.js"
export { Revert } from "./revert.js"
export { Session } from "./session.js"
export { Vcs } from "./vcs.js"
export { SessionInput } from "./session-input.js"
export { SessionMessage } from "./session-message.js"
export { Shell } from "./shell.js"

View file

@ -0,0 +1,15 @@
export * as Vcs from "./vcs.js"
import { Schema } from "effect"
import { NonNegativeInt } from "./schema.js"
export const Mode = Schema.Literals(["working", "branch"]).annotate({ identifier: "Vcs.Mode" })
export type Mode = typeof Mode.Type
export const FileStatus = Schema.Struct({
file: Schema.String,
additions: NonNegativeInt,
deletions: NonNegativeInt,
status: Schema.Literals(["added", "deleted", "modified"]),
}).annotate({ identifier: "Vcs.FileStatus" })
export interface FileStatus extends Schema.Schema.Type<typeof FileStatus> {}