feat: Enhance AutoModeService and UI for Cursor model support

- Updated AutoModeService to track model and provider for running features, improving logging and state management.
- Modified AddFeatureDialog to handle model selection for both Claude and Cursor, adjusting thinking level logic accordingly.
- Expanded ModelSelector to allow provider selection and dynamically display models based on the selected provider.
- Introduced new model constants for Cursor models, integrating them into the existing model management structure.
- Updated README and project plan to reflect the completion of task execution integration for Cursor models.
This commit is contained in:
Shirone
2025-12-28 01:43:57 +01:00
parent de11908db1
commit c90f12208f
6 changed files with 233 additions and 51 deletions

View File

@@ -1,12 +1,16 @@
import type { AgentModel, ThinkingLevel } from '@/store/app-store';
import type { ModelProvider } from '@automaker/types';
import { CURSOR_MODEL_MAP } from '@automaker/types';
import { Brain, Zap, Scale, Cpu, Rocket, Sparkles } from 'lucide-react';
export type ModelOption = {
id: AgentModel;
id: string; // Claude models use AgentModel, Cursor models use "cursor-{id}"
label: string;
description: string;
badge?: string;
provider: 'claude';
provider: ModelProvider;
hasThinking?: boolean;
tier?: 'free' | 'pro';
};
export const CLAUDE_MODELS: ModelOption[] = [
@@ -33,6 +37,26 @@ export const CLAUDE_MODELS: ModelOption[] = [
},
];
/**
* Cursor models derived from CURSOR_MODEL_MAP
* ID is prefixed with "cursor-" for ProviderFactory routing
*/
export const CURSOR_MODELS: ModelOption[] = Object.entries(CURSOR_MODEL_MAP).map(
([id, config]) => ({
id: `cursor-${id}`,
label: config.label,
description: config.description,
provider: 'cursor' as ModelProvider,
hasThinking: config.hasThinking,
tier: config.tier,
})
);
/**
* All available models (Claude + Cursor)
*/
export const ALL_MODELS: ModelOption[] = [...CLAUDE_MODELS, ...CURSOR_MODELS];
export const THINKING_LEVELS: ThinkingLevel[] = ['none', 'low', 'medium', 'high', 'ultrathink'];
export const THINKING_LEVEL_LABELS: Record<ThinkingLevel, string> = {