Read Aloud

A reply spoken by the browser's voice, skipping code, with Stop.

Raise the link lifetime to 30 minutes:

export const LINK_TTL = Duration.minutes(30)

Then add a test that delivers the email 20 minutes late and still signs in.

The voice says: “Raise the link lifetime to 30 minutes : Code omitted. Then add a test that delivers the email 20 minutes late and still signs in.”

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/read-aloud

Usage

import { speak } from "./ui/uicontext/components/chat/ReadAloud.ts"
const Message = UiSchema.TaggedEnum({ CompletedReadReply: { id: Schema.String } })// "switch": reading another reply stops this one; Command.interrupt(ReadReply) is Stopexport class ReadReply extends Command.Service<ReadReply>()("chat/ReadReply", {	args: { id: Schema.String, text: Schema.String },	success: Message,	mode: "switch",}) {	static readonly layer = this.toLayer(({ id, text }) => Effect.as(speak(text), Message.CompletedReadReply({ id })))}

Source