MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / getEventPreview

Function getEventPreview

projects/openade-module/src/yjsMutation.ts:321–331  ·  view source on GitHub ↗
(event: Y.Map<unknown>, at: string)

Source from the content-addressed store, hash-verified

319}
320
321function getEventPreview(event: Y.Map<unknown>, at: string): Record<string, unknown> {
322 const source = event.get("source")
323 const sourceMap = source instanceof Y.Map ? source : null
324 return {
325 type: "action",
326 status: event.get("status") as OpenADEEventStatus,
327 sourceType: sourceMap?.get("type"),
328 sourceLabel: stringValue(sourceMap?.get("userLabel"), "Action"),
329 at,
330 }
331}
332
333function getLastNonSnapshotEvent(taskDoc: Y.Doc): Y.Map<unknown> | null {
334 const order = taskDoc.getArray<string>("task:events:order").toArray()

Callers 2

syncActionEventPreviewFunction · 0.85

Calls 2

stringValueFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected