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": "Ask a question…",
|
||||
"send": "Send message"
|
||||
},
|
||||
"cookingChat": {
|
||||
"sorry": "Sorry, I couldn't answer that.",
|
||||
"error": "Something went wrong. Please try again.",
|
||||
"suggestion1": "How do I know when oil is hot enough?",
|
||||
"suggestion2": "What's a good substitute for buttermilk?",
|
||||
"suggestion3": "How long can I keep leftovers in the fridge?",
|
||||
"suggestion4": "What's the difference between simmering and boiling?",
|
||||
"ariaLabel": "Ask a cooking question",
|
||||
"title": "Cooking assistant",
|
||||
"subtitle": "Ask any cooking question — not tied to a specific recipe",
|
||||
"intro": "Ask anything about cooking — techniques, substitutions, timing, equipment…",
|
||||
"inputPlaceholder": "Ask a question…",
|
||||
"send": "Send message"
|
||||
},
|
||||
"servingScaler": {
|
||||
"servings": "Servings",
|
||||
"reset": "Reset",
|
||||
|
||||
Reference in New Issue
Block a user