Skip to content

Commit

Permalink
update api model
Browse files Browse the repository at this point in the history
  • Loading branch information
David Hasani committed Nov 8, 2024
1 parent d18794e commit 292efea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/codewhisperer/client/codewhisperer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
}

Expand Down
5 changes: 1 addition & 4 deletions packages/core/src/codewhisperer/client/user-service-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -2964,4 +2961,4 @@
"min": 0
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 292efea

Please sign in to comment.