Commit graph

210 commits

Author SHA1 Message Date
Daniel
07af95b89a feat: device TTS preferred in voice mode with model fallback; permanent src-garbage scrub; simplified-HTML translation with text fallback; New chat closes the drawer; real FA icons; audio unlock restored 2026-09-09 05:06:40 +02:00
Daniel
143030bf00 fix: usable mobile chat menu — left drawer with close X and backdrop, main-menu style rows, internal message scroll to the question, taller sources scroll; context metadata line removed from image cards 2026-09-09 04:39:20 +02:00
Daniel
d4418f8a80 feat: OWUI-style image handoff — the model calls the tool and announces preparation; enforced instruction independent of stored prompts; stream status announces generating image 2026-09-09 04:26:41 +02:00
Daniel
5e6de10d0a fix: delegated model-selection persistence, admin-settable conversation budget (DB overrides env), unbounded image poll 2026-09-09 03:20:21 +02:00
Daniel
73955dd5f9 feat: model selection in chat (composer pill + popup image model), deterministic image dispatch when the model writes text instead of calling the tool, markdown-rendered email, OWUI stacked composer, left mobile drawer, Go back in topbar, DeepL removed, image history inside the Create image popup 2026-09-09 02:55:28 +02:00
Daniel
7fdbcd51e6 feat: ChatGPT-style chat list — abbreviated rows with relative dates, pinned-first ordering, ⋮ menu (Rename/Pin/Export/Delete); clinical context always on; warn-only budget; mic live-transcript fallback; learning-hub page mode; composer autosize; include-context icon fix 2026-09-09 00:14:34 +02:00
Daniel
bb218750d9 feat: Create image tool at rail top (describe or pick a chat), Images gallery of past creations, ChatGPT-style composer icons (headset/mic/attach/send), example tap asks immediately 2026-09-08 23:40:53 +02:00
Daniel
09a4e02e39 feat: patient take home (copy/export/email), composer mic dictation, voice conversation mode, provider-aware translate languages 2026-09-08 20:01:46 +02:00
Daniel
8b072496e2 feat: Open WebUI-style assistant workspace — 3-column layout, markdown/math/code/tables, autosave with images, translation (LibreTranslate+DeepL), citation modal, Learning Hub moved in, handoff removed 2026-09-08 18:52:35 +02:00
Daniel
9bbcf0049a feat: instruct the assistant to call the generate_image tool for image requests 2026-09-08 17:41:06 +02:00
Daniel
6c9ac58ce3 chore: log image parts attached to provider requests
All checks were successful
Forgejo Android APK / Root app tests (push) Successful in 22s
Forgejo Android APK / Build signed APK (push) Successful in 2m17s
2026-09-08 16:45:07 +02:00
Daniel
94210ac0a1 feat: attach images to clinical search with strict validation and multimodal routing 2026-09-08 15:53:05 +02:00
Daniel
2dbb446a9c feat: env-driven clinical search tool name with hard stop and deprecation warning
All checks were successful
Forgejo Android APK / Root app tests (push) Successful in 24s
Forgejo Android APK / Build signed APK (push) Successful in 1m53s
2026-09-07 19:40:41 +02:00
Daniel
13fca7887d feat: unify Admin model/prompt UI — single prompt dropdown, two image-model dropdowns, searchable/scrollable users, remove classification/custom-add, consistent font, concise labels 2026-09-07 18:18:48 +02:00
Daniel
6be2d1375a feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00
Daniel
3a8dbbcce3 fix: keep the sidebar generated image session-only, never stored in saved chats
All checks were successful
Forgejo Android APK / Root app tests (push) Successful in 26s
Forgejo Android APK / Build signed APK (push) Successful in 4m4s
2026-09-07 16:23:55 +02:00
Daniel
6f63b8f538 feat: image prompt adds full-content detail and bans citations/reference numbers
All checks were successful
Forgejo Android APK / Root app tests (push) Successful in 34s
Forgejo Android APK / Build signed APK (push) Successful in 2m23s
2026-09-07 16:13:09 +02:00
Daniel
9902ee07a6 fix: render clinical handoff Markdown with a concise heading
All checks were successful
Forgejo Android APK / Root app tests (push) Successful in 26s
Forgejo Android APK / Build signed APK (push) Successful in 2m2s
2026-09-07 14:23:56 +02:00
Daniel
b0bebe6970 fix: preserve saved clinical tables and per-turn citation targets 2026-09-07 05:58:12 +02:00
Daniel
cfaf8e957b feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
Daniel
baab83e50e fix: enforce sessions, escape quiz metadata and isolate ED drafts
All checks were successful
Forgejo Android APK / Build signed APK (push) Successful in 1m47s
2026-09-06 07:44:08 +02:00
Daniel
2942d4f6b3 Revert "Sanitize citations from clinical image prompts"
All checks were successful
Forgejo Android APK / Build signed APK (push) Successful in 1m43s
This reverts commit 7833018695.
2026-09-02 01:50:44 +02:00
Daniel
7833018695 Sanitize citations from clinical image prompts
All checks were successful
Forgejo Android APK / Build signed APK (push) Successful in 1m47s
2026-09-02 01:47:32 +02:00
Daniel
54d49dd28a Forbid LaTeX escaped clinical citations
All checks were successful
Forgejo Android APK / Build signed APK (push) Successful in 1m55s
2026-09-01 19:29:40 +02:00
Daniel
c1ba6fa798 Close MCP sessions when they are replaced
All checks were successful
Forgejo Android APK / Build signed APK (push) Successful in 1m48s
The MCP server builds a Nextcloud client per session and closes it only
when the session ends. The clinical assistant replaced its cached session
every time the ten-minute TTL lapsed but never ended the old one, so each
abandoned client held its Nextcloud connections open. The production MCP
container was holding 708 sockets in CLOSE-WAIT against a 1024 descriptor
ceiling, roughly 300 from the point where every clinical search fails.

