refactor(chat): remove keyboard compatibility layer
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
/* ChatInputBar 输入栏容器样式(与 Dart chat_input_bar.dart 对齐) */
|
||||
|
||||
/* 键盘适配:--chat-input-lift 仅写入当前聊天输入栏。 */
|
||||
|
||||
.bar {
|
||||
flex: 0 0 auto;
|
||||
padding: 0
|
||||
calc(var(--chat-inline-padding, 16px) + var(--app-safe-right, 0px))
|
||||
calc(
|
||||
var(--spacing-lg, 16px) + var(--chat-input-lift, 0px) +
|
||||
var(--app-safe-bottom, 0px)
|
||||
var(--spacing-lg, 16px) + var(--app-safe-bottom, 0px)
|
||||
)
|
||||
calc(var(--chat-inline-padding, 16px) + var(--app-safe-left, 0px));
|
||||
background: transparent;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useRef, useState } from "react";
|
||||
import { useChatDispatch } from "@/stores/chat/chat-context";
|
||||
import { Logger } from "@/utils/logger";
|
||||
|
||||
import { useChatKeyboardAvoidance } from "../hooks/use-chat-keyboard-avoidance";
|
||||
import { useChatKeyboardDiagnostics } from "../hooks/use-chat-keyboard-diagnostics";
|
||||
import { ChatInputTextField } from "./chat-input-text-field";
|
||||
import { ChatSendButton } from "./chat-send-button";
|
||||
import styles from "./chat-input-bar.module.css";
|
||||
@@ -26,10 +26,7 @@ export function ChatInputBar({ disabled = false }: ChatInputBarProps) {
|
||||
|
||||
const hasContent = input.trim().length > 0;
|
||||
|
||||
useChatKeyboardAvoidance({
|
||||
containerRef: barRef,
|
||||
active: isFocused,
|
||||
});
|
||||
useChatKeyboardDiagnostics({ containerRef: barRef });
|
||||
|
||||
const handleInputChange = (value: string) => {
|
||||
setInput(value);
|
||||
|
||||
Reference in New Issue
Block a user