feat: Enhance Cursor model selection and profile handling

- Updated AddFeatureDialog to support both Cursor and Claude profiles, allowing for dynamic model and thinking level selection based on the chosen profile.
- Modified ModelSelector to filter available Cursor models based on global settings and display a warning if the Cursor CLI is not available.
- Enhanced ProfileQuickSelect to handle both profile types and improve selection logic for Cursor profiles.
- Refactored CursorSettingsTab to manage global settings for enabled Cursor models and default model selection, streamlining the configuration process.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
Kacper
2025-12-29 22:17:07 +01:00
parent fa23a7b8e2
commit 8e10f522c0
6 changed files with 184 additions and 154 deletions

View File

@@ -327,12 +327,23 @@ export function AddFeatureDialog({
});
};
const handleProfileSelect = (model: AgentModel, thinkingLevel: ThinkingLevel) => {
setNewFeature({
...newFeature,
model,
thinkingLevel,
});
const handleProfileSelect = (profile: AIProfile) => {
if (profile.provider === 'cursor') {
// Cursor profile - set cursor model
const cursorModel = `cursor-${profile.cursorModel || 'auto'}`;
setNewFeature({
...newFeature,
model: cursorModel as AgentModel,
thinkingLevel: 'none', // Cursor handles thinking internally
});
} else {
// Claude profile
setNewFeature({
...newFeature,
model: profile.model || 'sonnet',
thinkingLevel: profile.thinkingLevel || 'none',
});
}
};
// Cursor models handle thinking internally, so only show thinking selector for Claude models
@@ -529,6 +540,7 @@ export function AddFeatureDialog({
profiles={aiProfiles}
selectedModel={newFeature.model}
selectedThinkingLevel={newFeature.thinkingLevel}
selectedCursorModel={isCursorModel ? newFeature.model : undefined}
onSelect={handleProfileSelect}
showManageLink
onManageLinkClick={() => {