Fix ai-service Dockerfile: bake in drug_entities.json, override its path
This commit is contained in:
+18
-4
@@ -73,16 +73,30 @@ export default function ChatPage() {
|
||||
setShowMobileSidebar(false);
|
||||
};
|
||||
|
||||
const handleCitationClick = (citation: Citation, index: number) => {
|
||||
const handleCitationClick = (citation: Citation, index: number, allCitations: Citation[]) => {
|
||||
// Found live 2026-08-07: this used to only set the index into whatever
|
||||
// `citations` array was last loaded (i.e. the MOST RECENT answer's), so
|
||||
// clicking [1] on an older message showed a LATER message's unrelated
|
||||
// drug in the evidence panel (reported live: clicking Omeprazol's own
|
||||
// citation showed Kanamycin). The clicked message's own citation list
|
||||
// must replace the panel's state, not just the index into a stale one.
|
||||
setCitations(allCitations);
|
||||
setActiveCitationIndex(index);
|
||||
setShowMobileEvidence(true);
|
||||
};
|
||||
|
||||
const handleCitationsLoaded = (newCitations: Citation[]) => {
|
||||
setCitations(newCitations);
|
||||
if (newCitations.length > 0) {
|
||||
setActiveCitationIndex(1);
|
||||
}
|
||||
// Deliberately NOT auto-activating citation 1 here (removed
|
||||
// 2026-08-07): this used to fire the beam connector line + card
|
||||
// highlight on every single answer, unprompted, and — since
|
||||
// `CitationBeamOverlay` only recomputes its coordinates on window
|
||||
// resize/scroll, not on the content reflow a just-arrived answer
|
||||
// itself causes — the line frequently ended up pointing at stale
|
||||
// positions, i.e. exactly the "dây trích dẫn dính lung tung" (messy
|
||||
// citation wire) reported live. The beam/highlight now only appears
|
||||
// when the user actually clicks a citation, at which point the
|
||||
// coordinates are computed fresh.
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user