diff --git a/generate-index.ts b/generate-index.ts index 23fc6a0..d091463 100644 --- a/generate-index.ts +++ b/generate-index.ts @@ -12,6 +12,7 @@ interface ResultSummary { passedTests: number; failedTests: number; totalCost: number | null; + cachedCost: number | null; mcpEnabled: boolean; } @@ -49,6 +50,7 @@ function getResultSummaries(): ResultSummary[] { passedTests, failedTests, totalCost: data.metadata.totalCost?.totalCost ?? null, + cachedCost: data.metadata.cacheSimulation?.simulatedCostWithCache ?? null, mcpEnabled: data.metadata.mcpEnabled, }); } catch (error) { @@ -87,6 +89,8 @@ function generateIndexHtml(summaries: ResultSummary[]): string { const scoreClass = getScoreClass(s.score); const costDisplay = s.totalCost !== null ? formatCost(s.totalCost) : "N/A"; + const cachedCostDisplay = + s.cachedCost !== null ? formatCost(s.cachedCost) : "N/A"; const mcpBadge = s.mcpEnabled ? 'MCP' : 'No MCP'; @@ -100,10 +104,11 @@ function generateIndexHtml(summaries: ResultSummary[]): string { ${formatTimestamp(s.timestamp)} ${s.score}% - ${s.passedTests} / + ${s.passedTests} / ${s.totalTests} ${costDisplay} + ${cachedCostDisplay} View Report JSON @@ -415,6 +420,7 @@ function generateIndexHtml(summaries: ResultSummary[]): string { Score Tests Cost + Cached Cost Actions