Skip to content

Commit 2185344

Browse files
chore: add telemetry to alt-enter (#1805)
1 parent b065333 commit 2185344

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

gui/src/components/mainInput/InputToolbar.tsx

-5
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,6 @@ function InputToolbar(props: InputToolbarProps) {
136136
)}
137137
<EnterButton
138138
offFocus={props.usingCodebase}
139-
// disabled={
140-
// !active &&
141-
// (!(inputRef.current as any)?.value ||
142-
// typeof client === "undefined")
143-
// }
144139
onClick={(e) => {
145140
props.onEnter({
146141
useCodebase: isMetaEquivalentKeyPressed(e),

gui/src/components/mainInput/TipTapEditor.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import {
5353
getSlashCommandDropdownOptions,
5454
} from "./getSuggestion";
5555
import { ComboBoxItem } from "./types";
56+
import { usePostHog } from "posthog-js/react";
5657

5758
const InputBoxDiv = styled.div`
5859
resize: none;
@@ -152,6 +153,8 @@ function TipTapEditor(props: TipTapEditorProps) {
152153

153154
const { saveSession } = useHistory(dispatch);
154155

156+
const posthog = usePostHog();
157+
155158
const inSubmenuRef = useRef<string | undefined>(undefined);
156159
const inDropdownRef = useRef(false);
157160

@@ -285,10 +288,13 @@ function TipTapEditor(props: TipTapEditorProps) {
285288
return true;
286289
},
287290
"Alt-Enter": () => {
291+
posthog.capture("gui_use_active_file_enter");
292+
288293
onEnterRef.current({
289294
useCodebase: false,
290295
noContext: useActiveFile,
291296
});
297+
292298
return true;
293299
},
294300
"Cmd-Backspace": () => {

0 commit comments

Comments
 (0)