vets-who-code-app
vets-who-code-app copied to clipboard
Use AI-generated translation as primary result in translateDuty
The translateDuty function requested 3 AI-generated sequences but returned only the preliminary terminology replacement as the main translation, wasting the AI computation.
Changes
-
src/lib/military-translator.ts:200: Use first AI-generated result as primary translation with fallback to preliminary translation
return {
original: duty,
translated: suggestions[0] || preliminaryTranslation, // Was: preliminaryTranslation
suggestions: suggestions,
confidence: 0.85,
};
This ensures the AI model output is actually utilized while maintaining graceful degradation if generation fails.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.