- Ya
- 16 Julai 2026, 02:42 UTC
- Mwandishi
- Kamo
- Ahadi ya
- e3bf921
Upgrade the public-chat system-prompt waterfall from per-org to per-integration: PublicAiChatController now reads the X-Public-Chat-Key-Hash header (nullable) forwarded by APIService and passes it to **************** which resolves the WebChatIntegration by hash and prefers its aiSystemPrompt over the AiOrgSettings default, falling back to the generic prompt. The resolved AiChatSession is also stamped with webChatIntegrationId for stable attribution that survives key rotation. Extracted the waterfall into a static, unit-tested resolvePrompt helper (integration-wins / org-fallback / generic-fallback / blank handling).