Reduce noisy runtime logging in frontend flows.

This keeps chat, notification, and post interactions cleaner in production while preserving error-level visibility.
This commit is contained in:
2026-03-09 22:18:47 +08:00
parent 3968660048
commit 63e32b15a3
21 changed files with 14 additions and 284 deletions

View File

@@ -270,7 +270,6 @@ export const useChatScreen = () => {
shouldAutoScrollOnEnterRef.current = true;
autoScrollTimersRef.current.forEach(clearTimeout);
autoScrollTimersRef.current = [];
console.log('[ChatScreen] 会话切换,重置状态');
}, [conversationId]);
// 组件卸载时清理定时器
@@ -389,8 +388,6 @@ export const useChatScreen = () => {
// 【改造】加载更多历史消息
const loadMoreHistory = useCallback(async () => {
console.log('[ChatScreen] 加载更多历史消息');
if (!conversationId || !hasMoreHistory || loadingMore) {
return;
}
@@ -730,8 +727,6 @@ export const useChatScreen = () => {
try {
const segments = buildTextSegments(trimmedText, replyingTo);
console.log('[ChatScreen] handleSend - replyingTo:', replyingTo?.id, 'segments:', JSON.stringify(segments));
if (isGroupChat && routeGroupId) {
// 群聊消息发送
websocketService.sendGroupChatMessage({
@@ -1041,7 +1036,6 @@ export const useChatScreen = () => {
setFirstSeq(0);
setHasMoreHistory(true);
await clearConversationMessages(conversationId);
console.log('[ChatScreen] 会话消息已清空:', conversationId);
// 刷新消息列表
await refreshMessages();
} catch (error) {