Some checks failed
Build & release Android APK / Build signed APK (push) Has been cancelled
Build TWA APK / build-apk (push) Has been cancelled
Build & Push Docker Image / Build linux/amd64 (push) Has been cancelled
Build & Push Docker Image / Build linux/arm64 (push) Has been cancelled
Build & Push Docker Image / Merge manifests (push) Has been cancelled
121 lines
9.2 KiB
HTML
121 lines
9.2 KiB
HTML
<div class="module-header assistant-header">
|
|
<div>
|
|
<h2><i class="fas fa-brain" style="color:var(--purple);"></i> AI Clinical Assistant</h2>
|
|
<p>Ask focused clinical questions over indexed Nextcloud books/resources. Answers should synthesize retrieved evidence and cite book/resource titles with pages.</p>
|
|
</div>
|
|
<div class="assistant-status" id="assistant-status">
|
|
<span class="assistant-dot"></span>
|
|
<span id="assistant-status-text">Ready</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="assistant-layout">
|
|
<section class="assistant-main card">
|
|
<div class="assistant-toolbar">
|
|
<div>
|
|
<strong>Clinical Question</strong>
|
|
<span id="assistant-model-label" class="model-tag">Admin model</span>
|
|
</div>
|
|
<div class="assistant-toolbar-actions">
|
|
<button id="btn-assistant-clear" class="btn-sm btn-ghost" type="button"><i class="fas fa-rotate-left"></i> Clear</button>
|
|
<button id="btn-assistant-copy" class="btn-sm btn-ghost" type="button"><i class="fas fa-copy"></i> Copy answer</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="assistant-messages" class="assistant-messages" aria-live="polite">
|
|
<div class="assistant-empty">
|
|
<i class="fas fa-book-medical"></i>
|
|
<h3>Evidence-first pediatric assistant</h3>
|
|
<p>Ask a real clinical question. Short greetings or vague inputs get a short clarifying response instead of unnecessary textbook output.</p>
|
|
<div class="assistant-examples">
|
|
<button type="button" data-assistant-example="In a 4-year-old with acute wheeze, when should magnesium sulfate be considered and what dose is recommended?">Status asthma escalation</button>
|
|
<button type="button" data-assistant-example="What are the red flags for bilious vomiting in neonates, and what immediate workup is recommended?">Bilious vomiting</button>
|
|
<button type="button" data-assistant-example="Compare bronchiolitis and asthma management in infants, citing pediatric references.">Bronchiolitis vs asthma</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<form id="assistant-form" class="assistant-composer">
|
|
<textarea id="assistant-input" rows="3" placeholder="Ask a focused clinical question..." autocomplete="off"></textarea>
|
|
<div class="assistant-composer-footer">
|
|
<label class="assistant-check"><input type="checkbox" id="assistant-include-context" checked> retrieve broader context</label>
|
|
<button id="btn-assistant-send" class="btn-generate" type="submit"><i class="fas fa-paper-plane"></i> Ask</button>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
|
|
<aside class="assistant-side">
|
|
<div class="card">
|
|
<div class="card-header"><h3><i class="fas fa-wand-magic-sparkles"></i> Image / Graph</h3></div>
|
|
<div class="assistant-side-body">
|
|
<textarea id="assistant-image-prompt" rows="4" placeholder="Generate a teaching image, pathway, or infographic from the current answer..."></textarea>
|
|
<button id="btn-assistant-image" class="btn-sm btn-primary" type="button"><i class="fas fa-image"></i> Generate image</button>
|
|
<div id="assistant-visual-output" class="assistant-visual-output"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-header"><h3><i class="fas fa-quote-right"></i> Sources</h3></div>
|
|
<div id="assistant-sources" class="assistant-sources">
|
|
<p class="assistant-muted">Citations appear here after an answer.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-header"><h3><i class="fas fa-circle-info"></i> Behavior</h3></div>
|
|
<div class="assistant-side-body assistant-muted">
|
|
<p>Answers should be concise, clinically practical, and citation-grounded.</p>
|
|
<p>If the input is only a greeting or too vague, the assistant should ask what you want to look up.</p>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
</div>
|
|
|
|
<style>
|
|
.assistant-header { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
|
|
.assistant-status { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--g500); background:white; border:1px solid var(--g200); border-radius:999px; padding:5px 10px; box-shadow:var(--shadow); }
|
|
.assistant-dot { width:8px; height:8px; border-radius:50%; background:var(--green); display:inline-block; }
|
|
.assistant-status.busy .assistant-dot { background:var(--amber); animation:pulse 1.5s infinite; }
|
|
.assistant-status.error .assistant-dot { background:var(--red); }
|
|
.assistant-layout { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:14px; align-items:start; }
|
|
.assistant-main { display:grid; grid-template-rows:auto minmax(420px,1fr) auto; min-height:calc(100vh - 190px); }
|
|
.assistant-toolbar { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid var(--g200); background:var(--g50); }
|
|
.assistant-toolbar-actions { display:flex; gap:6px; flex-wrap:wrap; }
|
|
.assistant-messages { padding:16px; overflow-y:auto; background:linear-gradient(180deg,#fff,var(--g50)); }
|
|
.assistant-empty { max-width:680px; margin:50px auto; text-align:center; color:var(--g500); }
|
|
.assistant-empty i { font-size:34px; color:var(--purple); margin-bottom:10px; }
|
|
.assistant-empty h3 { color:var(--g800); font-size:18px; margin-bottom:6px; }
|
|
.assistant-examples { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; margin-top:16px; }
|
|
.assistant-examples button { border:1px solid var(--g200); background:white; color:var(--blue); border-radius:999px; padding:7px 10px; font-size:12px; cursor:pointer; }
|
|
.assistant-suggestion-buttons { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
|
|
.assistant-suggestion-buttons button { border:1px solid var(--purple-light); background:#faf5ff; color:var(--purple); border-radius:999px; padding:7px 10px; font-size:12px; cursor:pointer; text-align:left; }
|
|
.assistant-suggestion-buttons button:hover { border-color:var(--purple); background:var(--purple-light); }
|
|
.assistant-msg { max-width:900px; margin:0 0 14px; display:grid; gap:6px; }
|
|
.assistant-msg.user { margin-left:auto; max-width:760px; }
|
|
.assistant-msg-label { font-size:11px; font-weight:700; color:var(--g400); text-transform:uppercase; letter-spacing:.04em; }
|
|
.assistant-bubble { border:1px solid var(--g200); border-radius:14px; padding:12px 14px; background:white; box-shadow:var(--shadow); font-size:13px; line-height:1.75; }
|
|
.assistant-msg.user .assistant-bubble { background:var(--blue); color:white; border-color:var(--blue); }
|
|
.assistant-bubble p { margin:0 0 10px; }
|
|
.assistant-bubble p:last-child { margin-bottom:0; }
|
|
.assistant-bubble ul, .assistant-bubble ol { padding-left:20px; margin:8px 0; }
|
|
.assistant-bubble code { background:var(--g100); border-radius:4px; padding:1px 4px; }
|
|
.assistant-bubble pre { background:var(--g900); color:white; border-radius:8px; padding:10px; overflow:auto; margin:10px 0; }
|
|
.assistant-cite { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 6px; border-radius:999px; background:var(--purple-light); color:var(--purple); font-size:11px; font-weight:700; text-decoration:none; }
|
|
.assistant-composer { border-top:1px solid var(--g200); padding:12px; background:white; display:grid; gap:8px; }
|
|
.assistant-composer textarea, .assistant-side textarea { width:100%; border:1.5px solid var(--g300); border-radius:10px; padding:10px 12px; resize:vertical; font-family:inherit; font-size:13px; outline:none; }
|
|
.assistant-composer textarea:focus, .assistant-side textarea:focus { border-color:var(--blue); box-shadow:0 0 0 3px var(--blue-light); }
|
|
.assistant-composer-footer { display:flex; justify-content:space-between; align-items:center; gap:10px; }
|
|
.assistant-composer-footer .btn-generate { width:auto; margin:0; padding:9px 18px; }
|
|
.assistant-check { font-size:12px; color:var(--g500); display:flex; align-items:center; gap:6px; }
|
|
.assistant-side { display:grid; gap:12px; }
|
|
.assistant-side-body { padding:12px; display:grid; gap:10px; font-size:13px; }
|
|
.assistant-visual-output { display:grid; gap:8px; }
|
|
.assistant-visual-output img { width:100%; border-radius:10px; border:1px solid var(--g200); background:white; }
|
|
.assistant-sources { padding:10px 12px; display:grid; gap:8px; max-height:360px; overflow-y:auto; }
|
|
.assistant-source { border:1px solid var(--g200); border-radius:10px; padding:9px; background:white; font-size:12px; line-height:1.5; }
|
|
.assistant-source strong { color:var(--g800); }
|
|
.assistant-source-meta { color:var(--g500); font-size:11px; margin-top:3px; }
|
|
.assistant-muted { color:var(--g500); font-size:12px; line-height:1.6; }
|
|
.assistant-mermaid { background:white; border:1px solid var(--g200); border-radius:10px; padding:10px; margin:10px 0; overflow:auto; }
|
|
@media (max-width: 960px) { .assistant-layout { grid-template-columns:1fr; } .assistant-main { min-height:auto; grid-template-rows:auto minmax(320px,1fr) auto; } }
|
|
</style>
|