Builds PaperTrail from the base skeleton into a full evidence-verification platform for the "Built with Claude: Life Sciences" hackathon (Builder Track). New named-user features (Build Beyond the Bench): - Lab Notebook Companion — rough bench notes -> structured, searchable, grounded experiment records (lib/labNotebook, /console/lab-notebook, migration 0059) - Clinical Trial Matcher — de-identified patient notes -> ranked eligible ClinicalTrials.gov trials with per-criterion inclusion/exclusion reasoning (lib/trialMatcher, /console/trial-matcher, migrations 0060) Platform: - Deterministic verification moat (biostats recompute, exact-span grounding) - 11 biomedical evidence engines (FAERS, GWAS, Open Targets, ChEMBL, ClinVar, PharmGKB, PubTator, DDI, repurposing, biomarker, unified verifier) - Evidence Intelligence (KG, dossier, provenance/export, RWE) + enterprise governance (RBAC, /api/v1 gateway, metering, audit chain, retention) - 17 OSS projects assimilated into native TypeScript on our stack (backend/engines retained + credited in NOTICE) - Multi-format upload (PDF/DOCX/XLSX/CSV/MD/TXT), logo, marketing site - Next.js 16 upgrade, benchmark harness (honest smoke-test caveat) Licensing: Apache-2.0 (LICENSE + NOTICE).
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
import type { DataChatTurn } from "./types";
|
|
import { ToolTracePills } from "./ToolTracePills";
|
|
import { CitationChips } from "./CitationChips";
|
|
|
|
// One chat turn. User turns are right-aligned accent bubbles; assistant turns are
|
|
// left-aligned cards that also render the tool trace (how the answer was built from
|
|
// the org's data) and the citation trail (the org's own reports/sources/claims it's
|
|
// grounded in).
|
|
|
|
interface MessageBubbleProps {
|
|
turn: DataChatTurn;
|
|
}
|
|
|
|
export function MessageBubble({ turn }: MessageBubbleProps) {
|
|
if (turn.role === "user") {
|
|
return (
|
|
<div className="flex justify-end">
|
|
<div className="max-w-[80%] rounded-lg rounded-br-sm bg-accent px-3 py-2 text-sm text-white">
|
|
{turn.content}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<div className="flex justify-start">
|
|
<div className="max-w-[85%] rounded-lg rounded-bl-sm border border-ink/15 bg-white px-3 py-2">
|
|
<p className="whitespace-pre-wrap text-sm text-ink/80">{turn.content}</p>
|
|
{turn.toolTrace ? <ToolTracePills trace={turn.toolTrace} /> : null}
|
|
{turn.citations ? <CitationChips citations={turn.citations} /> : null}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|