MCPcopy Index your code
hub / github.com/simstudioai/sim / formatTranscriptContent

Function formatTranscriptContent

apps/sim/connectors/fireflies/fireflies.ts:71–121  ·  view source on GitHub ↗

* Formats transcript sentences into plain text content.

(transcript: FirefliesTranscript)

Source from the content-addressed store, hash-verified

69 * Formats transcript sentences into plain text content.
70 */
71function formatTranscriptContent(transcript: FirefliesTranscript): string {
72 const parts: string[] = []
73
74 if (transcript.title) {
75 parts.push(`Meeting: ${transcript.title}`)
76 }
77
78 if (transcript.date) {
79 parts.push(`Date: ${new Date(transcript.date).toISOString()}`)
80 }
81
82 if (transcript.duration) {
83 const minutes = Math.round(transcript.duration / 60)
84 parts.push(`Duration: ${minutes} minutes`)
85 }
86
87 if (transcript.host_email) {
88 parts.push(`Host: ${transcript.host_email}`)
89 }
90
91 if (transcript.participants && transcript.participants.length > 0) {
92 parts.push(`Participants: ${transcript.participants.join(', ')}`)
93 }
94
95 if (transcript.summary?.overview) {
96 parts.push('')
97 parts.push('--- Overview ---')
98 parts.push(transcript.summary.overview)
99 }
100
101 if (transcript.summary?.action_items) {
102 parts.push('')
103 parts.push('--- Action Items ---')
104 parts.push(transcript.summary.action_items)
105 }
106
107 if (transcript.summary?.keywords && transcript.summary.keywords.length > 0) {
108 parts.push('')
109 parts.push(`Keywords: ${transcript.summary.keywords.join(', ')}`)
110 }
111
112 if (transcript.sentences && transcript.sentences.length > 0) {
113 parts.push('')
114 parts.push('--- Transcript ---')
115 for (const sentence of transcript.sentences) {
116 parts.push(`${sentence.speaker_name}: ${sentence.text}`)
117 }
118 }
119
120 return parts.join('\n')
121}
122
123export const firefliesConnector: ConnectorConfig = {
124 ...firefliesConnectorMeta,

Callers 1

fireflies.tsFile · 0.70

Calls 2

joinMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected