@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.js CHANGED
@@ -2178,6 +2178,15 @@ var PersistentEngine = class {
2178
2178
  const meta = this.conversations.getByIdOrSession(id);
2179
2179
  if (!meta) return null;
2180
2180
  const filePath = meta.filePath;
2181
+ if (meta.provider === CODEX_CLI_PROVIDER) {
2182
+ const conversation = await parseCodexConversation(filePath, meta.account);
2183
+ if (!conversation) return null;
2184
+ const { messages } = conversation;
2185
+ const total2 = messages.length;
2186
+ const beforeIndex2 = options.beforeIndex ?? total2;
2187
+ const fromIndex2 = Math.max(0, beforeIndex2 - options.limit);
2188
+ return { messages: messages.slice(fromIndex2, beforeIndex2), total: total2, fromIndex: fromIndex2 };
2189
+ }
2181
2190
  const total = this.conversations.pageMessageCount(filePath);
2182
2191
  if (total > CHECKPOINT_INTERVAL && this.checkpoints.count(filePath) === 0) {
2183
2192
  const built = await buildCheckpoints(filePath);