@threadbase-sh/streamer 1.18.4 → 1.18.6
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.cjs +17 -2
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +17 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/cli.cjs
CHANGED
|
@@ -142095,6 +142095,9 @@ var StreamerServer = class {
|
|
|
142095
142095
|
// /input { keys }. Cleared when the gate closes.
|
|
142096
142096
|
pendingPermission = /* @__PURE__ */ new Map();
|
|
142097
142097
|
scanner = null;
|
|
142098
|
+
// Tracks every ConversationScanner ever created so close() can shut them all
|
|
142099
|
+
// down and release SQLite handles (open handles block temp-dir deletion on Windows).
|
|
142100
|
+
allScanners = /* @__PURE__ */ new Set();
|
|
142098
142101
|
scannerReady = null;
|
|
142099
142102
|
// Set by onConversationChanged while a scan is in-flight; getScanner() does
|
|
142100
142103
|
// a single rescan after the current one completes instead of restarting it.
|
|
@@ -142559,8 +142562,15 @@ var StreamerServer = class {
|
|
|
142559
142562
|
this.conversationsRepo = new ConversationsRepository(this.cache);
|
|
142560
142563
|
this.sessionsRepo = new SessionsRepository(this.sessionStore);
|
|
142561
142564
|
this.cacheMetadataRepo = new CacheMetadataRepository(db);
|
|
142562
|
-
|
|
142563
|
-
|
|
142565
|
+
if (this.scanProfiles && this.scanProfiles.length > 0) {
|
|
142566
|
+
for (const profile of this.scanProfiles) {
|
|
142567
|
+
if (profile.enabled) {
|
|
142568
|
+
this.fileWatcher.watchDirectory((0, import_path19.join)(profile.configDir, "projects"));
|
|
142569
|
+
}
|
|
142570
|
+
}
|
|
142571
|
+
} else {
|
|
142572
|
+
this.fileWatcher.watchDirectory((0, import_path19.join)((0, import_os10.homedir)(), ".claude", "projects"));
|
|
142573
|
+
}
|
|
142564
142574
|
} catch (err) {
|
|
142565
142575
|
const message = err instanceof Error ? err.message : String(err);
|
|
142566
142576
|
this.log.warn(`ConversationCache failed to open (running without cache): ${message}`, {
|
|
@@ -142569,6 +142579,7 @@ var StreamerServer = class {
|
|
|
142569
142579
|
});
|
|
142570
142580
|
}
|
|
142571
142581
|
const warmupScanner = new ConversationScanner();
|
|
142582
|
+
this.allScanners.add(warmupScanner);
|
|
142572
142583
|
const warmupStatCache = this.buildStatCache(null);
|
|
142573
142584
|
const shouldEmitProgress = createScanProgressThrottle();
|
|
142574
142585
|
const scanOpts = {
|
|
@@ -142693,6 +142704,9 @@ var StreamerServer = class {
|
|
|
142693
142704
|
for (const timer of this.ptyGraceTimers.values()) clearTimeout(timer);
|
|
142694
142705
|
this.ptyGraceTimers.clear();
|
|
142695
142706
|
this.markScannerStaleDebounced.cancel();
|
|
142707
|
+
for (const s3 of this.allScanners) s3.close();
|
|
142708
|
+
this.allScanners.clear();
|
|
142709
|
+
this.scanner = null;
|
|
142696
142710
|
this.cache?.close();
|
|
142697
142711
|
this.ptyManager.dispose();
|
|
142698
142712
|
this.fileWatcher.dispose();
|
|
@@ -143021,6 +143035,7 @@ var StreamerServer = class {
|
|
|
143021
143035
|
this.scannerStale = false;
|
|
143022
143036
|
const statCache = this.buildStatCache(this.scanner);
|
|
143023
143037
|
this.scanner = new ConversationScanner();
|
|
143038
|
+
this.allScanners.add(this.scanner);
|
|
143024
143039
|
this.scannerReady = this.scanner.scan({
|
|
143025
143040
|
...this.scanProfiles ? { profiles: this.scanProfiles } : {},
|
|
143026
143041
|
...this.codexScanOpts(),
|