fix(ui): Use phaseModels.validationModel instead of legacy field

Update use-issue-validation hook to use the new phaseModels structure
for validation model selection instead of deprecated validationModel field.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kacper
2025-12-30 14:17:53 +01:00
parent 24599e0b8c
commit 2be0e7d5f0

View File

@@ -23,7 +23,7 @@ export function useIssueValidation({
onValidationResultChange,
onShowValidationDialogChange,
}: UseIssueValidationOptions) {
const { currentProject, validationModel, muteDoneSound } = useAppStore();
const { currentProject, phaseModels, muteDoneSound } = useAppStore();
const [validatingIssues, setValidatingIssues] = useState<Set<number>>(new Set());
const [cachedValidations, setCachedValidations] = useState<Map<number, StoredValidation>>(
new Map()
@@ -233,8 +233,8 @@ export function useIssueValidation({
description: 'You will be notified when the analysis is complete',
});
// Use provided model override or fall back to global validationModel
const modelToUse = model || validationModel;
// Use provided model override or fall back to phaseModels.validationModel
const modelToUse = model || phaseModels.validationModel;
try {
const api = getElectronAPI();
@@ -264,7 +264,7 @@ export function useIssueValidation({
currentProject?.path,
validatingIssues,
cachedValidations,
validationModel,
phaseModels.validationModel,
onValidationResultChange,
onShowValidationDialogChange,
]