mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-12 23:01:21 +00:00
Stop double-capturing cloud telemetry (#5211)
This commit is contained in:
parent
fa693e1f06
commit
8bb7ef083f
1 changed files with 11 additions and 6 deletions
|
|
@ -375,13 +375,18 @@ export class Task extends EventEmitter<ClineEvents> {
|
|||
await provider?.postMessageToWebview({ type: "messageUpdated", clineMessage: message })
|
||||
this.emit("message", { action: "updated", message })
|
||||
|
||||
const shouldCaptureMessage = message.partial !== true && CloudService.isEnabled()
|
||||
// Only check for telemetry if the message is complete and CloudService is enabled
|
||||
if (message.partial !== true && CloudService.isEnabled()) {
|
||||
// Now check if this message was already captured
|
||||
const previousMessage = this.clineMessages.find((m) => m.ts === message.ts)
|
||||
const wasAlreadyCaptured = previousMessage && previousMessage.partial !== true
|
||||
|
||||
if (shouldCaptureMessage) {
|
||||
CloudService.instance.captureEvent({
|
||||
event: TelemetryEventName.TASK_MESSAGE,
|
||||
properties: { taskId: this.taskId, message },
|
||||
})
|
||||
if (!wasAlreadyCaptured) {
|
||||
CloudService.instance.captureEvent({
|
||||
event: TelemetryEventName.TASK_MESSAGE,
|
||||
properties: { taskId: this.taskId, message },
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue