@@ -3,6 +3,7 @@ import delay from "delay"
33
44import { ClineProvider } from "../core/webview/ClineProvider"
55import { ContextProxy } from "../core/config/ContextProxy"
6+ import { telemetryService } from "../services/telemetry/TelemetryService"
67
78import { registerHumanRelayCallback , unregisterHumanRelayCallback , handleHumanRelayResponse } from "./humanRelay"
89import { handleNewTask } from "./handleTask"
@@ -71,6 +72,8 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
7172 return
7273 }
7374
75+ telemetryService . captureTitleButtonClicked ( "plus" )
76+
7477 await visibleProvider . removeClineFromStack ( )
7578 await visibleProvider . postStateToWebview ( )
7679 await visibleProvider . postMessageToWebview ( { type : "action" , action : "chatButtonClicked" } )
@@ -82,6 +85,8 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
8285 return
8386 }
8487
88+ telemetryService . captureTitleButtonClicked ( "mcp" )
89+
8590 visibleProvider . postMessageToWebview ( { type : "action" , action : "mcpButtonClicked" } )
8691 } ,
8792 "roo-cline.promptsButtonClicked" : ( ) => {
@@ -91,9 +96,15 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
9196 return
9297 }
9398
99+ telemetryService . captureTitleButtonClicked ( "prompts" )
100+
94101 visibleProvider . postMessageToWebview ( { type : "action" , action : "promptsButtonClicked" } )
95102 } ,
96- "roo-cline.popoutButtonClicked" : ( ) => openClineInNewTab ( { context, outputChannel } ) ,
103+ "roo-cline.popoutButtonClicked" : ( ) => {
104+ telemetryService . captureTitleButtonClicked ( "popout" )
105+
106+ return openClineInNewTab ( { context, outputChannel } )
107+ } ,
97108 "roo-cline.openInNewTab" : ( ) => openClineInNewTab ( { context, outputChannel } ) ,
98109 "roo-cline.settingsButtonClicked" : ( ) => {
99110 const visibleProvider = getVisibleProviderOrLog ( outputChannel )
@@ -102,6 +113,8 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
102113 return
103114 }
104115
116+ telemetryService . captureTitleButtonClicked ( "settings" )
117+
105118 visibleProvider . postMessageToWebview ( { type : "action" , action : "settingsButtonClicked" } )
106119 } ,
107120 "roo-cline.historyButtonClicked" : ( ) => {
@@ -111,9 +124,13 @@ const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOpt
111124 return
112125 }
113126
127+ telemetryService . captureTitleButtonClicked ( "history" )
128+
114129 visibleProvider . postMessageToWebview ( { type : "action" , action : "historyButtonClicked" } )
115130 } ,
116131 "roo-cline.helpButtonClicked" : ( ) => {
132+ telemetryService . captureTitleButtonClicked ( "help" )
133+
117134 vscode . env . openExternal ( vscode . Uri . parse ( "https://docs.roocode.com" ) )
118135 } ,
119136 "roo-cline.showHumanRelayDialog" : ( params : { requestId : string ; promptText : string } ) => {
0 commit comments