+ {(error as any)?.status === 403
+ ? 'This call was transferred to someone else.'
+ : (error as any)?.message || 'Could not load the conversation'}
+
+ )
+ }
+
+ return (
+
+ {isLoading &&
Loading…
}
+ {messages.map((m) => {
+ const overheard = m.content.startsWith(LIVE_CALL_PREFIX)
+ if (overheard) {
+ return (
+
}
+ label="Overheard on the call"
+ tone="slate"
+ text={m.content.slice(LIVE_CALL_PREFIX.length).trim()}
+ />
+ )
+ }
+ if (m.content.startsWith('HANDOVER BRIEF')) {
+ return (
+
}
+ label="Handover brief"
+ tone="amber"
+ text={m.content.replace(/^HANDOVER BRIEF\n?/, '')}
+ />
+ )
+ }
+ // A lone dash is the co-pilot deliberately staying quiet — rendering it
+ // as an empty suggestion box would read as a bug.
+ if (m.content.trim() === '—' || m.content.trim() === '-') return null
+ return (
+
}
+ label="Suggested — yours to relay"
+ tone="indigo"
+ text={m.content}
+ />
+ )
+ })}
+
+ )
+}
+
+function Bubble({
+ icon,
+ label,
+ text,
+ tone,
+}: {
+ icon: React.ReactNode
+ label: string
+ text: string
+ tone: 'slate' | 'indigo' | 'amber'
+}) {
+ const skin = {
+ slate: 'border-slate-200 bg-slate-50 text-slate-700',
+ indigo: 'border-indigo-200 bg-indigo-50 text-indigo-900',
+ amber: 'border-amber-200 bg-amber-50 text-amber-900',
+ }[tone]
+
+ return (
+