Skip to content

Commit b0926b1

Browse files
authored
Fixed telemetry popup bug (RooCodeInc#4070)
1 parent 582a3b1 commit b0926b1

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

.changeset/eight-otters-grow.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+
Fixed issue where telemetry warning popup was created for every new Cline window

src/services/posthog/telemetry/TelemetryService.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,20 @@ class TelemetryService {
138138
if (globalTelemetryEnabled) {
139139
this.telemetryEnabled = didUserOptIn
140140
} else {
141-
// Show warning to user that global telemetry is disabled
142-
void vscode.window
143-
.showWarningMessage(
144-
"VSCode telemetry is disabled. To enable telemetry for this extension, first enable VSCode telemetry in settings.",
145-
"Open Settings",
146-
)
147-
.then((selection) => {
148-
if (selection === "Open Settings") {
149-
void vscode.commands.executeCommand("workbench.action.openSettings", "telemetry.telemetryLevel")
150-
}
151-
})
141+
// Only show warning if user has opted in to Cline telemetry but VS Code telemetry is disabled
142+
if (didUserOptIn) {
143+
void vscode.window
144+
.showWarningMessage(
145+
"Anonymous Cline error and usage reporting is enabled, but VSCode telemetry is disabled. To enable error and usage reporting for this extension, enable VSCode telemetry in settings.",
146+
"Open Settings",
147+
)
148+
.then((selection) => {
149+
if (selection === "Open Settings") {
150+
void vscode.commands.executeCommand("workbench.action.openSettings", "telemetry.telemetryLevel")
151+
}
152+
})
153+
}
154+
this.telemetryEnabled = false
152155
}
153156

154157
// Update PostHog client state based on telemetry preference

0 commit comments

Comments
 (0)