@threadbase-sh/scanner 0.25.0 → 0.25.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 +10 -3
- package/dist/cli.js.map +1 -1
- package/dist/filters.d.ts +1 -1
- package/dist/index.cjs +9 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +26 -26
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/indexer.d.ts +1 -1
- package/dist/name-stores.d.ts +2 -2
- package/dist/parse-helpers.d.ts +1 -1
- package/dist/parse-helpers.d.ts.map +1 -1
- package/dist/parse.cjs +9 -2
- package/dist/parse.cjs.map +1 -1
- package/dist/parse.d.ts +4 -4
- package/dist/parse.js +9 -2
- package/dist/parse.js.map +1 -1
- package/dist/parser.d.ts +2 -2
- package/dist/persistent/claude-name-slots.d.ts +1 -1
- package/dist/persistent/conversation-reducer.d.ts +2 -2
- package/dist/persistent/conversation-stream.d.ts +2 -2
- package/dist/persistent/cursor.d.ts +1 -1
- package/dist/persistent/dir-watermark.d.ts +3 -3
- package/dist/persistent/index-engine.d.ts +9 -9
- package/dist/persistent/jsonl-tail-reader.d.ts +2 -2
- package/dist/persistent/metadata-reducer.d.ts +2 -2
- package/dist/persistent/paged-reader.d.ts +3 -3
- package/dist/persistent/repositories/checkpoints.repo.d.ts +1 -1
- package/dist/persistent/repositories/conversations.repo.d.ts +1 -1
- package/dist/persistent/repositories/fts.repo.d.ts +2 -2
- package/dist/persistent/sidecar.d.ts +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/providers/codex-cli.d.ts +3 -3
- package/dist/providers/copilot.d.ts +3 -3
- package/dist/providers/cursor.d.ts +3 -3
- package/dist/providers/parse.d.ts +2 -2
- package/dist/providers/provider.d.ts +1 -1
- package/dist/providers/threadbase.d.ts +3 -3
- package/dist/scanner.d.ts +2 -2
- package/dist/search-matches.d.ts +1 -1
- package/dist/session-name.d.ts +1 -1
- package/dist/tiers.d.ts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/watcher/file-watcher.d.ts +1 -1
- package/package.json +2 -2
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.25.
|
|
8
|
+
var version = "0.25.2";
|
|
9
9
|
|
|
10
10
|
// src/logger.ts
|
|
11
11
|
import pino from "pino";
|
|
@@ -799,16 +799,23 @@ function asQueuedPromptUserEntry(entry) {
|
|
|
799
799
|
message: { role: "user", content: att.prompt }
|
|
800
800
|
};
|
|
801
801
|
}
|
|
802
|
+
var COMMAND_RE = /^\s*<command-name>([\s\S]*?)<\/command-name>/;
|
|
803
|
+
var COMMAND_ARGS_RE = /<command-args>([\s\S]*?)<\/command-args>/;
|
|
804
|
+
function cleanText(text) {
|
|
805
|
+
const name = text.match(COMMAND_RE)?.[1]?.trim();
|
|
806
|
+
const args = name ? text.match(COMMAND_ARGS_RE)?.[1]?.trim() : void 0;
|
|
807
|
+
return name && args ? `${name} ${args}` : cleanSystemTags(text);
|
|
808
|
+
}
|
|
802
809
|
function extractTextContent(content) {
|
|
803
810
|
if (!content) return "";
|
|
804
|
-
if (typeof content === "string") return
|
|
811
|
+
if (typeof content === "string") return cleanText(content);
|
|
805
812
|
if (Array.isArray(content)) {
|
|
806
813
|
return content.map((item) => {
|
|
807
814
|
if (typeof item === "string") return item;
|
|
808
815
|
if (item?.type === "text" && item?.text) return item.text;
|
|
809
816
|
if (item?.type === "tool_result" && typeof item?.content === "string") return item.content;
|
|
810
817
|
return "";
|
|
811
|
-
}).filter(Boolean).map(
|
|
818
|
+
}).filter(Boolean).map(cleanText).join(" ");
|
|
812
819
|
}
|
|
813
820
|
return "";
|
|
814
821
|
}
|