forked from molecule-ai/molecule-core
Mirrors the data-driven pattern PR #2454 set in ConfigTab: read runtime_config.providers from /templates and filter the modal's provider <select> to that subset. Same source of truth, three fewer hardcoded copies of the provider list. Behavior: - Template declares providers → dropdown shows only those. - Template ships no providers field → fall back to full HERMES_PROVIDERS catalog (back-compat for older templates / self-hosted setups). - Declared list has no overlap with our static metadata → fall back to full catalog so the form can't lock the operator out. - hermesProvider snaps back to the first available pick when its current value falls out of the filtered list. Tests: 3 new pinning the filter, no-providers-field fallback, and the unknown-providers fallback. All 27 CreateWorkspaceDialog tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| app | ||
| components | ||
| hooks | ||
| lib | ||
| store | ||
| stores | ||
| styles | ||
| types | ||
| middleware.ts | ||