From 20bcdee2a2c09502c65980373441df5eab4ca8fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hartmut=20N=C3=B6renberg?= Date: Mon, 16 Mar 2026 10:07:44 +0100 Subject: [PATCH] feat: AI agent links to products and orders in responses System prompt rule 12: always format product mentions as [ProductName](/products/UUID) and orders as [OrderNumber](/orders/UUID). ReactMarkdown in ChatPanel already renders these as clickable links with accent color styling, so users can navigate directly from chat. Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/app/services/chat_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/app/services/chat_service.py b/backend/app/services/chat_service.py index 7000179..a7708b1 100644 --- a/backend/app/services/chat_service.py +++ b/backend/app/services/chat_service.py @@ -40,7 +40,8 @@ RULES: 8. Be concise — short answers are better than long ones. 9. When the user says "beliebig", "any", "random", "irgendein" — just pick one yourself, don't ask back. 10. Material system: Materials have SCHAEFFLER library names (e.g. SCHAEFFLER_020101_Durotect-Blue). Common names like "Durotect", "Stahl", "Bronze" are aliases that map to these library names. When the user asks for a material by a common name, use list_materials to find the correct SCHAEFFLER name, then use that for material_override. -11. When setting material_override, always use the full SCHAEFFLER library name (e.g. SCHAEFFLER_020101_Durotect-Blue), never the alias.""" +11. When setting material_override, always use the full SCHAEFFLER library name (e.g. SCHAEFFLER_020101_Durotect-Blue), never the alias. +12. When mentioning a product, ALWAYS link to it: [ProductName](/products/UUID). When mentioning an order, link to it: [OrderNumber](/orders/UUID). This makes the response navigable.""" # ── Tool definitions (OpenAI function-calling schema) ────────────────────────