@threadbase-sh/scanner 0.19.1 → 0.19.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 +19 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +18 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/persistent/migrations.d.ts.map +1 -1
- package/dist/persistent/schema.d.ts +1 -1
- package/dist/persistent/schema.d.ts.map +1 -1
- package/dist/tags.d.ts.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.19.
|
|
8
|
+
var version = "0.19.2";
|
|
9
9
|
|
|
10
10
|
// src/logger.ts
|
|
11
11
|
import pino from "pino";
|
|
@@ -796,8 +796,9 @@ var SYSTEM_TAGS = [
|
|
|
796
796
|
"teammate-message"
|
|
797
797
|
];
|
|
798
798
|
var SYSTEM_TAG_RE = new RegExp(`<(${SYSTEM_TAGS.join("|")})[^>]*>[\\s\\S]*?<\\/\\1>`, "g");
|
|
799
|
+
var PASTED_CONTENT_RE = /<pasted_content id="[0-9a-f]{4}">([\s\S]*?)<\/pasted_content(?: id="[0-9a-f]{4}")?>/g;
|
|
799
800
|
function cleanSystemTags(text) {
|
|
800
|
-
return text.replace(SYSTEM_TAG_RE, "").replace(/[^\S\n]+/g, " ").replace(/\n{3,}/g, "\n\n").trim();
|
|
801
|
+
return text.replace(SYSTEM_TAG_RE, "").replace(PASTED_CONTENT_RE, "$1").replace(/[^\S\n]+/g, " ").replace(/\n{3,}/g, "\n\n").trim();
|
|
801
802
|
}
|
|
802
803
|
|
|
803
804
|
// src/parser.ts
|
|
@@ -2257,7 +2258,7 @@ import { mkdirSync } from "fs";
|
|
|
2257
2258
|
import { dirname as dirname4 } from "path";
|
|
2258
2259
|
|
|
2259
2260
|
// src/persistent/schema.ts
|
|
2260
|
-
var SCHEMA_VERSION =
|
|
2261
|
+
var SCHEMA_VERSION = 10;
|
|
2261
2262
|
var SCHEMA_SQL = `
|
|
2262
2263
|
CREATE TABLE IF NOT EXISTS conversation_files (
|
|
2263
2264
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -2550,6 +2551,21 @@ function runMigrations(db) {
|
|
|
2550
2551
|
if (current >= 1 && current < 9 && tableExists(db, "conversations")) {
|
|
2551
2552
|
db.exec(`UPDATE conversations SET provider = 'cursor' WHERE provider = 'cursor-cli'`);
|
|
2552
2553
|
}
|
|
2554
|
+
if (current >= 1 && current < 10 && tableExists(db, "conversation_files")) {
|
|
2555
|
+
const assignments = [];
|
|
2556
|
+
if (hasColumn(db, "conversation_files", "last_indexed_offset")) {
|
|
2557
|
+
assignments.push("last_indexed_offset = 0");
|
|
2558
|
+
}
|
|
2559
|
+
if (hasColumn(db, "conversation_files", "last_indexed_line")) {
|
|
2560
|
+
assignments.push("last_indexed_line = 0");
|
|
2561
|
+
}
|
|
2562
|
+
if (hasColumn(db, "conversation_files", "reducer_state")) {
|
|
2563
|
+
assignments.push("reducer_state = NULL");
|
|
2564
|
+
}
|
|
2565
|
+
if (assignments.length > 0) {
|
|
2566
|
+
db.exec(`UPDATE conversation_files SET ${assignments.join(", ")}`);
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2553
2569
|
db.exec(SCHEMA_SQL);
|
|
2554
2570
|
db.pragma(`user_version = ${SCHEMA_VERSION}`);
|
|
2555
2571
|
}
|