@@ -491,36 +491,26 @@ export class HistoryDebuggerPanel {
491491 } )
492492 }
493493
494- private async getReplayerEndpoint ( ) {
494+ private async getTypescriptReplayerEndpoint ( ) {
495495 const config = vscode . workspace . getConfiguration ( "temporal" )
496- let replayerEntrypoint = config . get ( "replayerEntrypoint " ) as string
496+ let typeScriptReplayerEntrypoint = config . get ( "typeScriptReplayerEntrypoint " ) as string
497497 const language = getCurrentLanguage ( )
498498 const workspace = vscode . workspace . workspaceFolders ?. [ 0 ]
499499 const workspaceFolder = workspace ?. uri
500500
501501 // Debug logging
502502 console . log ( "Debug configuration:" )
503503 console . log ( "- Language:" , language )
504- console . log ( "- Configured replayerEntrypoint:" , replayerEntrypoint )
505504 console . log ( "- Workspace folder:" , workspaceFolder ?. fsPath )
506505 console . log ( "- All temporal config:" , config )
507506
508- const configuredAbsolutePath = path . isAbsolute ( replayerEntrypoint )
507+ const configuredAbsolutePath = path . isAbsolute ( typeScriptReplayerEntrypoint )
509508
510509 // Provide language-specific defaults if not configured
511- if ( ! replayerEntrypoint ) {
510+ if ( ! typeScriptReplayerEntrypoint ) {
512511 switch ( language ) {
513512 case "typescript" :
514- replayerEntrypoint = "src/debug-replayer.ts"
515- break
516- case "go" :
517- replayerEntrypoint = "." // Use current directory for Go package
518- break
519- case "java" :
520- replayerEntrypoint = "src/main/java/TemporalReplayer.java"
521- break
522- case "python" :
523- replayerEntrypoint = "replayer.py"
513+ typeScriptReplayerEntrypoint = "src/debug-replayer.ts"
524514 break
525515 default :
526516 throw new Error ( `No default replayer endpoint for language: ${ language } ` )
@@ -531,36 +521,36 @@ export class HistoryDebuggerPanel {
531521 if ( workspaceFolder === undefined ) {
532522 throw new Error ( "temporal.replayerEndpoint not configured, cannot use default without a workspace folder" )
533523 } else {
534- replayerEntrypoint = vscode . Uri . joinPath ( workspaceFolder , replayerEntrypoint ) . fsPath
524+ typeScriptReplayerEntrypoint = vscode . Uri . joinPath ( workspaceFolder , typeScriptReplayerEntrypoint ) . fsPath
535525 }
536526 }
537527
538528 try {
539- const stat : vscode . FileStat = await vscode . workspace . fs . stat ( vscode . Uri . file ( replayerEntrypoint ) )
529+ const stat : vscode . FileStat = await vscode . workspace . fs . stat ( vscode . Uri . file ( typeScriptReplayerEntrypoint ) )
540530 const { type } = stat
541531 if ( type === vscode . FileType . Directory ) {
542532 throw new Error (
543- `Configured temporal.replayerEndpoint (${ replayerEntrypoint } ) is a folder, please provide a file instead` ,
533+ `Configured temporal.replayerEndpoint (${ typeScriptReplayerEntrypoint } ) is a folder, please provide a file instead` ,
544534 )
545535 }
546536 if ( type === vscode . FileType . Unknown ) {
547537 throw new Error (
548- `Configured temporal.replayerEndpoint (${ replayerEntrypoint } ) is of unknown type, please provide a file instead` ,
538+ `Configured temporal.replayerEndpoint (${ typeScriptReplayerEntrypoint } ) is of unknown type, please provide a file instead` ,
549539 )
550540 }
551541 } catch ( err : any ) {
552542 if ( err ?. code === vscode . FileSystemError . FileNotFound . name ) {
553543 if ( ! configuredAbsolutePath && ( vscode . workspace . workspaceFolders ?. length ?? 0 ) > 1 ) {
554544 throw new Error (
555- `Configured temporal.replayerEndpoint (${ replayerEntrypoint } ) not found (multiple workspace folders found, consider using an absolute path to disambiguate)` ,
545+ `Configured temporal.replayerEndpoint (${ typeScriptReplayerEntrypoint } ) not found (multiple workspace folders found, consider using an absolute path to disambiguate)` ,
556546 )
557547 }
558- throw new Error ( `Configured temporal.replayerEndpoint (${ replayerEntrypoint } ) not found` )
548+ throw new Error ( `Configured temporal.replayerEndpoint (${ typeScriptReplayerEntrypoint } ) not found` )
559549 }
560550 throw err
561551 }
562552
563- return replayerEntrypoint
553+ return typeScriptReplayerEntrypoint
564554 }
565555
566556 private getLanguageRequirements ( language : string ) : string {
@@ -599,7 +589,6 @@ export class HistoryDebuggerPanel {
599589 // Still send protobuf bytes to webview for UI processing
600590 const bytes = new Uint8Array ( temporal . api . history . v1 . History . encode ( history ) . finish ( ) )
601591 const workspace = vscode . workspace . workspaceFolders ?. [ 0 ]
602- const replayerEndpoint = await this . getReplayerEndpoint ( )
603592 const language = getCurrentLanguage ( )
604593
605594 await this . panel . webview . postMessage ( { type : "historyProcessed" , history : bytes } )
@@ -639,6 +628,7 @@ export class HistoryDebuggerPanel {
639628
640629 switch ( language ) {
641630 case "typescript" :
631+ const typescriptReplayerEndpoint = await this . getTypescriptReplayerEndpoint ( )
642632 // TypeScript-specific configuration
643633 if ( process . env . TEMPORAL_DEBUGGER_EXTENSION_DEV_MODE ) {
644634 baseConfig . skipFiles ?. push ( "${workspaceFolder}/packages/worker/src/**" )
@@ -648,7 +638,7 @@ export class HistoryDebuggerPanel {
648638 const pathPrefix = process . env . NODE_PATH ? `${ process . env . NODE_PATH ?? "" } ${ delim } ` : ""
649639 debugConfig = {
650640 ...baseConfig ,
651- args : [ replayerEndpoint ] ,
641+ args : [ typescriptReplayerEndpoint ] ,
652642 env : {
653643 TEMPORAL_DEBUGGER_PLUGIN_URL : this . server . url ,
654644 NODE_PATH : `${ pathPrefix } ${ path . join ( __dirname , "../../node_modules" ) } ` ,
@@ -657,20 +647,8 @@ export class HistoryDebuggerPanel {
657647 break
658648
659649 case "go" :
660- // For Go, ensure we have a valid program path
661- let goProgram = replayerEndpoint
662- if ( goProgram . endsWith ( ".go" ) ) {
663- // If it's a .go file, use it directly
664- goProgram = replayerEndpoint
665- } else {
666- // If it's a directory, use the directory path
667- goProgram = path . dirname ( replayerEndpoint )
668- }
669- console . log ( "Go program path:" , goProgram )
670-
671650 debugConfig = {
672651 ...baseConfig ,
673- program : goProgram ,
674652 env : {
675653 TEMPORAL_DEBUGGER_PLUGIN_URL : this . server . url ,
676654 } ,
@@ -680,7 +658,6 @@ export class HistoryDebuggerPanel {
680658 case "java" :
681659 debugConfig = {
682660 ...baseConfig ,
683- args : [ replayerEndpoint ] ,
684661 env : {
685662 TEMPORAL_DEBUGGER_PLUGIN_URL : this . server . url ,
686663 } ,
@@ -690,7 +667,6 @@ export class HistoryDebuggerPanel {
690667 case "python" :
691668 debugConfig = {
692669 ...baseConfig ,
693- args : [ replayerEndpoint ] ,
694670 env : {
695671 TEMPORAL_DEBUGGER_PLUGIN_URL : this . server . url ,
696672 } ,
0 commit comments