mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 22:19:39 +02:00
Wires the new backend endpoints into the unified Mana app and rebuilds the meal-add page around two modes: - Text mode: free-text description + optional "✨ KI-Vorschlag" button that runs Gemini on the description and prefills all six nutrient fields. The badge auto-clears if the user edits the description so stale estimates can't be silently saved. - Foto mode: file picker (accept=image/*, capture=environment for mobile camera) → preview → upload to mana-media → Gemini Vision on the stored URL. Result prefills the same form fields for review. Re-analyze without re-upload is supported. Both modes show a confidence badge (green ≥50 %, yellow with a "prüfen" warning below). Save is disabled in foto mode until the upload+analysis has completed, so a meal can never be persisted with a dangling photo reference. New module files: - api.ts server-only client (uploadMealPhoto, analyzeMealPhoto, analyzeMealText) - mutations.ts mealMutations.create / .createFromPhoto / .delete + photoMutations keeps the encryption pattern explicit (clone → encrypt → write, return plaintext snapshot) Touched: - queries.ts propagate photoMediaId/photoUrl through toMealWithNutrition - index.ts export the new mutations + types - registry.ts extend the meals comment to document why nutrition, photoMediaId, photoUrl and confidence stay plaintext - +page.svelte / history/+page.svelte show 64×64 / 48×48 thumbnail + 📷 indicator for photo-mode meals Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| calc/packages/shared | ||
| calendar | ||
| cards | ||
| chat | ||
| citycorners | ||
| contacts | ||
| context | ||
| docs | ||
| guides | ||
| inventar | ||
| mana | ||
| manavoxel | ||
| memoro | ||
| moodlit | ||
| mukke | ||
| news | ||
| nutriphi | ||
| photos | ||
| picture | ||
| planta | ||
| presi | ||
| questions | ||
| skilltree | ||
| storage | ||
| times | ||
| todo | ||
| traces | ||
| uload | ||
| zitare/packages/content | ||