From 4115110c0641016311daa239e5287242d5bcd6f5 Mon Sep 17 00:00:00 2001 From: Kacper Date: Mon, 29 Dec 2025 22:21:01 +0100 Subject: [PATCH] feat: Update ProfileForm to conditionally display enabled Cursor models - Integrated useAppStore to fetch enabledCursorModels for dynamic rendering of Cursor model selection. - Added a message to inform users when no Cursor models are enabled, guiding them to settings for configuration. - Refactored the model selection logic to filter available models based on the enabled list, enhancing user experience and clarity. --- .../profiles-view/components/profile-form.tsx | 85 +++++++++++-------- 1 file changed, 48 insertions(+), 37 deletions(-) diff --git a/apps/ui/src/components/views/profiles-view/components/profile-form.tsx b/apps/ui/src/components/views/profiles-view/components/profile-form.tsx index 370e7cd2..38ba7483 100644 --- a/apps/ui/src/components/views/profiles-view/components/profile-form.tsx +++ b/apps/ui/src/components/views/profiles-view/components/profile-form.tsx @@ -17,6 +17,7 @@ import type { CursorModelId, } from '@automaker/types'; import { CURSOR_MODEL_MAP, cursorModelHasThinking } from '@automaker/types'; +import { useAppStore } from '@/store/app-store'; import { CLAUDE_MODELS, THINKING_LEVELS, ICON_OPTIONS } from '../constants'; interface ProfileFormProps { @@ -34,6 +35,8 @@ export function ProfileForm({ isEditing, hotkeyActive, }: ProfileFormProps) { + const { enabledCursorModels } = useAppStore(); + const [formData, setFormData] = useState({ name: profile.name || '', description: profile.description || '', @@ -223,46 +226,54 @@ export function ProfileForm({ Cursor Model
- {Object.entries(CURSOR_MODEL_MAP).map(([id, config]) => ( -
- - ))} + {config.label} +
+ {config.hasThinking && ( + + Thinking + + )} + + {config.tier} + +
+ + )) + )} {formData.cursorModel && cursorModelHasThinking(formData.cursorModel) && (