Wire up query history: localStorage session persistence + sidebar UI

This commit is contained in:
2026-08-14 17:44:36 +07:00
parent 9be5819710
commit 057d4ed9dc
23 changed files with 1231 additions and 30 deletions
+13
View File
@@ -306,6 +306,19 @@ export function ChatBubble({
: renderStructuredContent(message.content, message.citations)}
</div>
{/* Per-message disclaimer — `message.disclaimer` is populated by the
backend on every message (including abstain/clarify), never by
the model itself (`rag/answer.py`'s DISCLAIMER constant); this was
already flowing end-to-end but nothing rendered it, so it only
ever surfaced as one page-level banner (`DisclaimerBanner`), not
per answer as F-HT #22 ("mọi câu trả lời y tế đều có") requires. */}
{message.disclaimer && (
<p className="mt-1.5 px-4 flex items-start gap-1.5 text-[0.7rem] leading-snug text-txt-muted">
<Info className="h-3 w-3 shrink-0 mt-0.5" />
<span>{message.disclaimer}</span>
</p>
)}
{/* Quick-reply chips — only for a clarify turn the model gave a few
natural discrete answers to; free text always still works. */}
{onQuickReply && message.quickReplies && message.quickReplies.length > 0 && (