feat: add toolProtocol property to PostHog tool usage telemetry (#9374)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
This commit is contained in:
roomote[bot] 2025-11-18 20:29:58 -05:00 • committed by GitHub
parent 271d01bada
commit 7c079453dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -98,8 +98,8 @@ export class TelemetryService {
this.captureEvent(TelemetryEventName.MODE_SWITCH, { taskId, newMode })
}
public captureToolUsage(taskId: string, tool: string): void {
this.captureEvent(TelemetryEventName.TOOL_USED, { taskId, tool })
public captureToolUsage(taskId: string, tool: string, toolProtocol: string): void {
this.captureEvent(TelemetryEventName.TOOL_USED, { taskId, tool, toolProtocol })
}
public captureCheckpointCreated(taskId: string): void {

View file

@ -437,7 +437,7 @@ export async function presentAssistantMessage(cline: Task) {
if (!block.partial) {
cline.recordToolUsage(block.name)
TelemetryService.instance.captureToolUsage(cline.taskId, block.name)
TelemetryService.instance.captureToolUsage(cline.taskId, block.name, toolProtocol)
}
// Validate tool use before execution.