mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: address PR review comments
- Remove unused _isNetworkError variable in PostHogTelemetryClient - Add TelemetryQueueManager.resetInstance() call in extension deactivation to prevent memory leaks and stale data when switching workspaces
This commit is contained in:
parent
4dbb5eae1d
commit
1f0890919a
2 changed files with 6 additions and 8 deletions
|
|
@ -97,14 +97,6 @@ export class PostHogTelemetryClient extends QueuedTelemetryClient {
|
|||
// Differentiate between different types of errors
|
||||
const errorMessage = error instanceof Error ? error.message : String(error)
|
||||
|
||||
// Check if it's a network error or other transient issue
|
||||
const _isNetworkError =
|
||||
errorMessage.toLowerCase().includes("network") ||
|
||||
errorMessage.toLowerCase().includes("timeout") ||
|
||||
errorMessage.toLowerCase().includes("econnrefused") ||
|
||||
errorMessage.toLowerCase().includes("enotfound") ||
|
||||
errorMessage.toLowerCase().includes("fetch")
|
||||
|
||||
// Check if it's a configuration error that won't be fixed by retrying
|
||||
const isConfigError =
|
||||
errorMessage.toLowerCase().includes("api key") ||
|
||||
|
|
|
|||
|
|
@ -290,5 +290,11 @@ export async function deactivate() {
|
|||
|
||||
await McpServerManager.cleanup(extensionContext)
|
||||
TelemetryService.instance.shutdown()
|
||||
|
||||
// Clean up the telemetry queue manager singleton to prevent memory leaks
|
||||
// and stale data when switching workspaces
|
||||
const { TelemetryQueueManager } = await import("@roo-code/telemetry")
|
||||
TelemetryQueueManager.resetInstance()
|
||||
|
||||
TerminalRegistry.cleanup()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue