stt updates and intelligence updates

This commit is contained in:
Logan
2026-04-13 00:01:19 -04:00
parent 7b6fd640d9
commit 616c06f09c
6 changed files with 76 additions and 24 deletions
+28 -5
View File
@@ -24,8 +24,11 @@ const TAG_COLORS: Record<string, string> = {
export function CallRow({ call, systemName }: Props) {
const [expanded, setExpanded] = useState(false);
const [showOriginal, setShowOriginal] = useState(false);
const isActive = call.status === "active";
const hasDetails = call.transcript || (call.tags && call.tags.length > 0) || call.incident_id;
const hasDetails = call.transcript || call.transcript_corrected || (call.tags && call.tags.length > 0) || call.incident_id;
const displayTranscript = (!showOriginal && call.transcript_corrected) ? call.transcript_corrected : call.transcript;
const hasBoth = !!(call.transcript && call.transcript_corrected);
return (
<>
@@ -101,10 +104,30 @@ export function CallRow({ call, systemName }: Props) {
)}
{/* Transcript */}
{call.transcript ? (
<pre className="text-xs text-gray-300 bg-gray-800 rounded-lg px-4 py-3 whitespace-pre-wrap font-mono leading-relaxed max-h-40 overflow-y-auto">
{call.transcript}
</pre>
{displayTranscript ? (
<div className="space-y-1">
<div className="flex items-center gap-2">
{hasBoth && (
<span className="text-xs text-gray-600 font-mono">
{showOriginal ? "original" : "corrected"}
</span>
)}
{!hasBoth && call.transcript_corrected && (
<span className="text-xs text-gray-600 font-mono">corrected</span>
)}
</div>
<pre className="text-xs text-gray-300 bg-gray-800 rounded-lg px-4 py-3 whitespace-pre-wrap font-mono leading-relaxed max-h-40 overflow-y-auto">
{displayTranscript}
</pre>
{hasBoth && (
<button
onClick={(e) => { e.stopPropagation(); setShowOriginal((v) => !v); }}
className="text-xs text-gray-600 hover:text-gray-400 font-mono transition-colors"
>
{showOriginal ? "show corrected ↑" : "show original ↓"}
</button>
)}
</div>
) : (
<p className="text-xs text-gray-600 font-mono italic">No transcript available.</p>
)}
+1
View File
@@ -31,6 +31,7 @@ export interface CallRecord {
ended_at: string | null;
audio_url: string | null;
transcript: string | null;
transcript_corrected: string | null;
incident_id: string | null;
location: { lat: number; lng: number } | null;
tags: string[];