@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/cli.js +11 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Command } from "commander";
|
|
|
5
5
|
import pino2 from "pino";
|
|
6
6
|
|
|
7
7
|
// package.json
|
|
8
|
-
var version = "0.8.
|
|
8
|
+
var version = "0.8.2";
|
|
9
9
|
|
|
10
10
|
// src/logger.ts
|
|
11
11
|
import pino from "pino";
|
|
@@ -2134,6 +2134,15 @@ var PersistentEngine = class {
|
|
|
2134
2134
|
const meta = this.conversations.getByIdOrSession(id);
|
|
2135
2135
|
if (!meta) return null;
|
|
2136
2136
|
const filePath = meta.filePath;
|
|
2137
|
+
if (meta.provider === CODEX_CLI_PROVIDER) {
|
|
2138
|
+
const conversation = await parseCodexConversation(filePath, meta.account);
|
|
2139
|
+
if (!conversation) return null;
|
|
2140
|
+
const { messages } = conversation;
|
|
2141
|
+
const total2 = messages.length;
|
|
2142
|
+
const beforeIndex2 = options.beforeIndex ?? total2;
|
|
2143
|
+
const fromIndex2 = Math.max(0, beforeIndex2 - options.limit);
|
|
2144
|
+
return { messages: messages.slice(fromIndex2, beforeIndex2), total: total2, fromIndex: fromIndex2 };
|
|
2145
|
+
}
|
|
2137
2146
|
const total = this.conversations.pageMessageCount(filePath);
|
|
2138
2147
|
if (total > CHECKPOINT_INTERVAL && this.checkpoints.count(filePath) === 0) {
|
|
2139
2148
|
const built = await buildCheckpoints(filePath);
|
|
@@ -2897,7 +2906,7 @@ var ConversationScanner = class {
|
|
|
2897
2906
|
});
|
|
2898
2907
|
}
|
|
2899
2908
|
async resolveProfiles(profiles) {
|
|
2900
|
-
if (profiles
|
|
2909
|
+
if (profiles) return profiles;
|
|
2901
2910
|
return loadProfiles(DEFAULT_CONFIG_PATH);
|
|
2902
2911
|
}
|
|
2903
2912
|
transformView(metas, options) {
|