@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.
@@ -31,6 +31,10 @@ function takePrimedTablePageBundle(organizationId, tableId, viewId) {
31
31
  primed.delete(key);
32
32
  return Date.now() - held.at < PRIMED_TTL_MS ? held.answer : null;
33
33
  }
34
+ function forgetPrimedTablePageBundlesOf(tableId) {
35
+ const primed = registry();
36
+ for (const key of [...primed.keys()]) if (tableId === null || key.split("|")[1] === tableId) primed.delete(key);
37
+ }
34
38
  function primeRecordPageBundle(input) {
35
39
  primeTablePageBundle({ organizationId: input.organizationId, tableId: `record:${input.recordId}`, answer: input.answer });
36
40
  }
@@ -5452,6 +5456,12 @@ function createRecordsClient(given) {
5452
5456
  else scream({ code: refusal3.code, message: refusal3.message, ...refusal3.hint ? { hint: refusal3.hint } : {}, where });
5453
5457
  return err(refusal3);
5454
5458
  }
5459
+ if (isWritingDoor(door) || LOOK_WRITES[door]) {
5460
+ const tableId = args["p_table_id"];
5461
+ bundleDrop(typeof tableId === "string" ? tableId : null);
5462
+ forgetPrimedTablePageBundlesOf(typeof tableId === "string" ? tableId : null);
5463
+ dropPrimedDoorAnswers(LOOK_WRITES[door]);
5464
+ }
5455
5465
  return ok(response.data);
5456
5466
  }
5457
5467
  function structureMoved(tableId, result) {