From 3b4d253b72e4be9c64efce10540898044530eea5 Mon Sep 17 00:00:00 2001 From: David Hasani Date: Tue, 5 Nov 2024 13:22:54 -0800 Subject: [PATCH] address comment --- .../transformByQ/transformationResultsViewProvider.ts | 3 +-- packages/core/src/shared/utilities/download.ts | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts b/packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts index b6002d47741..f20ef7576a3 100644 --- a/packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts +++ b/packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts @@ -408,7 +408,6 @@ export class ProposedTransformationExplorer { const metricsPath = path.join(pathContainingArchive, ExportResultArchiveStructure.PathToMetrics) const metricsData = JSON.parse(fs.readFileSync(metricsPath, 'utf8')) - // TO-DO: add support for SQL conversions; right now these metrics are only available for Java upgrades await codeWhisperer.codeWhispererClient.sendTelemetryEvent({ telemetryEvent: { transformEvent: { @@ -423,7 +422,7 @@ export class ProposedTransformationExplorer { }, linesOfCodeChanged: metricsData.linesOfCodeChanged, charsOfCodeChanged: metricsData.charactersOfCodeChanged, - linesOfCodeSubmitted: transformByQState.getLinesOfCodeSubmitted(), + linesOfCodeSubmitted: transformByQState.getLinesOfCodeSubmitted(), // currently unavailable for SQL conversions }, }, }) diff --git a/packages/core/src/shared/utilities/download.ts b/packages/core/src/shared/utilities/download.ts index 63c8178a219..dfb4c551427 100644 --- a/packages/core/src/shared/utilities/download.ts +++ b/packages/core/src/shared/utilities/download.ts @@ -3,7 +3,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from 'path' import { CodeWhispererStreaming, ExportResultArchiveCommandInput } from '@amzn/codewhisperer-streaming' import { ToolkitError } from '../errors' import fs from '../fs/fs' @@ -12,9 +11,9 @@ import fs from '../fs/fs' * This class represents the structure of the archive returned by the ExportResultArchive endpoint */ export class ExportResultArchiveStructure { - static readonly PathToSummary = path.join('summary', 'summary.md') - static readonly PathToDiffPatch = path.join('patch', 'diff.patch') - static readonly PathToMetrics = path.join('metrics', 'metrics.json') + static readonly PathToSummary = 'summary/summary.md' + static readonly PathToDiffPatch = 'patch/diff.patch' + static readonly PathToMetrics = 'metrics/metrics.json' static readonly PathToManifest = 'manifest.json' }