Introduce per-page progress events for PDF parsing by adding onPageStarted hooks throughout the compute worker and core PDF pipeline. Add compute/worker/src/pdf-progress.ts to encapsulate progress event builders. Update server logic to emit page start and page parsed events, improving client feedback during long-running PDF jobs. Add src/lib/server/compute/abort-like-error.ts and integrate isAbortLikeError to robustly detect and suppress expected aborts in API event streaming. Update API route to ignore abort-like errors on worker proxy crash. Add unit tests for abort-like error detection and PDF progress event generation. Refactor PDF parse logic to allow empty merged regions without throwing, ensuring downstream flows remain resilient to edge cases. These changes improve observability, error handling, and reliability for document parsing and event streaming. |
||
|---|---|---|
| .. | ||
| api-contracts | ||
| config | ||
| control-plane | ||
| platform | ||
| types | ||
| whisper | ||
| index.ts | ||
| local-runtime.ts | ||