fix: 修复 ChatPanel 无限重渲染 — useLogger 新增 bindings 参数保证引用稳定

This commit is contained in:
2026-06-02 00:50:59 +08:00
parent 29bf61f7a3
commit 628b592577
4 changed files with 151 additions and 13 deletions

View File

@@ -26,7 +26,7 @@ interface ChatPanelProps {
export function ChatPanel({ conversationId, onConversationCreated, projectId }: ChatPanelProps) {
const { message } = App.useApp();
const logger = useLogger().child({ component: "ChatPanel", page: "workbench" });
const logger = useLogger({ component: "ChatPanel", page: "workbench" });
const queryClient = useQueryClient();
const [input, setInput] = useState("");
const [editingMessageId, setEditingMessageId] = useState<null | string>(null);