PageSourceSearch

https://www.qylon.ai/assets/js/Transcripts-DGXoM8yA.js

js qylon.ai collected 2026-10-05 15:24:58 UTC 5,827 bytes, 1 lines download raw bytes

1import{j as e}from"./ui-C6t_nCSG.js";import{t as L,S as R}from"./Dashboard-DTcVF80X.js";import{r as j,E as h}from"./realtimeDataService-Bku4XxRA.js";import{e as E,r as l}from"./vendor-BStmp9eX.js";import{F as m,d as C,q as I}from"./icons-Od_4ddEk.js";import"./index-BL6G0anb.js";function k({limit:b=5,meetingId:c,showRealtime:p=!0,groupedByDate:i}){const w=E(),[o,u]=l.useState([]),[N,g]=l.useState(!0),[f,x]=l.useState(null),[y,T]=l.useState(!1);l.useEffect(()=>{if(!i||i.length===0?S():(g(!1),x(null)),p&&c){v();const t=setInterval(v,3e3);return()=>clearInterval(t)}},[c,p,i]);const S=async()=>{try{g(!0),x(null);const t=await L.getTranscriptions({limit:b,status:"completed"});console.debug("TranscriptRetrieval: Fetched transcriptions from API",{count:t.length,transcriptions:t.map(s=>({id:s.id,meeting_id:s.meeting_id,status:s.status||s.processing_status}))});const r=t.map(s=>{const n=new Date(s.created_at),d=s.transcript_text||s.transcript_preview||"",_=d?d.split(" ").length:0;return{id:s.id,meeting_id:s.meeting_id,meetingTitle:s.meeting_title||`Meeting Transcript ${s.id.slice(0,8)}`,date:n.toLocaleDateString(),time:n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),wordCount:_,language:s.language,confidence:s.confidence,status:s.status||s.processing_status||"pending",downloadUrl:s.download_url,isRealtime:!1}}),a=r.filter(s=>s.status==="completed");console.debug("TranscriptRetrieval: Filtered transcripts",{totalTransformed:r.length,completedCount:a.length,statusBreakdown:r.reduce((s,n)=>(s[n.status]=(s[n.status]||0)+1,s),{})}),u(a),a.length===0&&r.length>0&&console.warn("API returned transcripts but none are completed:",r.map(s=>({id:s.id,status:s.status})))}catch(t){console.error("Error fetching transcriptions:",t),x(t instanceof Error?t.message:"Failed to fetch transcriptions"),u([])}finally{g(!1)}},v=async()=>{if(c)try{const t=await j.getRealtimeTranscripts(c);if(t.length>0){T(!0);const r=t.slice(0,2).map(a=>{const s=a.transcript_text?a.transcript_text.split(" ").length:0,n=Object.keys(a.participant_data).length,d=j.getRealtimeStatus(a);return{id:`realtime-${a.id}`,meetingTitle:"Live Transcript",date:new Date(a.updated_at).toLocaleDateString(),time:new Date(a.updated_at).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),wordCount:s,language:"en",confidence:.95,status:d.status,isRealtime:!0,transcriptText:a.transcript_text,participantCount:n}});u(a=>[...r,...a.filter(s=>!s.isRealtime)])}}catch(t){console.error("Error fetching real-time transcripts:",t)}};return N?e.jsx("div",{className:"space-y-2",children:[1,2,3].map(t=>e.jsxs("div",{className:"flex items-center justify-between p-2.5 rounded-lg animate-pulse",children:[e.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[e.jsx("div",{className:"w-5 h-5 bg-gray-200 rounded"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-1"}),e.jsx("div",{className:"h-3 bg-gray-200 rounded w-1/2"})]})]}),e.jsx("div",{className:"w-16 h-4 bg-gray-200 rounded"})]},t))}):f?e.jsx(h,{icon:m,title:"Error loading transcriptions",message:f}):(!o||o.length===0)&&(!i||i.length===0)?e.jsx(h,{icon:m,title:"No transcriptions available",message:"Meeting transcriptions will be displayed here once they are processed from recall"}):i&&i.length>0?e.jsx("div",{className:"space-y-3",children:i.slice(0,3).map(t=>e.jsx("div",{className:"p-2.5 rounded-lg border bg-white",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-sm font-medium text-gray-900",children:new Date(t.date).toLocaleDateString()}),e.jsxs("div",{className:"text-xs text-gray-500",children:[t.count," transcripts"]})]})},t.date))}):e.jsxs("div",{className:"space-y-2",children:[y&&e.jsxs("div",{className:"flex items-center gap-2 p-2 bg-green-50 border border-green-200 rounded-lg",children:[e.jsx(C,{className:"w-4 h-4 text-green-600 animate-pulse"}),e.jsx("span",{className:"text-sm font-medium text-green-700",children:"Live Transcription Active"})]}),o.filter(t=>!t.isRealtime).length===0?e.jsx(h,{icon:m,title:"No completed transcriptions available",message:"Completed transcriptions will be displayed here once they are processed"}):o.filter(t=>!t.isRealtime).map(t=>{const r=t.meeting_id||t.id;return e.jsxs("button",{onClick:()=>w(`/dashboard/meeting-details/${r}
1?tab=transcript`),className:"w-full text-left flex items-center justify-between p-3 rounded-lg border bg-white border-gray-200 hover:bg-gray-50 hover:border-blue-300 transition-all cursor-pointer group",children:[e.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:"w-8 h-8 rounded flex items-center justify-center bg-blue-100 group-hover:bg-blue-200 transition-colors flex-shrink-0",children:e.jsx(m,{className:"w-4 h-4 text-blue-600"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h4",{className:"font-semibold text-sm text-gray-900 mb-1 truncate group-hover:text-blue-600 transition-colors",children:t.meetingTitle}),e.jsxs("div",{className:"text-xs text-gray-500 mt-0.5",children:[t.date," at ",t.time]}),e.jsxs("div",{className:"text-xs text-gray-500",children:[t.wordCount," words",t.language&&` • ${t.language.toUpperCase()}`]})]})]}),e.jsx("div",{className:"flex items-center gap-1 flex-shrink-0 ml-2",children:e.jsx(I,{className:"w-4 h-4 text-gray-400 group-hover:text-blue-600 transition-colors"})})]},t.id)})]})}function P(){return e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsx(R,{title:"All Transcriptions",children:e.jsx("span",{className:"text-sm text-gray-500",children:"Completed transcriptions"})}),e.jsx("div",{className:"mt-4",children:e.jsx(k,{limit:50})})]})})}export{P as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.