mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
fix: hide Cursor models in selector when provider is disabled (#639)
* fix: hide Cursor models in selector when provider is disabled The Cursor Models section was appearing in model dropdown selectors even when the Cursor provider was toggled OFF in Settings → AI Providers. This fix adds a !isCursorDisabled check to the rendering condition, matching the pattern already used by Codex and OpenCode providers. This ensures consistency across all provider types. Fixes the issue where: - Codex/OpenCode correctly hide models when disabled - Cursor incorrectly showed models even when disabled * style: fix Prettier formatting
This commit is contained in:
committed by
GitHub
parent
641bbde877
commit
3ebd67f35f
@@ -522,6 +522,9 @@ export function PhaseModelSelector({
|
||||
return [...staticModels, ...uniqueDynamic];
|
||||
}, [dynamicOpencodeModels, enabledDynamicModelIds]);
|
||||
|
||||
// Check if providers are disabled (needed for rendering conditions)
|
||||
const isCursorDisabled = disabledProviders.includes('cursor');
|
||||
|
||||
// Group models (filtering out disabled providers)
|
||||
const { favorites, claude, cursor, codex, opencode } = useMemo(() => {
|
||||
const favs: typeof CLAUDE_MODELS = [];
|
||||
@@ -531,7 +534,6 @@ export function PhaseModelSelector({
|
||||
const ocModels: ModelOption[] = [];
|
||||
|
||||
const isClaudeDisabled = disabledProviders.includes('claude');
|
||||
const isCursorDisabled = disabledProviders.includes('cursor');
|
||||
const isCodexDisabled = disabledProviders.includes('codex');
|
||||
const isOpencodeDisabled = disabledProviders.includes('opencode');
|
||||
|
||||
@@ -1900,7 +1902,7 @@ export function PhaseModelSelector({
|
||||
);
|
||||
})}
|
||||
|
||||
{(groupedModels.length > 0 || standaloneCursorModels.length > 0) && (
|
||||
{!isCursorDisabled && (groupedModels.length > 0 || standaloneCursorModels.length > 0) && (
|
||||
<CommandGroup heading="Cursor Models">
|
||||
{/* Grouped models with secondary popover */}
|
||||
{groupedModels.map((group) => renderGroupedModelItem(group))}
|
||||
|
||||
Reference in New Issue
Block a user