Skip to content

Commit

Permalink
document events
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasimir committed Aug 19, 2024
1 parent 818dff8 commit 89c2cc5
Show file tree
Hide file tree
Showing 4 changed files with 565 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ export const runAIPipelineGeneration = (
const provideSampleDocuments =
preferences.getPreferences().enableGenAISampleDocumentPassing;

const editor_view_type = pipelineMode === 'builder-ui' ? 'stages' : 'text';
const editor_view_type: 'stages' | 'text' =
pipelineMode === 'builder-ui' ? 'stages' : 'text';

if (existingRequestId !== null) {
// Cancel the active request as this one will override.
abort(existingRequestId);
Expand Down
4 changes: 2 additions & 2 deletions packages/compass-query-bar/src/stores/ai-query-reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function trackAndLogFailed({
track(
'AI Response Failed',
() => ({
editor_view_type: 'find',
editor_view_type: 'find' as const,
error_name: errorName,
status_code: statusCode,
error_code: errorCode ?? '',
Expand Down Expand Up @@ -178,7 +178,7 @@ export const runAIQuery = (
track(
'AI Prompt Submitted',
() => ({
editor_view_type: 'find',
editor_view_type: 'find' as const,
user_input_length: userInput.length,
has_sample_documents: provideSampleDocuments,
request_id: requestId,
Expand Down
4 changes: 2 additions & 2 deletions packages/compass-shell/src/modules/worker-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ export function createWorkerRuntime(
// already check whether Compass telemetry is enabled or not.
track: ({ event, properties }) => {
return track(
'Shell Event',
{ ...properties, shell_event_name: event },
`Shell ${event}`,
{ ...properties },
connectionInfo.getCurrentConnectionInfo()
);
},
Expand Down
Loading

0 comments on commit 89c2cc5

Please sign in to comment.