mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-11 22:51:26 +00:00
Track mode selector opened in telemetry (#5150)
This commit is contained in:
parent
5c9b476d5b
commit
1c37b77e9d
2 changed files with 8 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ export enum TelemetryEventName {
|
|||
TASK_CONVERSATION_MESSAGE = "Conversation Message",
|
||||
LLM_COMPLETION = "LLM Completion",
|
||||
MODE_SWITCH = "Mode Switched",
|
||||
MODE_SELECTOR_OPENED = "Mode Selector Opened",
|
||||
TOOL_USED = "Tool Used",
|
||||
|
||||
CHECKPOINT_CREATED = "Checkpoint Created",
|
||||
|
|
@ -126,6 +127,7 @@ export const rooCodeTelemetryEventSchema = z.discriminatedUnion("type", [
|
|||
TelemetryEventName.TASK_COMPLETED,
|
||||
TelemetryEventName.TASK_CONVERSATION_MESSAGE,
|
||||
TelemetryEventName.MODE_SWITCH,
|
||||
TelemetryEventName.MODE_SELECTOR_OPENED,
|
||||
TelemetryEventName.TOOL_USED,
|
||||
TelemetryEventName.CHECKPOINT_CREATED,
|
||||
TelemetryEventName.CHECKPOINT_RESTORED,
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ import { useExtensionState } from "@/context/ExtensionStateContext"
|
|||
import { useAppTranslation } from "@/i18n/TranslationContext"
|
||||
import { Mode, getAllModes } from "@roo/modes"
|
||||
import { ModeConfig, CustomModePrompts } from "@roo-code/types"
|
||||
import { telemetryClient } from "@/utils/TelemetryClient"
|
||||
import { TelemetryEventName } from "@roo-code/types"
|
||||
|
||||
interface ModeSelectorProps {
|
||||
value: Mode
|
||||
|
|
@ -37,6 +39,10 @@ export const ModeSelector = ({
|
|||
const { t } = useAppTranslation()
|
||||
|
||||
const trackModeSelectorOpened = () => {
|
||||
// Track telemetry every time the mode selector is opened
|
||||
telemetryClient.capture(TelemetryEventName.MODE_SELECTOR_OPENED)
|
||||
|
||||
// Track first-time usage for UI purposes
|
||||
if (!hasOpenedModeSelector) {
|
||||
setHasOpenedModeSelector(true)
|
||||
vscode.postMessage({ type: "hasOpenedModeSelector", bool: true })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue