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

Function recordingToStub

apps/sim/connectors/grain/grain.ts:237–248  ·  view source on GitHub ↗

* Builds the deferred listing stub for a recording. Content is fetched lazily in * getDocument; only metadata and the change hash are computed here.

(recording: GrainRecording)

Source from the content-addressed store, hash-verified

235 * getDocument; only metadata and the change hash are computed here.
236 */
237function recordingToStub(recording: GrainRecording): ExternalDocument {
238 return {
239 externalId: recordingId(recording),
240 title: recordingTitle(recording),
241 content: '',
242 contentDeferred: true,
243 mimeType: 'text/plain',
244 sourceUrl: recording.url || undefined,
245 contentHash: buildContentHash(recording),
246 metadata: buildMetadata(recording),
247 }
248}
249
250/**
251 * Formats a recording header plus speaker-attributed transcript lines into plain text.

Callers 1

grain.tsFile · 0.70

Calls 4

recordingIdFunction · 0.85
recordingTitleFunction · 0.85
buildContentHashFunction · 0.70
buildMetadataFunction · 0.70

Tested by

no test coverage detected