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>
461461
462462 < div class ="app-details-section ">
463463 < h4 > Debugging Tools</ h4 >
464+
464465 < button
465466 class ="neutral-button "
466467 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) ">
469469 Download ZIP for debugging
470470 </ 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+
471479 @if (result.toolLogs && result.toolLogs.length > 0) {
472480 < expansion-panel >
473481 < 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';
4444import { ExpansionPanelHeader } from '../../shared/expansion-panel/expansion-panel-header' ;
4545import { ProviderLabel } from '../../shared/provider-label' ;
4646
47+ const localReportRegex = / - l \d + $ / ;
48+
4749@Component ( {
4850 imports : [
4951 StackedBarChart ,
@@ -439,4 +441,16 @@ export class ReportViewer {
439441 return 'failed' ;
440442 }
441443 }
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+ }
442456}
You can’t perform that action at this time.
0 commit comments