mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
Add a scoped 'Chat about this document' panel beneath the Read-with-AI actions. Opens a conversation grounded only in the document's stored text: a message list + input streaming the assistant reply token-by-token over the SSE route, with prior turns loaded via GET. - Availability: the panel renders in the provider-available branch of the AI section (a pure chatSlot keeps the section statically renderable), and gates internally on whether the document is content-indexed. Not indexed shows a calm read-it-first hint, never an error. - Plain-text only: assistant prose renders via ProseBlocks / StreamedProse as React children (no markdown library, no dangerouslySetInnerHTML). - Streaming reuses the Coach SSE frame parser; the wire frames are a subset. - A one-line safety note states answers describe the document and are not medical advice, consistent with the summary panel's not-a-diagnosis. - Query keys via the central factory; history invalidated on the done frame. - i18n x6 for every new string.