-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tree-explorer): add treeview telemetry and refactor to use a mor…
…e standardized format VSCODE-651 (#891) Co-authored-by: Alena Khineika <[email protected]>
- Loading branch information
1 parent
fabbc8c
commit 7879cf9
Showing
11 changed files
with
177 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,40 @@ | ||
import type * as vscode from 'vscode'; | ||
import type { DocumentSource } from '../documentSource'; | ||
|
||
export type ParticipantCommandType = 'query' | 'schema' | 'docs'; | ||
export type ParticipantCommand = `/${ParticipantCommandType}`; | ||
|
||
export type ParticipantRequestType = ParticipantCommandType | 'generic'; | ||
|
||
export type ParticipantResponseType = | ||
| 'query' | ||
| 'schema' | ||
| 'docs' | ||
| 'docs/chatbot' | ||
| 'docs/copilot' | ||
| 'exportToPlayground' | ||
| 'generic' | ||
| 'emptyRequest' | ||
| 'cancelledRequest' | ||
| 'askToConnect' | ||
| 'askForNamespace'; | ||
|
||
type TelemetryMetadata = { | ||
source: DocumentSource; | ||
source_details?: 'database' | 'collection'; | ||
}; | ||
|
||
/** Based on options from Copilot's chat open command IChatViewOpenOptions */ | ||
export type SendMessageToParticipantOptions = { | ||
message: string; | ||
command?: ParticipantCommandType; | ||
isNewChat?: boolean; | ||
isPartialQuery?: boolean; | ||
telemetry?: TelemetryMetadata; | ||
}; | ||
|
||
export type SendMessageToParticipantFromInputOptions = { | ||
messagePrefix?: string; | ||
source?: DocumentSource; | ||
} & Omit<SendMessageToParticipantOptions, 'message'> & | ||
export type SendMessageToParticipantFromInputOptions = Pick< | ||
SendMessageToParticipantOptions, | ||
'isNewChat' | 'isPartialQuery' | 'command' | 'telemetry' | ||
> & | ||
vscode.InputBoxOptions; |
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.