feat: restore GLM 4.7 fixes - auto-scroll and retry logic
Changes from GLM 4.7 Progress Log: 1. Multi-task chat auto-scroll (multi-task-chat.tsx): - Added createEffect that monitors message count changes - Auto-scrolls using requestAnimationFrame + setTimeout(50ms) - Scrolls when new messages arrive or during streaming 2. Electron black screen fix (main.ts): - Added exponential backoff retry (1s, 2s, 4s, 8s, 16s max) - Added 30-second timeout for load operations - Added user-friendly error screen with retry button - Handles errno -3 network errors gracefully - Max 5 retry attempts before showing error
This commit is contained in:
@@ -149,6 +149,19 @@ export default function MultiTaskChat(props: MultiTaskChatProps) {
|
||||
return () => clearInterval(interval);
|
||||
});
|
||||
|
||||
// Auto-scroll when new messages arrive
|
||||
createEffect(() => {
|
||||
const ids = filteredMessageIds();
|
||||
const thinking = isAgentThinking();
|
||||
|
||||
// Scroll when message count changes or when thinking starts
|
||||
if (ids.length > 0 || thinking) {
|
||||
requestAnimationFrame(() => {
|
||||
setTimeout(scrollToBottom, 50);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
const handleSendMessage = async () => {
|
||||
const message = chatInput().trim();
|
||||
if (!message || isSending()) return;
|
||||
|
||||
Reference in New Issue
Block a user