model-selection
/model-selection
Wdraża i sprawdza wybór skonfigurowanych modeli w aplikacji desktopowej przez wspólny komponent ModelSelect z grupowaniem dostawców.
- Autor
- ApexGP ↗
- Repozytorium
- cursor-byok ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 13.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Wdraża i sprawdza wybór skonfigurowanych modeli w aplikacji desktopowej przez wspólny komponent ModelSelect z grupowaniem dostawców.
Oryginalny opis (EN)
Implement and review desktop selection of configured models through the unified grouped ModelSelect component. Use when adding or changing model dropdowns, model filters, Commit model settings, single-model selection, multi-model selection, provider grouping, or configured-model option construction under apps/desktop.
Jak działa
- Component boundary
- Option contract
- Modes
- Floating-menu invariants
- Review checklist
Podgląd SKILL.md
---
name: model-selection
description: Implement and review desktop selection of configured models through the unified grouped ModelSelect component. Use when adding or changing model dropdowns, model filters, Commit model settings, single-model selection, multi-model selection, provider grouping, or configured-model option construction under apps/desktop.
---
# Model Selection
Use one presentation component for every UI that selects from already configured models:
```text
apps/desktop/src/
├── shared/ui/
│ ├── ModelSelect.tsx # Single/multiple selection behavior and grouped floating menu
│ └── ModelSelect.module.scss # Trigger, provider headers, checkbox rows, and footer
├── shared/utils/
│ └── modelProvider.ts # Built-in model provider display name
└── features/
├── home/ # Builds overview multi-select options
└── settings/ # Builds Commit single-select options and persists selection
server/src/
├── cursor/services/commit_message.rs # Validates configured model IDs and creates Commit invocation
└── provider/router.rs # Routes stable IDs to the configured model adapters
```
## Component boundary
- Use `ModelSelect` when choosing one or more existing configured models.
- Do not implement another model dropdown, reuse generic `Select`, or add a compatibility wrapper for configured-model selection.
- Keep `ModelSelect` presentation-only. Pages own model state, option construction, filtering, and persistence.
- Keep editable model-ID entry in `Combobox`; creating or editing a model identifier is input, not configured-model selection.
- Delete replaced model-selection components, exports, styles, helpers, and compatibility paths once references are gone.
## Option contract
Construct every `ModelSelectOption` with:
- `value`: stable persisted/request identifier, always `model_hash`.
- `label`: user-facing model display name.
- `group`: supplier display name.
- `icon`/`iconSrc`: model/provider icon when available.
Derive `group` with `modelProviderName(model)`. It uses the configured `group_name` first and the API hostname otherwise.
Preserve source order within each supplier. The first occurrence of a supplier determines group order.
## Modes
```text
Single owner value: string
└── <ModelSelect mode="single"> ── choose one ── close ── persist
Multiple owner value: string[]
└── <ModelSelect mode="multiple"> ── toggle many ── remain open ── apply/filter
```
- Both modes render classic checkbox controls in option rows.
- Single mode allows exactly one checked option and closes immediately after selection.
- Multiple mode supports toggling, clearing, selecting all, and selecting none.
- In multiple mode, every supplier header has a checkbox: unchecked means none selected, checked means all selected, and indeterminate means some selected. Toggling it selects or clears that supplier.
- Indent child model rows relative to their supplier header so hierarchy remains visible.
- Commit always uses single mode and includes configured models only. Its `直连` option has value `""`, belongs to the `Cursor` group, and is the first option.
- Commit settings follow the settings-card edit-state pattern: read mode shows the persisted model, Edit creates a local draft, selection only changes that draft, Cancel restores the persisted value, and Save persists once before returning to read mode.
- Persist the stable `model_hash` unchanged. Commit generation validates that identifier against `model_configs`, then lets `ProviderRouter` dispatch it.
- Overview filtering uses multiple mode.
## Floating-menu invariants
Also apply the project `floating-ui` and `frontend` skills:
- Render the menu through a body portal and position it with `@floating-ui/dom`.
- Keep supplier headers and checkbox options inside the virtualized list; keep multi-select bulk actions outside it.
- Close on Escape and outside pointer interaction, then restore trigger focus.
- Preserve `aria-expanded`, `aria-controls`, `aria-haspopup`, listbox semantics, and multi-select semantics.
- Keep the trigger's open/focus border visible while the portaled menu owns focus.
## Review checklist
- Search the repository for old model-selection components and zero-reference model option helpers; delete them instead of retaining fallbacks.
- Confirm all configured-model selectors import `shared/ui/ModelSelect`.
- Confirm no feature implements checkbox selection, supplier grouping, portal positioning, or bulk actions independently.
- Confirm single/multiple value types cannot be mixed.
- Confirm Commit has `直连` first and cannot select multiple values.
- Confirm supplier labels are based on supplier identity, not request protocol type.
- Follow the user's validation instruction; when automated tests are not requested, report manual checks without running test or build commands.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · ApexGP/cursor-byok | 100 | MIT |
| bis-med-it/marco-BIS | 100 | Apache-2.0 |
| Aperivue/medsci-skills | 100 | MIT |
| nimadorostkar/Claude-Skills-collection | 100 | MIT |
| tlkppm/ModelBridge | 100 | MIT |
| SimonFoote-greensparx/CopilotForge | 100 | CC-BY-4.0 |
| awslabs/agent-plugins | 100 | Apache-2.0 |
| github/gh-aw | 96 | MIT |
| solidplussol/jarvis-squad-starter | 96 | AGPL-3.0 |
Migawka bazy z 13.11.2026 · wersja paczki 48f70f5b3aa6 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100cursor-model-selection
Konfiguruje i dobiera modele AI w Cursor, np. GPT i Claude. - 100cursor-model-selection
Konfiguruje i dobiera modele AI w Cursor dla Chat, Composera i trybu Agent, w tym tryb auto. - 100frontend
Wdraża i sprawdza frontend pulpitowej aplikacji React i Tauri: routing, układ, ustawienia, wykresy i motywy. - 100socai-model-sync
Odświeża i waliduje katalog modeli LLM socai dla aplikacji desktopowej i CLI. - 88testing-windows-desktop
Przeprowadza test end-to-end aplikacji desktopowej pi-gui na Windows: start, PATH, wybór folderu i terminal zintegrowany.