@@ -170,7 +170,7 @@ import {
170170 WorkspaceSession_Owner ,
171171 WorkspaceSession_WorkspaceContext ,
172172 WorkspaceSession_WorkspaceContext_Repository ,
173- WorkspaceSession_WorkspaceContext_RefType
173+ WorkspaceSession_WorkspaceContext_RefType ,
174174} from "@gitpod/public-api/lib/gitpod/v1/workspace_pb" ;
175175import { BigIntToJson } from "@gitpod/gitpod-protocol/lib/util/stringify" ;
176176import { getPrebuildLogPath } from "./prebuild-utils" ;
@@ -211,7 +211,9 @@ export class PublicAPIConverter {
211211 const { metrics } = arg . instance . status ;
212212 result . metrics = new WorkspaceSession_Metrics ( {
213213 totalImageSize : metrics ?. image ?. totalSize ? BigInt ( metrics . image . totalSize ) : undefined ,
214- workspaceImageSize : metrics ?. image ?. workspaceImageSize ? BigInt ( metrics . image . workspaceImageSize ) : undefined ,
214+ workspaceImageSize : metrics ?. image ?. workspaceImageSize
215+ ? BigInt ( metrics . image . workspaceImageSize )
216+ : undefined ,
215217 } ) ;
216218
217219 result . id = arg . instance . id ;
@@ -460,10 +462,12 @@ export class PublicAPIConverter {
460462
461463 toWorkspaceSessionContext ( arg : WorkspaceContext ) : WorkspaceSession_WorkspaceContext {
462464 const result = new WorkspaceSession_WorkspaceContext ( ) ;
463- if ( NavigatorContext . is ( arg ) ) {
465+ if ( CommitContext . is ( arg ) ) {
464466 result . revision = arg . revision ;
465467 result . refType = this . toRefType ( arg . refType ) ;
466- result . path = arg . path ;
468+ if ( NavigatorContext . is ( arg ) ) {
469+ result . path = arg . path ;
470+ }
467471 result . repository = new WorkspaceSession_WorkspaceContext_Repository ( {
468472 cloneUrl : arg . repository . cloneUrl ,
469473 host : arg . repository . host ,
0 commit comments