-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update: log token count for code generated and button click events ac…
…ross the extension (#675) RE: https://docs.google.com/document/d/1UcjUdon1XO5GoLDIJJCGBq1zyhR6VfL2FE_apSPeLQo/edit#heading=h.m8ojuhhojtjm Close #672 Add loggings for following events | Description | Type | Example Log Entry | |----------------------------------------------------------------------------------|------------|-------------------------------------------------------------------------------------------| | Chat submit from sidebar | submit | CodyVSCodeExtension:chat:submitted {"source":"chat"} | | Chat submit from inline | submit | CodyVSCodeExtension:chat:submitted {"source":"inline"} | | Chat submit from command menu | submit | CodyVSCodeExtension:chat:submitted {"source":"menu"} | | Code generated for chat | response | CodyVSCodeExtension:chatResponse:noCode {} | | Code generated for chat | response | CodyVSCodeExtension:chatResponse:hasCode {"lineCount":20,"charCount":575} | | Fixup code lens button: apply | click | CodyVSCodeExtension:fixup:codeLens:clicked', { op: apply) | | Fixup code lens button: show diff | click | CodyVSCodeExtension:fixup:codeLens:clicked', { op: diff) | | Fixup code lens button: cancel | click | CodyVSCodeExtension:fixup:codeLens:clicked', { op: cancel) | | Fixup token count for code applied | applied | CodyVSCodeExtension:fixup:applied {"lineCount":20,"charCount":575} | | Chat title bar button: new convo | click | CodyVSCodeExtension:chatTitleButton:clicked {"name":"reset"} | | Chat title bar button: history | click | CodyVSCodeExtension:chatTitleButton:clicked {"name":"history"} | | Copy event on code generated for Inline Chat | keydown | CodyVSCodeExtension:inlineChat:event:detected {"op":"copy","lineCount":5,"charCount":76} | | Paste event on code generated for Inline Chat | keydown | CodyVSCodeExtension:inlineChat:event:detected {"op":"paste","lineCount":5,"charCount":76} | | Copy event on code generated for side bar chat triggered by copy button click: | click | CodyVSCodeExtension:copyButton:clicked {"lineCount":2,"charCount":27,"op":"copy"} | | Paste event on code generated for side bar chat triggered by copy button click: | keydown | CodyVSCodeExtension:pasteButton:clicked {"lineCount":2,"charCount":27,"op":"paste"} | | Copy event on code generated for side bar chat, but not triggered by buttons | keydown | CodyVSCodeExtension:copyKeydown:clicked {"lineCount":2,"charCount":27,"op":"copy"} | | Paste event on code generated for side bar chat, but not triggered by buttons | keydown | CodyVSCodeExtension:pasteKeydown:clicked {"lineCount":2,"charCount":27,"op":"paste"} | | Insert code block button | click | CodyVSCodeExtension:insertButton:clicked {“op”:“insert”,“charCount”:194,“lineCount”:11} | | On “Stop Generating” button click in sidebar | click | CodyVSCodeExtension:abortButton:clicked' { source: 'sidebar' } | | On “Stop Generating” button click in Inline Chat | click | CodyVSCodeExtension:abortButton:clicked' { source: inline } | | Code generated for fixup task | response | CodyVSCodeExtension:fixupResponse:hasCode {"lineCount":12,"charCount":354} | `CodyVSCodeExtension:completion:accepted` was added by @philipp-spiess in #674 `CodyVSCodeExtension:completion:suggested` is not added. Will work on this in a separated PR ## Test plan <!-- Required. See https://docs.sourcegraph.com/dev/background-information/testing_principles. --> Added test for token count methods. To test the newly added token events Start Cody from this branch in debug mode, and check the Output channel for logged events after performing an action: ![image](https://github.com/sourcegraph/cody/assets/68532117/f71dc5e9-0217-43bf-be64-1a783dcae5cc)
- Loading branch information
Showing
16 changed files
with
333 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.