mirror of
https://github.com/bitbaum/vitareba.git
synced 2026-12-04 03:57:18 +01:00
One app wrapper, components/shared/TextBox.tsx, around chatkit's
DictationField. Every textarea in the portal and the admin now uses it:
profile, clinical context, check-in notes, new message, booking notes,
cancellation reason, clinician bio, programme notes, clinical notes,
goal notes and admin profile edits. The two thread reply boxes (patient
and clinician) are now chatkit's Composer.
The microphone is off (voice={false}). These fields hold health data.
Without a transcribeUrl, chatkit falls back to the browser's speech
recogniser, which sends audio to the browser vendor, and AGENTS.md lets
health data go only to an EU/CH provider under a DPA. Turn it on in
TextBox once a consent-gated transcription route exists.
Textarea, compose-row and send-button CSS that nothing uses any more
is removed.
Claude-Session: https://claude.ai/code/session_019MDtmrZVd3q4PDcqQwfLT9
Co-authored-by: Claude <noreply@anthropic.com>
22 lines
919 B
TypeScript
22 lines
919 B
TypeScript
"use client";
|
|
|
|
import { DictationField, type DictationFieldProps } from "@bitbaum/chatkit/react";
|
|
|
|
export type TextBoxProps = Omit<DictationFieldProps, "voice">;
|
|
|
|
/**
|
|
* Every place a person types prose in Vita: chatkit's `DictationField`, so the
|
|
* field behaves the same as everywhere else in the fleet.
|
|
*
|
|
* Voice is OFF here on purpose. What people type here is health data
|
|
* (concerns, diagnoses, medication, clinical notes). Without a `transcribeUrl`,
|
|
* chatkit uses the browser's speech recogniser, which in Chrome sends the audio
|
|
* to Google. AGENTS.md ("Roles and AI") allows health data to go only to an
|
|
* EU/CH-hosted provider under a DPA, with consent. Vita has no transcription
|
|
* route like that yet. When one exists (consent-gated like `/api/ai/*`), pass
|
|
* `voice={{ transcribeUrl }}` here.
|
|
*/
|
|
export function TextBox(props: TextBoxProps) {
|
|
return <DictationField {...props} voice={false} />;
|
|
}
|