@threadbase-sh/scanner 0.8.1 → 0.8.3
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/cli.js +14 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1238,7 +1238,10 @@ function classify(filePath, existing) {
|
|
|
1238
1238
|
}
|
|
1239
1239
|
return { change: "unchanged", stat: stat3 };
|
|
1240
1240
|
}
|
|
1241
|
-
|
|
1241
|
+
if (existing.content_fingerprint && existing.size_bytes === existing.last_indexed_offset && fingerprint(filePath, existing.last_indexed_offset) === existing.content_fingerprint) {
|
|
1242
|
+
return { change: "appended", stat: stat3 };
|
|
1243
|
+
}
|
|
1244
|
+
return { change: "reindex", stat: stat3 };
|
|
1242
1245
|
}
|
|
1243
1246
|
|
|
1244
1247
|
// src/providers/parse.ts
|
|
@@ -2178,6 +2181,15 @@ var PersistentEngine = class {
|
|
|
2178
2181
|
const meta = this.conversations.getByIdOrSession(id);
|
|
2179
2182
|
if (!meta) return null;
|
|
2180
2183
|
const filePath = meta.filePath;
|
|
2184
|
+
if (meta.provider === CODEX_CLI_PROVIDER) {
|
|
2185
|
+
const conversation = await parseCodexConversation(filePath, meta.account);
|
|
2186
|
+
if (!conversation) return null;
|
|
2187
|
+
const { messages } = conversation;
|
|
2188
|
+
const total2 = messages.length;
|
|
2189
|
+
const beforeIndex2 = options.beforeIndex ?? total2;
|
|
2190
|
+
const fromIndex2 = Math.max(0, beforeIndex2 - options.limit);
|
|
2191
|
+
return { messages: messages.slice(fromIndex2, beforeIndex2), total: total2, fromIndex: fromIndex2 };
|
|
2192
|
+
}
|
|
2181
2193
|
const total = this.conversations.pageMessageCount(filePath);
|
|
2182
2194
|
if (total > CHECKPOINT_INTERVAL && this.checkpoints.count(filePath) === 0) {
|
|
2183
2195
|
const built = await buildCheckpoints(filePath);
|