Skip to content

chore: add telemetry to alt-enter #1805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions gui/src/components/mainInput/InputToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,6 @@ function InputToolbar(props: InputToolbarProps) {
)}
<EnterButton
offFocus={props.usingCodebase}
// disabled={
// !active &&
// (!(inputRef.current as any)?.value ||
// typeof client === "undefined")
// }
onClick={(e) => {
props.onEnter({
useCodebase: isMetaEquivalentKeyPressed(e),
Expand Down
6 changes: 6 additions & 0 deletions gui/src/components/mainInput/TipTapEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import {
getSlashCommandDropdownOptions,
} from "./getSuggestion";
import { ComboBoxItem } from "./types";
import { usePostHog } from "posthog-js/react";

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

const { saveSession } = useHistory(dispatch);

const posthog = usePostHog();

const inSubmenuRef = useRef<string | undefined>(undefined);
const inDropdownRef = useRef(false);

Expand Down Expand Up @@ -285,10 +288,13 @@ function TipTapEditor(props: TipTapEditorProps) {
return true;
},
"Alt-Enter": () => {
posthog.capture("gui_use_active_file_enter");

onEnterRef.current({
useCodebase: false,
noContext: useActiveFile,
});

return true;
},
"Cmd-Backspace": () => {
Expand Down
Loading