Commit e72678e
committed
- Refactor: Enable concurrent model downloads
This change refactors the model download service to support downloading multiple models simultaneously.
Key changes:
- Replaced the single `downloadState` with a `downloadStates` map, allowing individual tracking of each download's progress, keyed by model ID.
- Each download now runs in its own coroutine job and displays a separate notification, preventing conflicts.
- Cancellation is now specific to a model ID, allowing users to cancel individual downloads without affecting others.
- Implemented robust cleanup logic to delete temporary files and remove download state upon completion, cancellation, or error.
- Added a new `EmbeddingModelDownloadWorker` to handle the download of the embedding model in the background, separate from the main model download service.1 parent fa84fdf commit e72678e
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments