MCPcopy
hub / github.com/Narcooo/inkos / replace

Method replace

packages/core/src/play/play-file-db.ts:114–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112
113 replaceWithSnapshot(snapshot: PlayGraphSnapshot): void {
114 const replace = () => {
115 this.data = {
116 entities: Object.fromEntries(snapshot.entities.map((entity) => [entity.id, PlayEntitySchema.parse(entity)])),
117 edges: Object.fromEntries(snapshot.edges.map((edge) => [edge.id, PlayEdgeSchema.parse(edge)])),
118 stateSlots: Object.fromEntries(snapshot.stateSlots.map((slot) => [slot.id, PlayStateSlotSchema.parse(slot)])),
119 events: Object.fromEntries(snapshot.events.map((event) => [event.id, PlayEventSchema.parse(event)])),
120 };
121 };
122 if (this.transactionBackup) {
123 replace();
124 return;

Callers 15

getSessionLabelFunction · 0.80
extractResultPathFunction · 0.80
ChatMessage.tsxFile · 0.80
parseStoryBibleFunction · 0.80
captureScreenshotFunction · 0.80
ChapterReaderFunction · 0.80
normalizeSkillIdFunction · 0.80
BookDetailFunction · 0.80
relabelOkrJargonFunction · 0.80
firstParagraphFunction · 0.80
presentCurrentStateFunction · 0.80

Calls

no outgoing calls

Tested by 1

normalizeBaseUrlFunction · 0.64