MCPcopy Create free account
hub / github.com/SamuelZ12/longcut / formatTranscriptForContext

Function formatTranscriptForContext

app/api/chat/route.ts:14–21  ·  view source on GitHub ↗
(segments: TranscriptSegment[])

Source from the content-addressed store, hash-verified

12import { getLanguageName } from '@/lib/language-utils';
13
14function formatTranscriptForContext(segments: TranscriptSegment[]): string {
15 return segments.map(s => {
16 const mins = Math.floor(s.start / 60);
17 const secs = Math.floor(s.start % 60);
18 const timestamp = `${mins.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`;
19 return `[${timestamp}] ${s.text}`;
20 }).join('\n');
21}
22
23function stripCodeFences(raw: string): string {
24 const trimmed = raw.trim();

Callers 1

handlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected