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:
Gemini AI
2025-12-23 13:33:39 +04:00
Unverified
parent c4ac079660
commit 9c6d92efcd
2 changed files with 123 additions and 2 deletions

View File

@@ -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;