Expired and server-rejected sessions are now deleted. Session reuse is
unchanged: a live session is still shared across calls, since closing one
still in use would force a re-initialize on every search.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 23:45:26 +02:00
Daniel
604f6abb49 Remove clinical assistant source lock
All checks were successful
Forgejo Android APK / Build signed APK (push) Successful in 1m54s
2026-08-27 21:33:58 +02:00
Daniel
018913a845 Lock clinical assistant retrieval to configured source
All checks were successful
Forgejo Android APK / Build signed APK (push) Successful in 1m46s
2026-08-27 21:30:29 +02:00
Daniel
2c02e6eca7 Send reasoning options only to supported model
All checks were successful
Forgejo Android APK / Build signed APK (push) Successful in 1m53s
2026-08-27 21:25:38 +02:00
Daniel
e710b1c7bd Configure clinical assistant reasoning profile
All checks were successful
Forgejo Android APK / Build signed APK (push) Successful in 1m58s
2026-08-27 20:47:59 +02:00
Daniel
524ad40d49 Match TTS voices to the selected LiteLLM model
Voice lists were a single flat set from LITELLM_TTS_VOICES, so picking a
model could leave an incompatible voice selected and the request would
fail at the gateway. Voices are now resolved per model family (Kokoro,
Kitten, Supertonic, Groq Orpheus EN/AR), with a compatibility check that
falls back through user → admin → env → first valid voice. Groq Orpheus
requests also pin response_format to wav.

Also refreshes the cardiac/respiratory auscultation samples, extends the
well-visit component, and fixes the Android launch theme background
(@null → colorPrimary) so the splash does not flash through.

NOTE: this is in-progress work that was already sitting uncommitted in
the working tree; it is committed here as-is so the tree was clean for
the release bump.
2026-07-30 17:34:34 +02:00
Daniel
82ed46d01b Fix Turnstile in the mobile app; drop it from login
The Turnstile challenge failed reliably inside the Capacitor WebView,
which blocked login and registration from the Android app.

