mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 09:13:08 +00:00
feat: add AI Suggestions phase model to settings view
- Introduced a new phase model for AI Suggestions, enhancing the functionality of the settings view. - Updated the phase model handling to utilize DEFAULT_PHASE_MODELS as a fallback, ensuring robust behavior when specific models are not set. - This addition improves the user experience by providing more options for project analysis and suggestions.
This commit is contained in:
@@ -4,6 +4,7 @@ import { useAppStore } from '@/store/app-store';
|
|||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { PhaseModelSelector } from './phase-model-selector';
|
import { PhaseModelSelector } from './phase-model-selector';
|
||||||
import type { PhaseModelKey } from '@automaker/types';
|
import type { PhaseModelKey } from '@automaker/types';
|
||||||
|
import { DEFAULT_PHASE_MODELS } from '@automaker/types';
|
||||||
|
|
||||||
interface PhaseConfig {
|
interface PhaseConfig {
|
||||||
key: PhaseModelKey;
|
key: PhaseModelKey;
|
||||||
@@ -58,6 +59,11 @@ const GENERATION_TASKS: PhaseConfig[] = [
|
|||||||
label: 'Project Analysis',
|
label: 'Project Analysis',
|
||||||
description: 'Analyzes project structure for suggestions',
|
description: 'Analyzes project structure for suggestions',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'suggestionsModel',
|
||||||
|
label: 'AI Suggestions',
|
||||||
|
description: 'Model for feature, refactoring, security, and performance suggestions',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
function PhaseGroup({
|
function PhaseGroup({
|
||||||
@@ -83,7 +89,7 @@ function PhaseGroup({
|
|||||||
key={phase.key}
|
key={phase.key}
|
||||||
label={phase.label}
|
label={phase.label}
|
||||||
description={phase.description}
|
description={phase.description}
|
||||||
value={phaseModels[phase.key]}
|
value={phaseModels[phase.key] ?? DEFAULT_PHASE_MODELS[phase.key]}
|
||||||
onChange={(model) => setPhaseModel(phase.key, model)}
|
onChange={(model) => setPhaseModel(phase.key, model)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user