refactor(schema): apply session review decisions (#35793)

This commit is contained in:
Kit Langton
2026-07-07 22:10:11 -04:00
committed by GitHub
parent d27746e5b3
commit ed6ad272ec
142 changed files with 4321 additions and 3256 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ export function fromRow(row: SessionRow): Info {
messageID: MessageID.make(row.revert.messageID),
partID: row.revert.partID ? PartID.make(row.revert.partID) : undefined,
snapshot: row.revert.snapshot,
diff: row.revert.diff,
diff: "diff" in row.revert ? row.revert.diff : undefined,
}
: undefined
return {
+1 -1
View File
@@ -51,7 +51,7 @@ type State = {
type Data =
| {
type: "session"
data: SDK.Session
data: SDK.SessionV1Info
}
| {
type: "message"
+2 -2
View File
@@ -9,7 +9,7 @@ import { FSUtil } from "@opencode-ai/core/fs-util"
import { Hash } from "@opencode-ai/core/util/hash"
import { Config } from "@/config/config"
import { Global } from "@opencode-ai/core/global"
import { Info } from "@opencode-ai/schema/file-diff"
import { LegacyInfo } from "@opencode-ai/schema/file-diff"
export const Patch = Schema.Struct({
hash: Schema.String,
@@ -17,7 +17,7 @@ export const Patch = Schema.Struct({
})
export type Patch = typeof Patch.Type
export const FileDiff = Info
export const FileDiff = LegacyInfo
export type FileDiff = typeof FileDiff.Type
const prune = "7.days"