vets-who-code-app icon indicating copy to clipboard operation
vets-who-code-app copied to clipboard

Use AI-generated translation as primary result in translateDuty

Open Copilot opened this issue 3 months ago • 2 comments

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.

Copilot avatar Nov 16 '25 20:11 Copilot