@agimon-ai/po-core 0.0.0-alpha.19 → 0.0.0-alpha.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.
@@ -1648,6 +1648,23 @@ async function createLaneRuntime(options, attached) {
1648
1648
  }));
1649
1649
  },
1650
1650
  readEntries,
1651
+ async readEntriesFrom(seq) {
1652
+ const lane = conversation;
1653
+ const minEntryId = nativeId(String(seq));
1654
+ const entries = await projectDurableConversationEntries(lane, context, minEntryId);
1655
+ if (entries.length > 0 && minEntryId > 0) {
1656
+ const previous = await lane.entries({ maxEntryId: minEntryId - 1 }, 1, void 0, context);
1657
+ const parentId = previous.items[0] === void 0 ? null : String(previous.items[0].id);
1658
+ for (const entry of entries) {
1659
+ if (entry.seq !== entries[0].seq) break;
1660
+ entry.parentId = parentId;
1661
+ }
1662
+ }
1663
+ return {
1664
+ entries,
1665
+ leafId: entries.at(-1)?.id ?? null
1666
+ };
1667
+ },
1651
1668
  scanEntries: (query, limit, cursor, scanContext) => conversation.entries(query, limit, cursor, scanContext),
1652
1669
  readIdentities: (readContext) => harness.snapshot(require_docs.IdentityHistoryDoc, conversation.id, readContext),
1653
1670
  async getContextMessages() {