summaryrefslogtreecommitdiff
path: root/services/ai_service.py
AgeCommit message (Collapse)Author
2026-05-12Pantry-first AI prompts, recipe editing, and grocery copyHEADmasterTyler Hoang
- Rewrite menu generation to build recipes around existing pantry ingredients (max 4-5 extras per recipe); add in_pantry flag per ingredient for downstream accuracy - Flip grocery list logic to ONLY include items not in the pantry, with explicit cross-check rule instead of include-everything default - Strengthen no-menu grocery prompt to handle empty vs. stocked pantry - Rewrite Commis chat system prompt to treat kitchen context as source of truth with explicit response rules per query type - Align replacement/single-recipe prompts to prefer pantry coverage - Update system_prompt default to reflect pantry-first identity - Add PUT /api/recipes/:id endpoint for recipe editing - Add inline edit mode to recipe detail page (name, type, ingredients, instructions, time, servings) - Add Copy button to grocery list (exports markdown checklist) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09Recipe detail page, menu revamp, and UX improvementsTyler Hoang
- Add recipe detail page (recipe.html) with full ingredients and instructions - Simplify menu tab: cards show name + description only, click through for full recipe - Add description field to Recipe model with DB migration - Add AI-generated descriptions to menu, swap, and import prompts - Add single dish by description (POST /api/menus/current/recipes) - Add grocery item delete without pantry add (DELETE /api/grocery/{id}/items) - Persist grocery checked state server-side (PATCH /api/grocery/{id}/check-item) - Hash-based tab routing — refresh stays on current tab - Logo branding in header and favicon - Dark theme fixes: URL/text inputs, amber accent, muted danger/warning colors - Markdown rendering in chat (bold, italic, code blocks, lists, headers) - Fix instruction step splitting for inline-numbered steps (1. 2. 3.) - Import recipe from URL with JSON-LD structured data + AI fallback Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09Remove expiry and quantity from AI context and promptsTyler Hoang
- Strip quantity, unit, and expiry from pantry data sent to AI (name + category only) - Remove "prioritize expiring soon" guideline from menu generation prompt - Remove EXPIRING SOON section from pantry-only grocery prompt - SYSTEM_PROMPT in .env (gitignored) updated to drop expiry/quantity priorities Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08Add recipe suggestions, chat tab, and major workflow improvementsTyler Hoang
- Replace 7-day grid menu with browsable recipe suggestion cards (swap, remove, make this) - Add Chat tab: conversational AI with full pantry/menu/grocery context - Grocery list works without a menu (pantry-only mode) - Individual grocery checkboxes auto-add items to pantry - Swap modal with optional preference input - User notes textarea on menu and grocery generation - Clear button for menu and grocery list - LLM notes/summary displayed after generation, persisted to DB - Favicon linked in HTML - Category dropdown styled for dark theme - System prompt configurable via SYSTEM_PROMPT in .env - Fix startup error (ollama_timeout default), DB migration for menu_plans.notes - Simplify: batch N+1 queries, extract _current_monday(), merge chat sync fns, asyncio.get_running_loop(), fix currentGroceryId bug, cap chat history Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08Initial commit — Commis personal chef appTyler Hoang
AI-powered local chef tool: pantry tracking, meal logging, rotating weekly menu generation, and grocery list optimization via Ollama (llama3). FastAPI backend, SQLite, vanilla JS frontend. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>