-
Notifications
You must be signed in to change notification settings - Fork 57
feat: add LSP extension for sending telemetry for inline chat result action #408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
c064079
77bce83
9f457a8
50d3b14
dc75d6d
bd9a068
3d24963
d4aadeb
c7018c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,7 @@ export const INLINE_CHAT_REQUEST_METHOD = 'aws/chat/sendInlineChatPrompt' | |
| // context | ||
| export const CONTEXT_COMMAND_NOTIFICATION_METHOD = 'aws/chat/sendContextCommands' | ||
| export const CREATE_PROMPT_NOTIFICATION_METHOD = 'aws/chat/createPrompt' | ||
| export const INLINE_CHAT_RESULT_NOTIFICATION_METHOD = 'aws/chat/inlineChatResult' | ||
| // history | ||
| export const LIST_CONVERSATIONS_REQUEST_METHOD = 'aws/chat/listConversations' | ||
| export const CONVERSATION_CLICK_REQUEST_METHOD = 'aws/chat/conversationClick' | ||
|
|
@@ -303,8 +304,29 @@ export interface CreatePromptParams { | |
| promptName: string | ||
| } | ||
|
|
||
| // history | ||
| export interface ProgrammingLanguage { | ||
| languageName: string | ||
| } | ||
|
|
||
| export type InlineChatUserDecision = 'ACCEPT' | 'REJECT' | 'DISMISS' | string | ||
|
|
||
| export interface InlineChatResultParams { | ||
| requestId: string | ||
| timestamp: Date | ||
|
||
| inputLength?: number | ||
| numSelectedLines?: number | ||
| numSuggestionAddChars?: number | ||
| numSuggestionAddLines?: number | ||
| numSuggestionDelChars?: number | ||
|
||
| numSuggestionDelLines?: number | ||
| codeIntent?: boolean | ||
| userDecision?: InlineChatUserDecision | ||
| responseStartLatency?: number | ||
| responseEndLatency?: number | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need 2 values for latency? Can client just return computed latency back?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| programmingLanguage?: ProgrammingLanguage | ||
| } | ||
|
|
||
| // history | ||
| export type TextBasedFilterOption = { | ||
| type: 'textarea' | 'textinput' | ||
| placeholder?: string | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pras0131 please document every new Protocol addition and meaning of all fields in doc strings. It should be very clear what is expected from client to pass here, and we should follow LSP spec example. You can see example of documentation I did in latest PR https://github.com/aws/language-server-runtimes/pull/433/files
It's difficult to reason about all fields in Params without documentation, it is not clear why some fields are needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add a doc string to inlineChatResultNotificationType but adding a doc string to all field does not seem to be required here post the renaming of variables to fuller names as they are clearly indicate their purpose.