@@ -34,7 +34,6 @@ import {
3434 useEventsBusForIDE ,
3535} from "../../hooks" ;
3636import { useWindowDimensions } from "../../hooks/useWindowDimensions" ;
37- import { telemetryApi } from "../../services/refact/telemetry" ;
3837
3938// import styles from "./Toolbar.module.css";
4039import { resetThread } from "../../features/ThreadMessages" ;
@@ -71,8 +70,6 @@ export const Toolbar = ({ activeTab }: ToolbarProps) => {
7170 const [ focus , _setFocus ] = useState < HTMLElement | null > ( null ) ;
7271
7372 const refs = useTourRefs ( ) ;
74- const [ sendTelemetryEvent ] =
75- telemetryApi . useLazySendTelemetryChatEventQuery ( ) ;
7673
7774 // const history = useAppSelector(getHistory, {
7875 // devModeChecks: { stabilityCheck: "never" },
@@ -96,61 +93,26 @@ export const Toolbar = ({ activeTab }: ToolbarProps) => {
9693 ( to : DropdownNavigationOptions | "chat" ) => {
9794 if ( to === "settings" ) {
9895 openSettings ( ) ;
99- void sendTelemetryEvent ( {
100- scope : `openSettings` ,
101- success : true ,
102- error_message : "" ,
103- } ) ;
10496 } else if ( to === "hot keys" ) {
10597 openHotKeys ( ) ;
106- void sendTelemetryEvent ( {
107- scope : `openHotkeys` ,
108- success : true ,
109- error_message : "" ,
110- } ) ;
11198 } else if ( to === "fim" ) {
11299 dispatch ( push ( { name : "fill in the middle debug page" } ) ) ;
113- void sendTelemetryEvent ( {
114- scope : `openDebugFim` ,
115- success : true ,
116- error_message : "" ,
117- } ) ;
118100 } else if ( to === "stats" ) {
119101 dispatch ( push ( { name : "statistics page" } ) ) ;
120- void sendTelemetryEvent ( {
121- scope : `openStats` ,
122- success : true ,
123- error_message : "" ,
124- } ) ;
125102 } else if ( to === "restart tour" ) {
126103 dispatch ( popBackTo ( { name : "login page" } ) ) ;
127104 dispatch ( push ( { name : "welcome" } ) ) ;
128105 dispatch ( restart ( ) ) ;
129- void sendTelemetryEvent ( {
130- scope : `restartTour` ,
131- success : true ,
132- error_message : "" ,
133- } ) ;
134106 } else if ( to === "integrations" ) {
135107 dispatch ( push ( { name : "integrations page" } ) ) ;
136- void sendTelemetryEvent ( {
137- scope : `openIntegrations` ,
138- success : true ,
139- error_message : "" ,
140- } ) ;
141108 } else if ( to === "providers" ) {
142109 dispatch ( push ( { name : "providers page" } ) ) ;
143- void sendTelemetryEvent ( {
144- scope : `openProviders` ,
145- success : true ,
146- error_message : "" ,
147- } ) ;
148110 } else if ( to === "chat" ) {
149111 dispatch ( popBackTo ( { name : "history" } ) ) ;
150112 dispatch ( push ( { name : "chat" } ) ) ;
151113 }
152114 } ,
153- [ dispatch , sendTelemetryEvent , openSettings , openHotKeys ] ,
115+ [ dispatch , openSettings , openHotKeys ] ,
154116 ) ;
155117
156118 const onCreateNewChat = useCallback ( ( ) => {
@@ -160,12 +122,7 @@ export const Toolbar = ({ activeTab }: ToolbarProps) => {
160122 dispatch ( resetThread ( ) ) ;
161123 // clear out old chat
162124 handleNavigation ( "chat" ) ;
163- void sendTelemetryEvent ( {
164- scope : `openNewChat` ,
165- success : true ,
166- error_message : "" ,
167- } ) ;
168- } , [ dispatch , sendTelemetryEvent , handleNavigation ] ) ;
125+ } , [ dispatch , handleNavigation ] ) ;
169126
170127 const goToTab = useCallback (
171128 ( tab : Tab ) => {
@@ -183,13 +140,8 @@ export const Toolbar = ({ activeTab }: ToolbarProps) => {
183140 dispatch ( popBackTo ( { name : "history" } ) ) ;
184141 dispatch ( push ( { name : "chat" } ) ) ;
185142 }
186- void sendTelemetryEvent ( {
187- scope : `goToTab/${ tab . type } ` ,
188- success : true ,
189- error_message : "" ,
190- } ) ;
191143 } ,
192- [ dispatch , shouldChatTabLinkBeNotClickable , sendTelemetryEvent ] ,
144+ [ dispatch , shouldChatTabLinkBeNotClickable ] ,
193145 ) ;
194146
195147 useEffect ( ( ) => {
0 commit comments