Messaging

Chat bubbles, time dividers and quiet event lines for a conversation with an agent.

What's the latest on Halcyon Health?
From Tuesday's call notes, they need SSO and a calendar integration before they'll start a pilot.
The pilot plan and their account notes are up to date.
Halcyon kickoff agenda.pdf12 pages · 1.2 MB
Good. Ask @Inbox whether Marcus replied.

AskedInbox

Reading Marcus's reply…

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/messaging

Usage

import { Bubble, BubbleGroup, ThreadEvent } from "./ui/uicontext/components/kit/Messaging.ts"
export const Exchange = <M>(h: Html.H<M>) => [	BubbleGroup(h, { mine: true, children: [Bubble(h, { mine: true, text: "Brief me every morning at 8. Ask @Inbox what's waiting.", mentions: ["Inbox"] })] }),	ThreadEvent(h, { text: "Created routine", subject: "Morning briefing", icon: "routine", href: "/agents/chief/routines/briefing" }),	BubbleGroup(h, { children: [Bubble(h, { text: "I'll brief you every day at 8:00 AM, starting tomorrow." })] }),]

Examples

Inline events

Things that happened, not things said: a routine made, another agent asked, work handed on, something learned. The subject links to it.

Created routineMorning briefing

AskedInbox

Message fromChief of Staff

RememberedMeetings only after 10:00 AM

Paused routineWeekly team update

API reference

BubbleView function

Options

Bubble options
NameTypeDefaultDescription
mineboolean—The reader's own message: on the end side
tone"ink" | "tint"inkHow your own bubbles look: ink (dark on light) or a soft tint; ink by default
textstring—Plain text, line breaks kept, with mentions picked out
mentionsstring[]—Agents' names to pick out when the text says "@Name"
childrenView.Children—Rich content instead of text: a reply's Markdown
wideboolean—Take the full width the group allows: a bubble holding a card
styleStyle——

BubbleGroupView function

Options

BubbleGroup options
NameTypeDescription
mineboolean—
childrenrequiredView.Children—

ThreadEventView function

Options

ThreadEvent options
NameTypeDescription
textrequiredstringWhat happened, as a short phrase: "Created routine", "Asked", "Handed to"
subjectstringWhat it happened to: a routine's name, an agent's name
iconThreadEventIcon—
hrefstringOpens the subject: the routine, the other agent's conversation
onSelectMessage—

Source