File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
report-app/src/app/pages/report-viewer Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -461,13 +461,21 @@ <h4>{{ journey.name }}</h4>
461
461
462
462
< div class ="app-details-section ">
463
463
< h4 > Debugging Tools</ h4 >
464
+
464
465
< button
465
466
class ="neutral-button "
466
467
title ="Download a ZIP for debugging. You can upload the ZIP to AI Studio for further analysis of a specific app. "
467
- (click) ="downloadDebuggingZip(result) "
468
- >
468
+ (click) ="downloadDebuggingZip(result) ">
469
469
Download ZIP for debugging
470
470
</ button >
471
+
472
+ @let debugCommand = getDebugCommand(report, result);
473
+
474
+ @if (debugCommand) {
475
+ < p > To see the app locally, run the following command:</ p >
476
+ < pre class ="callout neutral code "> {{debugCommand}}</ pre >
477
+ }
478
+
471
479
@if (result.toolLogs && result.toolLogs.length > 0) {
472
480
< expansion-panel >
473
481
< expansion-panel-header > Tool Logs</ expansion-panel-header >
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ import { ExpansionPanel } from '../../shared/expansion-panel/expansion-panel';
44
44
import { ExpansionPanelHeader } from '../../shared/expansion-panel/expansion-panel-header' ;
45
45
import { ProviderLabel } from '../../shared/provider-label' ;
46
46
47
+ const localReportRegex = / - l \d + $ / ;
48
+
47
49
@Component ( {
48
50
imports : [
49
51
StackedBarChart ,
@@ -439,4 +441,16 @@ export class ReportViewer {
439
441
return 'failed' ;
440
442
}
441
443
}
444
+
445
+ protected getDebugCommand (
446
+ report : RunInfo ,
447
+ result : AssessmentResult
448
+ ) : string | null {
449
+ // Only show the command for local reports.
450
+ if ( ! localReportRegex . test ( report . group ) ) {
451
+ return null ;
452
+ }
453
+
454
+ return `wcs run --prompt=${ result . promptDef . name } --env=<path to ${ report . details . summary . environmentId } config>` ;
455
+ }
442
456
}
You can’t perform that action at this time.
0 commit comments