File tree Expand file tree Collapse file tree
packages/opencode/src/session Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -638,18 +638,20 @@ export type WithParts = {
638638 parts : Part [ ]
639639}
640640
641- const Cursor = z . object ( {
642- id : MessageID . zod ,
643- time : z . number ( ) ,
641+ const Cursor = Schema . Struct ( {
642+ id : MessageID ,
643+ time : Schema . Number ,
644644} )
645- type Cursor = z . infer < typeof Cursor >
645+ type Cursor = typeof Cursor . Type
646+
647+ const decodeCursor = Schema . decodeUnknownSync ( Cursor )
646648
647649export const cursor = {
648650 encode ( input : Cursor ) {
649651 return Buffer . from ( JSON . stringify ( input ) ) . toString ( "base64url" )
650652 } ,
651653 decode ( input : string ) {
652- return Cursor . parse ( JSON . parse ( Buffer . from ( input , "base64url" ) . toString ( "utf8" ) ) )
654+ return decodeCursor ( JSON . parse ( Buffer . from ( input , "base64url" ) . toString ( "utf8" ) ) )
653655 } ,
654656}
655657
You can’t perform that action at this time.
0 commit comments