refactor: extract model download path helpers - #1302
Conversation
|
Warning Review limit reached
Next review available in: 45 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughModel filename utilities and installation-aware model existence checks were moved into dedicated modules. ComfyDownloadManager now re-exports compatibility APIs, while standalone template handling uses static imports and dedicated filename utilities. ChangesModel path resolution and template integration
Sequence Diagram(s)sequenceDiagram
participant TemplateCards
participant areModelsPresent
participant resolveDownloadContextById
participant regularFileExists
TemplateCards->>areModelsPresent: requested models and installationId
areModelsPresent->>resolveDownloadContextById: resolve installation context
resolveDownloadContextById-->>areModelsPresent: search context or null
areModelsPresent->>regularFileExists: check candidate paths
regularFileExists-->>areModelsPresent: file existence results
areModelsPresent-->>TemplateCards: presence result
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The extraction left comfyDownloadManager re-exporting all five moved symbols, but only getModelsBaseDir still had a production consumer and stripQueryParams had none at all. Point the remaining consumers at the leaf modules directly so the facade carries no download-path surface.
Split A of #1249.
Summary
comfyDownloadManager.ts.Stack
mainValidation
pnpm run typecheckpnpm run lintpnpm run buildpnpm run test— 2,853 passed, 1 skippedThis mechanical slice can use the normal release path.