@threadbase-sh/scanner 0.8.1 → 0.8.2

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.
package/dist/index.cjs CHANGED
@@ -2242,6 +2242,15 @@ var PersistentEngine = class {
2242
2242
  const meta = this.conversations.getByIdOrSession(id);
2243
2243
  if (!meta) return null;
2244
2244
  const filePath = meta.filePath;
2245
+ if (meta.provider === CODEX_CLI_PROVIDER) {
2246
+ const conversation = await parseCodexConversation(filePath, meta.account);
2247
+ if (!conversation) return null;
2248
+ const { messages } = conversation;
2249
+ const total2 = messages.length;
2250
+ const beforeIndex2 = options.beforeIndex ?? total2;
2251
+ const fromIndex2 = Math.max(0, beforeIndex2 - options.limit);
2252
+ return { messages: messages.slice(fromIndex2, beforeIndex2), total: total2, fromIndex: fromIndex2 };
2253
+ }
2245
2254
  const total = this.conversations.pageMessageCount(filePath);
2246
2255
  if (total > CHECKPOINT_INTERVAL && this.checkpoints.count(filePath) === 0) {
2247
2256
  const built = await buildCheckpoints(filePath);