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

Function buildContentHash

apps/sim/connectors/grain/grain.ts:212–214  ·  view source on GitHub ↗

* Computes the metadata-based change-detection hash for a recording. * * Grain exposes no `updated_at`/`modified` field, so the hash combines the stable * recording id with `end_datetime` and `duration_ms` — the values that change when a * recording is re-processed or re-cut. The identical formu

(recording: GrainRecording)

Source from the content-addressed store, hash-verified

210 * listing stub and the fully-fetched document so unchanged recordings are skipped.
211 */
212function buildContentHash(recording: GrainRecording): string {
213 return `grain:${recordingId(recording)}:${recording.end_datetime ?? ''}:${recording.duration_ms ?? ''}`
214}
215
216/**
217 * Builds the metadata bag attached to both stubs and fetched documents. Keeping a

Callers 2

recordingToStubFunction · 0.70
grain.tsFile · 0.70

Calls 1

recordingIdFunction · 0.85

Tested by

no test coverage detected