Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions telemetry/definitions/commonDefinitions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"types": [
{
"name": "acceptedFixType",
"type": "string",
"description": "Captures the type of fix that was accepted",
"allowedValues": [
"acceptDiff",
"insertAtCursor",
"copyDiff"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this map to the buttons in the webview? If that's the case it should be openDiff instead of acceptDiff

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected it and added quickFix as well to codeFixActions

]
},
{
"name": "action",
"type": "string",
Expand Down Expand Up @@ -4398,6 +4408,34 @@
}
]
},
{
"name": "codewhisperer_codeScanIssueGenerateFixDiffUse",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add findingId?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is already codewhisperer_codeScanIssueApplyFix . why can't "diff" be a field (name TBD) on that existing metric?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the codeFixAction to codewhisperer_codeScanIssueApplyFix

"description": "User chose to utilise the diff of a code scan issue fix",
"metadata": [
{
"type": "acceptedFixType",
"required": false
},
{
"type": "component"
},
{
"type": "credentialStartUrl",
"required": false
},
{
"type": "detectorId"
},
{
"type": "ruleId",
"required": false
},
{
"type": "variant",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will variant be used here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used anymore.

"required": false
}
]
},
{
"name": "codewhisperer_codeScanIssueHover",
"description": "Called when a code scan issue is hovered over",
Expand Down