@threadbase-sh/scanner 0.8.0 → 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);
@@ -2969,7 +2978,7 @@ var ConversationScanner = class {
2969
2978
  });
2970
2979
  }
2971
2980
  async resolveProfiles(profiles) {
2972
- if (profiles && profiles.length > 0) return profiles;
2981
+ if (profiles) return profiles;
2973
2982
  return loadProfiles(DEFAULT_CONFIG_PATH);
2974
2983
  }
2975
2984
  transformView(metas, options) {