Skip to content

Commit 1cd74c2

Browse files
amishnedevversion
authored andcommitted
fix: make toolLogs optional
1 parent 0a7697d commit 1cd74c2

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

report-app/src/app/pages/report-viewer/report-viewer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ <h4>Debugging Tools</h4>
411411
(click)="downloadDebuggingZip(result)">
412412
Download ZIP for debugging
413413
</button>
414-
@if (result.toolLogs.length > 0) {
414+
@if (result.toolLogs && result.toolLogs.length > 0) {
415415
<expansion-panel>
416416
<expansion-panel-header>Tool Logs</expansion-panel-header>
417417
<ul class="tool-logs-list">

runner/codegen/llm-runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ interface BaseLlmGenerateResponse {
148148
/** Reasoning messages from the LLM. */
149149
reasoning: string;
150150
/** Tool requests and responses. */
151-
toolLogs: ToolLogEntry[];
151+
toolLogs?: ToolLogEntry[];
152152
}
153153

154154
/** File generation response from the LLM. */

runner/orchestration/generate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ async function startEvaluationTask(
350350
progress
351351
);
352352

353-
const toolLogs = initialResponse.toolLogs;
353+
const toolLogs = initialResponse.toolLogs ?? [];
354354

355355
if (!initialResponse) {
356356
progress.log(
@@ -688,7 +688,7 @@ async function installChrome(): Promise<void> {
688688

689689
try {
690690
await chromeInstallPromise;
691-
} catch {}
691+
} catch {} // Ignore errors here, as it might be already installed.
692692
}
693693

694694
/**

runner/shared-interfaces.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export interface LlmResponse {
106106
/** Reasoning messages from the LLM for generating this response. */
107107
reasoning: string;
108108
/** Tool requests logs (e.g. MCP requests and responses). */
109-
toolLogs: ToolLogEntry[];
109+
toolLogs?: ToolLogEntry[];
110110
}
111111

112112
/** Error response from an LLM API. */
@@ -409,7 +409,7 @@ export interface AssessmentResult {
409409
/** The number of repair attempts made after the axe initial failures. */
410410
axeRepairAttempts: number;
411411
/** Tool requests logs (e.g. MCP requests and responses). */
412-
toolLogs: ToolLogEntry[];
412+
toolLogs?: ToolLogEntry[];
413413
}
414414

415415
/**

0 commit comments

Comments
 (0)