mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
* feat(sync): implement background sync handling in event loop - Introduced a mechanism to track background sync status with a new `sync_in_flight` flag. - Updated the event loop to check for sync completion and persist state to memory upon completion. - Modified the `handle_sync` function to fire the `onSync` handler in the JS runtime asynchronously, allowing for immediate return while the sync process runs in the background. - Enhanced logging to provide feedback on sync status and completion. * fix(net): disable connection pooling in HTTP client to prevent hanging on POST requests through staging proxy * Enhance promise handling in JS call processing - Added logging to track promise resolution progress and timeout events. - Implemented a polling mechanism to drive the QuickJS job queue until promises resolve or timeout occurs. - Introduced debug information logging for stalled promises to aid in troubleshooting. - Improved feedback during polling to indicate ongoing operations. This update aims to improve the reliability and debuggability of asynchronous JavaScript calls within the application. * Refactor JS fetch implementation for synchronous behavior - Updated the `fetch` function in the QuickJS library to operate synchronously from the JavaScript perspective, blocking the thread until the HTTP request completes. - Enhanced error handling and logging for HTTP requests, including timeouts and response details. - Removed the previous asynchronous implementation to streamline the fetch operation. - Cleaned up the code by removing unused comments and improving readability. This change aims to improve the consistency and reliability of network operations within the application. * Fix Rust formatting in ops_net.rs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>