feat: general cooking-question chatbot on the recipes homepage
The existing recipe chat (RecipeChatPanel) is tightly scoped to one recipe — recipeId is required and its system prompt embeds that recipe's full ingredient/step context. Added a sibling, not a modification: a new floating assistant on the recipes list page for questions that aren't about any specific recipe (technique, substitutions, timing, food safety). New /api/v1/ai/cooking-chat route (same quota/rate-limit/model-resolution pattern as recipe-chat, minus the recipe lookup) and CookingAssistantPanel component (same floating-button + Sheet UI). Positioned at bottom-24 rather than bottom-6 so it doesn't sit in the same band as the recipe list's floating bulk-action bar during select mode. Verified locally: asked a real cooking question through the actual UI, got a correctly-formatted markdown answer with no recipe context leaking in (confirmed the request payload only carries the question, no recipeId).
This commit is contained in:
@@ -388,6 +388,20 @@
|
||||
"inputPlaceholder": "Posez une question…",
|
||||
"send": "Envoyer le message"
|
||||
},
|
||||
"cookingChat": {
|
||||
"sorry": "Désolé, je n'ai pas pu répondre à cela.",
|
||||
"error": "Une erreur s'est produite. Veuillez réessayer.",
|
||||
"suggestion1": "Comment savoir si l'huile est assez chaude ?",
|
||||
"suggestion2": "Quel est un bon substitut au lait fermenté ?",
|
||||
"suggestion3": "Combien de temps puis-je garder des restes au frigo ?",
|
||||
"suggestion4": "Quelle est la différence entre mijoter et bouillir ?",
|
||||
"ariaLabel": "Poser une question de cuisine",
|
||||
"title": "Assistant culinaire",
|
||||
"subtitle": "Posez n'importe quelle question de cuisine — pas liée à une recette précise",
|
||||
"intro": "Demandez n'importe quoi sur la cuisine — techniques, substitutions, minutage, équipement…",
|
||||
"inputPlaceholder": "Posez une question…",
|
||||
"send": "Envoyer le message"
|
||||
},
|
||||
"servingScaler": {
|
||||
"servings": "Portions",
|
||||
"reset": "Réinitialiser",
|
||||
|
||||
Reference in New Issue
Block a user