@threadbase-sh/scanner 0.14.6 → 0.14.7
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 +10 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +9 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -6
- 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.14.
|
|
8
|
+
var version = "0.14.7";
|
|
9
9
|
|
|
10
10
|
// src/logger.ts
|
|
11
11
|
import pino from "pino";
|
|
@@ -3437,7 +3437,8 @@ var ConversationScanner = class {
|
|
|
3437
3437
|
// feeds the conversation's account field; "default" is the single-profile
|
|
3438
3438
|
// fallback, matching refreshFile.
|
|
3439
3439
|
async parseSingleFilePage(filePath, account, options) {
|
|
3440
|
-
const
|
|
3440
|
+
const provider = await this.resolveProviderForFile(filePath, null);
|
|
3441
|
+
const conversation = provider?.name === CODEX_CLI_PROVIDER ? await parseCodexConversation(filePath, account ?? "default") : await parseConversation(filePath, account ?? "default");
|
|
3441
3442
|
if (!conversation) return null;
|
|
3442
3443
|
const { messages } = conversation;
|
|
3443
3444
|
const total = messages.length;
|
|
@@ -3481,7 +3482,7 @@ var ConversationScanner = class {
|
|
|
3481
3482
|
const engine = this.engine();
|
|
3482
3483
|
const previous2 = engine.getByIdOrSession(filePath);
|
|
3483
3484
|
const resolvedAccount2 = account ?? previous2?.account ?? "default";
|
|
3484
|
-
const
|
|
3485
|
+
const provider2 = await this.resolveProviderForFile(filePath, previous2);
|
|
3485
3486
|
const { meta: meta2, change } = await engine.indexFile(
|
|
3486
3487
|
filePath,
|
|
3487
3488
|
resolvedAccount2,
|
|
@@ -3489,7 +3490,7 @@ var ConversationScanner = class {
|
|
|
3489
3490
|
void 0,
|
|
3490
3491
|
readGitBranch,
|
|
3491
3492
|
false,
|
|
3492
|
-
|
|
3493
|
+
provider2
|
|
3493
3494
|
);
|
|
3494
3495
|
const cacheKeys = /* @__PURE__ */ new Set();
|
|
3495
3496
|
for (const m of [previous2, meta2]) {
|
|
@@ -3510,10 +3511,12 @@ var ConversationScanner = class {
|
|
|
3510
3511
|
const resolvedAccount = account ?? previous?.account ?? "default";
|
|
3511
3512
|
let meta = null;
|
|
3512
3513
|
let searchDoc = emptySearchDocument();
|
|
3514
|
+
const onEntry = (entry) => {
|
|
3515
|
+
searchDoc = appendSearchDelta(searchDoc, extractSearchDelta(entry));
|
|
3516
|
+
};
|
|
3517
|
+
const provider = await this.resolveProviderForFile(filePath, previous ?? null);
|
|
3513
3518
|
try {
|
|
3514
|
-
meta = await
|
|
3515
|
-
searchDoc = appendSearchDelta(searchDoc, extractSearchDelta(entry));
|
|
3516
|
-
});
|
|
3519
|
+
meta = provider ? await parseMetaWithProvider(provider, filePath, resolvedAccount, this.lastTier, onEntry) : await parseMeta(filePath, resolvedAccount, this.lastTier, onEntry);
|
|
3517
3520
|
} catch (err) {
|
|
3518
3521
|
log.warn({ filePath, err }, "refreshFile: parseMeta threw");
|
|
3519
3522
|
meta = null;
|