@@ -56,13 +56,28 @@ function decodeExportTrajectoryRequest(encoded: string): Partial<ExportTrajector
5656 throw new Error ( "Encoded trajectory export request must be a JSON object" ) ;
5757 }
5858 const request = decoded as EncodedExportTrajectoryRequest ;
59- return {
60- sessionKey : readOptionalString ( request . sessionKey ) ?? "" ,
61- output : readOptionalString ( request . output ) ,
62- store : readOptionalString ( request . store ) ,
63- agent : readOptionalString ( request . agent ) ,
64- workspace : readOptionalString ( request . workspace ) ,
65- } ;
59+ const opts : Partial < ExportTrajectoryCommandOptions > = { } ;
60+ const sessionKey = readOptionalString ( request . sessionKey ) ;
61+ if ( sessionKey !== undefined ) {
62+ opts . sessionKey = sessionKey ;
63+ }
64+ const output = readOptionalString ( request . output ) ;
65+ if ( output !== undefined ) {
66+ opts . output = output ;
67+ }
68+ const store = readOptionalString ( request . store ) ;
69+ if ( store !== undefined ) {
70+ opts . store = store ;
71+ }
72+ const agent = readOptionalString ( request . agent ) ;
73+ if ( agent !== undefined ) {
74+ opts . agent = agent ;
75+ }
76+ const workspace = readOptionalString ( request . workspace ) ;
77+ if ( workspace !== undefined ) {
78+ opts . workspace = workspace ;
79+ }
80+ return opts ;
6681}
6782
6883function resolveExportTrajectoryOptions (
0 commit comments