Files
CatoandClaude 680b7b269e Give every note and report box chatkit's microphone (DictationField) (#111)
Record notes, appointment/medicine notes and the new-report text now use a
shared TextBox wrapping @bitbaum/chatkit's DictationField, with the voice
going to /api/transcribe like Ask.


Claude-Session: https://claude.ai/code/session_019MDtmv368Y2D3TuQq8dZ6A

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 18:40:31 +01:00

16 lines
645 B
TypeScript

"use client";
import { DictationField, type DictationFieldProps } from "@bitbaum/chatkit/react";
import "@bitbaum/chatkit/styles.css";
import { API } from "@/lib/routes";
/**
* Every box a person types words into, outside the Ask chat: chatkit's
* DictationField, so it has the same microphone as the chat (fleet rule "the
* experience belongs to the package"). The take goes to /api/transcribe, which
* keeps nothing; the words land in the box to read and edit like typed ones.
*/
export function TextBox(props: DictationFieldProps) {
return <DictationField voice={{ transcribeUrl: API.transcribe, prefer: "server" }} {...props} />;
}