@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.
Files changed (45) hide show
  1. package/dist/cli.js +10 -3
  2. package/dist/cli.js.map +1 -1
  3. package/dist/filters.d.ts +1 -1
  4. package/dist/index.cjs +9 -2
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.ts +26 -26
  7. package/dist/index.js +9 -2
  8. package/dist/index.js.map +1 -1
  9. package/dist/indexer.d.ts +1 -1
  10. package/dist/name-stores.d.ts +2 -2
  11. package/dist/parse-helpers.d.ts +1 -1
  12. package/dist/parse-helpers.d.ts.map +1 -1
  13. package/dist/parse.cjs +9 -2
  14. package/dist/parse.cjs.map +1 -1
  15. package/dist/parse.d.ts +4 -4
  16. package/dist/parse.js +9 -2
  17. package/dist/parse.js.map +1 -1
  18. package/dist/parser.d.ts +2 -2
  19. package/dist/persistent/claude-name-slots.d.ts +1 -1
  20. package/dist/persistent/conversation-reducer.d.ts +2 -2
  21. package/dist/persistent/conversation-stream.d.ts +2 -2
  22. package/dist/persistent/cursor.d.ts +1 -1
  23. package/dist/persistent/dir-watermark.d.ts +3 -3
  24. package/dist/persistent/index-engine.d.ts +9 -9
  25. package/dist/persistent/jsonl-tail-reader.d.ts +2 -2
  26. package/dist/persistent/metadata-reducer.d.ts +2 -2
  27. package/dist/persistent/paged-reader.d.ts +3 -3
  28. package/dist/persistent/repositories/checkpoints.repo.d.ts +1 -1
  29. package/dist/persistent/repositories/conversations.repo.d.ts +1 -1
  30. package/dist/persistent/repositories/fts.repo.d.ts +2 -2
  31. package/dist/persistent/sidecar.d.ts +1 -1
  32. package/dist/profiles.d.ts +1 -1
  33. package/dist/providers/codex-cli.d.ts +3 -3
  34. package/dist/providers/copilot.d.ts +3 -3
  35. package/dist/providers/cursor.d.ts +3 -3
  36. package/dist/providers/parse.d.ts +2 -2
  37. package/dist/providers/provider.d.ts +1 -1
  38. package/dist/providers/threadbase.d.ts +3 -3
  39. package/dist/scanner.d.ts +2 -2
  40. package/dist/search-matches.d.ts +1 -1
  41. package/dist/session-name.d.ts +1 -1
  42. package/dist/tiers.d.ts +1 -1
  43. package/dist/types.d.ts +1 -1
  44. package/dist/watcher/file-watcher.d.ts +1 -1
  45. 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.0";
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 cleanSystemTags(content);
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(cleanSystemTags).join(" ");
818
+ }).filter(Boolean).map(cleanText).join(" ");
812
819
  }
813
820
  return "";
814
821
  }