Revert "feat(logging): report important keyboard events"
This reverts commit b59da8f7e4.
This commit is contained in:
@@ -31,12 +31,6 @@ export function ChatInputBar({ disabled = false }: ChatInputBarProps) {
|
||||
containerRef: barRef,
|
||||
active: isFocused,
|
||||
onKeyboardDismiss: () => {
|
||||
log.important("info", "[chat-input-bar] keyboard dismissed", {
|
||||
contentLength: input.length,
|
||||
hasContent,
|
||||
disabled,
|
||||
wasFocused: isFocused,
|
||||
});
|
||||
setIsFocused(false);
|
||||
},
|
||||
});
|
||||
@@ -45,21 +39,11 @@ export function ChatInputBar({ disabled = false }: ChatInputBarProps) {
|
||||
setInput(value);
|
||||
};
|
||||
|
||||
const handleFocusChange = (focused: boolean) => {
|
||||
log.important("info", "[chat-input-bar] focus change", {
|
||||
focused,
|
||||
contentLength: input.length,
|
||||
hasContent,
|
||||
disabled,
|
||||
});
|
||||
setIsFocused(focused);
|
||||
};
|
||||
|
||||
const handleSend = (source: "click" | "keyboard" | "pointerdown") => {
|
||||
if (source === "click") {
|
||||
const elapsed = Date.now() - lastPointerSendAtRef.current;
|
||||
if (elapsed >= 0 && elapsed < POINTER_SEND_CLICK_DEDUPE_MS) {
|
||||
log.important("info", "[chat-input-bar] suppress duplicate click", {
|
||||
log.debug("[chat-input-bar] suppress duplicate click", {
|
||||
elapsed,
|
||||
contentLength: input.length,
|
||||
hasContent,
|
||||
@@ -78,13 +62,6 @@ export function ChatInputBar({ disabled = false }: ChatInputBarProps) {
|
||||
disabled,
|
||||
isFocused,
|
||||
});
|
||||
log.important("info", "[chat-input-bar] send", {
|
||||
source,
|
||||
contentLength: input.length,
|
||||
hasContent,
|
||||
disabled,
|
||||
isFocused,
|
||||
});
|
||||
dispatch({ type: "ChatSendMessage", content: input });
|
||||
setInput("");
|
||||
textareaRef.current?.focus();
|
||||
@@ -106,7 +83,7 @@ export function ChatInputBar({ disabled = false }: ChatInputBarProps) {
|
||||
value={input}
|
||||
onChange={handleInputChange}
|
||||
onSubmit={() => handleSend("keyboard")}
|
||||
onFocusChange={handleFocusChange}
|
||||
onFocusChange={setIsFocused}
|
||||
disabled={disabled}
|
||||
/>
|
||||
<ChatSendButton
|
||||
|
||||
Reference in New Issue
Block a user