exo
exo copied to clipboard
refactor(tinychat): improve download progress polling mechanism
- Add exponential backoff retry strategy for download progress polling
- Replace interval-based polling with while loop and dynamic intervals
- Add isPolling flag to prevent concurrent polling
- Add allProgressComplete flag for better completion tracking
- Remove downloadProgressInterval as it's no longer needed
- Optimize polling termination conditions
The changes make the download progress tracking more efficient and reliable by:
- Using exponential backoff (1s to 32s) when no progress is detected
- Automatically stopping polling after max retries or completion
- Preventing multiple concurrent polling operations