@ai-matrx/records 0.99.18 → 0.99.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -353,6 +353,10 @@ function takePrimedTablePageBundle(organizationId, tableId, viewId) {
353
353
  primed.delete(key);
354
354
  return Date.now() - held.at < PRIMED_TTL_MS ? held.answer : null;
355
355
  }
356
+ function forgetPrimedTablePageBundlesOf(tableId) {
357
+ const primed = registry();
358
+ for (const key of [...primed.keys()]) if (tableId === null || key.split("|")[1] === tableId) primed.delete(key);
359
+ }
356
360
  function primeRecordPageBundle(input) {
357
361
  primeTablePageBundle({ organizationId: input.organizationId, tableId: `record:${input.recordId}`, answer: input.answer });
358
362
  }
@@ -5774,6 +5778,12 @@ function createRecordsClient(given) {
5774
5778
  else scream({ code: refusal3.code, message: refusal3.message, ...refusal3.hint ? { hint: refusal3.hint } : {}, where });
5775
5779
  return err(refusal3);
5776
5780
  }
5781
+ if (isWritingDoor(door) || LOOK_WRITES[door]) {
5782
+ const tableId = args["p_table_id"];
5783
+ bundleDrop(typeof tableId === "string" ? tableId : null);
5784
+ forgetPrimedTablePageBundlesOf(typeof tableId === "string" ? tableId : null);
5785
+ dropPrimedDoorAnswers(LOOK_WRITES[door]);
5786
+ }
5777
5787
  return ok(response.data);
5778
5788
  }
5779
5789
  function structureMoved(tableId, result) {