From 292efea564eb8834ba63aa9fe76dcdf166d6e65c Mon Sep 17 00:00:00 2001 From: David Hasani Date: Fri, 8 Nov 2024 15:45:05 -0800 Subject: [PATCH] update api model --- packages/core/src/codewhisperer/client/codewhisperer.ts | 2 ++ packages/core/src/codewhisperer/client/user-service-2.json | 5 +---- .../transformByQ/transformationResultsViewProvider.ts | 5 +++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/core/src/codewhisperer/client/codewhisperer.ts b/packages/core/src/codewhisperer/client/codewhisperer.ts index 5104ef7ede0..392e7340b84 100644 --- a/packages/core/src/codewhisperer/client/codewhisperer.ts +++ b/packages/core/src/codewhisperer/client/codewhisperer.ts @@ -258,7 +258,9 @@ export class DefaultCodeWhispererClient { if (!AuthUtil.instance.isValidEnterpriseSsoInUse() && !globals.telemetry.telemetryEnabled) { return } + console.log('about to make API call') const response = await (await this.createUserSdkClient()).sendTelemetryEvent(requestWithCommonFields).promise() + console.log('API call response =', response) getLogger().debug(`codewhisperer: sendTelemetryEvent requestID: ${response.$response.requestId}`) } diff --git a/packages/core/src/codewhisperer/client/user-service-2.json b/packages/core/src/codewhisperer/client/user-service-2.json index ede278e8805..c3233bc8b6c 100644 --- a/packages/core/src/codewhisperer/client/user-service-2.json +++ b/packages/core/src/codewhisperer/client/user-service-2.json @@ -2,14 +2,11 @@ "version": "2.0", "metadata": { "apiVersion": "2022-11-11", - "auth": ["smithy.api#httpBearerAuth"], "endpointPrefix": "amazoncodewhispererservice", "jsonVersion": "1.0", "protocol": "json", - "protocols": ["json"], "serviceFullName": "Amazon CodeWhisperer", "serviceId": "CodeWhispererRuntime", - "signatureVersion": "bearer", "signingName": "amazoncodewhispererservice", "targetPrefix": "AmazonCodeWhispererService", "uid": "codewhispererruntime-2022-11-11" @@ -2964,4 +2961,4 @@ "min": 0 } } -} \ No newline at end of file +} diff --git a/packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts b/packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts index f20ef7576a3..79b31da450f 100644 --- a/packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts +++ b/packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts @@ -408,6 +408,11 @@ export class ProposedTransformationExplorer { const metricsPath = path.join(pathContainingArchive, ExportResultArchiveStructure.PathToMetrics) const metricsData = JSON.parse(fs.readFileSync(metricsPath, 'utf8')) + console.log('metricsData.linesOfCodeChanged =', metricsData.linesOfCodeChanged) + console.log('metricsData.charactersOfCodeChanged =', metricsData.charactersOfCodeChanged) + console.log('linesOfCodeSubmitted =', transformByQState.getLinesOfCodeSubmitted()) + console.log('transformByQState.getTransformationType() =', transformByQState.getTransformationType()) + await codeWhisperer.codeWhispererClient.sendTelemetryEvent({ telemetryEvent: { transformEvent: {