@@ -170,7 +170,7 @@ import {
170
170
WorkspaceSession_Owner ,
171
171
WorkspaceSession_WorkspaceContext ,
172
172
WorkspaceSession_WorkspaceContext_Repository ,
173
- WorkspaceSession_WorkspaceContext_RefType
173
+ WorkspaceSession_WorkspaceContext_RefType ,
174
174
} from "@gitpod/public-api/lib/gitpod/v1/workspace_pb" ;
175
175
import { BigIntToJson } from "@gitpod/gitpod-protocol/lib/util/stringify" ;
176
176
import { getPrebuildLogPath } from "./prebuild-utils" ;
@@ -211,7 +211,9 @@ export class PublicAPIConverter {
211
211
const { metrics } = arg . instance . status ;
212
212
result . metrics = new WorkspaceSession_Metrics ( {
213
213
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 ,
215
217
} ) ;
216
218
217
219
result . id = arg . instance . id ;
@@ -460,10 +462,12 @@ export class PublicAPIConverter {
460
462
461
463
toWorkspaceSessionContext ( arg : WorkspaceContext ) : WorkspaceSession_WorkspaceContext {
462
464
const result = new WorkspaceSession_WorkspaceContext ( ) ;
463
- if ( NavigatorContext . is ( arg ) ) {
465
+ if ( CommitContext . is ( arg ) ) {
464
466
result . revision = arg . revision ;
465
467
result . refType = this . toRefType ( arg . refType ) ;
466
- result . path = arg . path ;
468
+ if ( NavigatorContext . is ( arg ) ) {
469
+ result . path = arg . path ;
470
+ }
467
471
result . repository = new WorkspaceSession_WorkspaceContext_Repository ( {
468
472
cloneUrl : arg . repository . cloneUrl ,
469
473
host : arg . repository . host ,
0 commit comments