Three separate causes:

1. Android WebView blocks third-party cookies by default. Turnstile runs
   in a cross-origin iframe from challenges.cloudflare.com and needs its
   own storage, so the widget never emitted a token. MainActivity now
   calls setAcceptThirdPartyCookies on the app's own WebView.

2. The register handler read the Turnstile response with an unscoped
   document.querySelector, which matched the *login* widget's input (it
   comes first in the DOM). Registration therefore submitted the login
   widget's token — single-use with a 5 minute expiry, so any prior login
   attempt or slow signup made it fail server-side.

3. The register and forgot-password widgets auto-rendered inside forms
   that start at display:none, where Turnstile does not reliably complete
   a challenge, and nothing re-rendered them when the form was shown.

Widgets are now rendered explicitly when their form first becomes
visible, and tokens are captured from the render callback instead of
being read back out of the injected input — which makes the unscoped
lookup in (2) structurally impossible. Added error/expired/timeout
callbacks so a widget failure surfaces the Cloudflare error code instead
of failing silently behind a generic toast.

Login is no longer gated at all. It is the path mobile users hit
constantly, and it is already covered by a 10-per-15-min per-IP rate
limit, a constant-time credential check, and TOTP 2FA. Registration and
password reset — the endpoints that actually attract bots — stay gated.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 17:22:03 +02:00
Daniel
2ca969e099 Fix generated image mobile downloads
All checks were successful
Forgejo Android APK / Build signed APK (push) Successful in 2m21s
2026-06-09 15:20:06 +02:00
Daniel
b0e1f4969a feat: improve clinical assistant prompts
All checks were successful
Forgejo Android APK / Build signed APK (push) Successful in 2m15s
2026-06-06 00:01:07 +02:00
Daniel
d02b9e2771 Fix clinical prompt pool fallback seeding
All checks were successful
Forgejo Android APK / Build signed APK (push) Successful in 2m14s
2026-05-22 16:53:53 +02:00
Daniel
cb63729656 Expand clinical prompt pool taxonomy
Some checks are pending
Forgejo Android APK / Build signed APK (push) Waiting to run
2026-05-22 05:56:08 +02:00
Daniel
97ddd87449 fix mobile assistant table streaming
Some checks failed
Forgejo Android APK / Build signed APK (push) Has been cancelled
2026-05-11 16:15:45 +02:00
Daniel
f871384063 fix mobile assistant export and image actions
Some checks failed
Forgejo Android APK / Build signed APK (push) Has been cancelled
2026-05-10 20:28:46 +02:00
Daniel
046b07a84a fix clinical assistant mobile exports 2026-05-10 17:23:54 +02:00
Daniel
83d9a77160 fix table source citation links 2026-05-09 20:50:54 +02:00
Daniel
baf0020981 prefer file names for clinical sources 2026-05-09 20:10:24 +02:00
Daniel
795ad9ffae harden clinical assistant source handling 2026-05-09 19:59:04 +02:00
Daniel
8d69fe57a5 fix litellm metadata discovery auth 2026-05-09 15:15:47 +02:00
Daniel
90cdf17bd9 fix litellm capability discovery 2026-05-09 15:06:28 +02:00
Daniel
1b3ea569b7 simplify speech and embeddings through litellm 2026-05-09 05:09:02 +02:00
Daniel
79037fa775 fix litellm tts search fallbacks 2026-05-09 04:50:55 +02:00
Daniel
2a3631d067 fix litellm metadata model discovery 2026-05-09 04:46:06 +02:00
Daniel
2387e6f136 fix litellm speech model discovery 2026-05-09 04:12:57 +02:00
Daniel
6f5782734f fix stt local model defaults 2026-05-09 01:57:37 +02:00
Daniel
0503a25d0b fix docs toc fallback and remove redundant iifes 2026-05-08 23:08:47 +02:00
Daniel
416fff624a feat: add patient education handouts 2026-05-08 22:26:53 +02:00