Revert "feat(logging): report important keyboard events"

This reverts commit b59da8f7e4.
This commit is contained in:
2026-07-02 17:17:10 +08:00
parent e052381b77
commit efd89de0b0
4 changed files with 12 additions and 49 deletions
+2 -25
View File
@@ -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