refactor(schema): apply session review decisions (#35793)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -51,7 +51,7 @@ type State = {
|
||||
type Data =
|
||||
| {
|
||||
type: "session"
|
||||
data: SDK.Session
|
||||
data: SDK.SessionV1Info
|
||||
}
|
||||
| {
|
||||
type: "message"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user