Skip to content

Commit 7f64107

Browse files
arafatkatzeCline Evaluation
andauthored
Adds telemetry to record the usage of keyboard and lightbulb icon shortcuts in Cline (RooCodeInc#3695)
* Fix: Temporary revert protobus changes for Toggle plan and act mode * Adding telemetry * Adding telemetry * Adding telemetry * Adding telemetry * Adding telemetry --------- Co-authored-by: Cline Evaluation <[email protected]>
1 parent cf0af8a commit 7f64107

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.changeset/five-bikes-impress.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"claude-dev": patch
3+
---
4+
5+
Adding Telemetry for button clicks

src/extension.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ export async function activate(context: vscode.ExtensionContext) {
310310
languageId,
311311
Array.isArray(diagnostics) ? diagnostics : undefined,
312312
)
313+
telemetryService.captureButtonClick("codeAction_addToChat", visibleWebview?.controller.task?.taskId, true)
313314
}),
314315
)
315316

@@ -481,6 +482,7 @@ export async function activate(context: vscode.ExtensionContext) {
481482
// Send to sidebar provider with diagnostics
482483
const visibleWebview = WebviewProvider.getVisibleInstance()
483484
await visibleWebview?.controller.fixWithCline(selectedText, filePath, languageId, diagnostics)
485+
telemetryService.captureButtonClick("codeAction_fixWithCline", visibleWebview?.controller.task?.taskId, true)
484486
}),
485487
)
486488

@@ -502,6 +504,7 @@ export async function activate(context: vscode.ExtensionContext) {
502504
const fileMention = visibleWebview?.controller.getFileMentionFromPath(filePath) || filePath
503505
const prompt = `Explain the following code from ${fileMention}:\n\`\`\`${editor.document.languageId}\n${selectedText}\n\`\`\``
504506
await visibleWebview?.controller.initTask(prompt)
507+
telemetryService.captureButtonClick("codeAction_explainCode", visibleWebview?.controller.task?.taskId, true)
505508
}),
506509
)
507510

@@ -523,6 +526,7 @@ export async function activate(context: vscode.ExtensionContext) {
523526
const fileMention = visibleWebview?.controller.getFileMentionFromPath(filePath) || filePath
524527
const prompt = `Improve the following code from ${fileMention} (e.g., suggest refactorings, optimizations, or better practices):\n\`\`\`${editor.document.languageId}\n${selectedText}\n\`\`\``
525528
await visibleWebview?.controller.initTask(prompt)
529+
telemetryService.captureButtonClick("codeAction_improveCode", visibleWebview?.controller.task?.taskId, true)
526530
}),
527531
)
528532

@@ -584,6 +588,7 @@ export async function activate(context: vscode.ExtensionContext) {
584588
"Could not activate Cline view. Please try opening it manually from the Activity Bar.",
585589
)
586590
}
591+
telemetryService.captureButtonClick("command_focusChatInput", activeWebviewProvider?.controller.task?.taskId, true)
587592
}),
588593
)
589594

0 commit comments

Comments
 (0)