calorie-ai-android/web
Daniel a4e44201a2 Fix AI nutrition extraction: robust parser + better prompt
- NutritionParser now handles short key aliases (protein/carbs/fat instead of
  proteinGrams/carbsGrams/fatGrams), string-typed numbers, surrounding prose,
  and multi-line markdown fences reliably
- safeInt/safeDouble helpers check multiple key names in priority order and
  handle Number, String, and missing values without throwing
- Nutrition prompt now includes an explicit JSON example so all models return
  the expected format regardless of their default style
- Same fixes applied to web app parseEstimate (aliases + fence stripping)
- Extended NutritionParserTest to cover aliases, string numbers, surrounding text

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 15:39:33 +02:00
..
public Revamp web app with Svelte and Tailwind 2026-05-19 18:53:03 +02:00
src Fix AI nutrition extraction: robust parser + better prompt 2026-05-20 15:39:33 +02:00
tests Refactor Android app to production grade with improved UI and sync 2026-05-20 05:32:01 +02:00
.dockerignore Add web auth and app navigation 2026-05-19 17:59:02 +02:00
.env.example Revamp web app with Svelte and Tailwind 2026-05-19 18:53:03 +02:00
docker-compose.yml Revamp web app with Svelte and Tailwind 2026-05-19 18:53:03 +02:00
Dockerfile Revamp web app with Svelte and Tailwind 2026-05-19 18:53:03 +02:00
index.html Revamp web app with Svelte and Tailwind 2026-05-19 18:53:03 +02:00
package-lock.json Update web plans and app capture 2026-05-20 00:48:52 +02:00
package.json Update web plans and app capture 2026-05-20 00:48:52 +02:00
playwright.config.js Revamp web app with Svelte and Tailwind 2026-05-19 18:53:03 +02:00
server.js Refactor Android app to production grade with improved UI and sync 2026-05-20 05:32:01 +02:00
vite.config.js Revamp web app with Svelte and Tailwind 2026-05-19 18:53:03 +02:00