chore: add telemetry to alt-enter (#1805)
This commit is contained in:
parent
b065333912
commit
2185344809
2 changed files with 6 additions and 5 deletions
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ import {
|
|||
getSlashCommandDropdownOptions,
|
||||
} from "./getSuggestion";
|
||||
import { ComboBoxItem } from "./types";
|
||||
import { usePostHog } from "posthog-js/react";
|
||||
|
||||
const InputBoxDiv = styled.div`
|
||||
resize: none;
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
@ -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": () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue