Skip to content

Commit ffb04c8

Browse files
author
David Hasani
committed
fix(amazonq): only show lines of code
1 parent 655ceda commit ffb04c8

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "/transform: only show lines of code statistic in plan"
4+
}

packages/core/src/codewhisperer/service/transformByQ/transformApiHandler.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -595,9 +595,11 @@ export function getJobStatisticsHtml(jobStatistics: any) {
595595
htmlString += `<div style="flex: 1; margin-left: 20px; border: 1px solid #424750; border-radius: 8px; padding: 10px;">`
596596
// eslint-disable-next-line unicorn/no-array-for-each
597597
jobStatistics.forEach((stat: { name: string; value: string }) => {
598-
htmlString += `<p style="margin-bottom: 4px"><img src="${getTransformationIcon(
599-
stat.name
600-
)}" style="vertical-align: middle;"> ${getFormattedString(stat.name)}: ${stat.value}</p>`
598+
if (stat.name === 'linesOfCode') {
599+
htmlString += `<p style="margin-bottom: 4px"><img src="${getTransformationIcon(
600+
stat.name
601+
)}" style="vertical-align: middle;"> ${getFormattedString(stat.name)}: ${stat.value}</p>`
602+
}
601603
})
602604
htmlString += `</div>`
603605
return htmlString
@@ -647,8 +649,6 @@ export async function getTransformationPlan(jobId: string, profile: RegionProfil
647649
plan += `</div><br>`
648650
}
649651
plan += `</div><br>`
650-
plan += `<p style="font-size: 18px; margin-bottom: 4px;"><b>Appendix</b><br><a href="#top" style="float: right; font-size: 14px;">Scroll to top <img src="${arrowIcon}" style="vertical-align: middle;"></a></p><br>`
651-
plan = addTableMarkdown(plan, '-1', tableMapping) // ID of '-1' reserved for appendix table; only 1 table there
652652
return plan
653653
} catch (e: any) {
654654
const errorMessage = (e as Error).message

0 commit comments

Comments
 (0)