@threadbase-sh/streamer 1.15.2 → 1.15.4
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 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +17 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -132710,7 +132710,13 @@ function getVersion() {
|
|
|
132710
132710
|
function resolveVersion() {
|
|
132711
132711
|
const scriptPath = process.argv[1] ?? "";
|
|
132712
132712
|
const here = scriptPath ? (0, import_node_path4.dirname)(scriptPath) : process.cwd();
|
|
132713
|
-
|
|
132713
|
+
let realHere = here;
|
|
132714
|
+
try {
|
|
132715
|
+
realHere = (0, import_node_path4.dirname)((0, import_node_fs3.realpathSync)(scriptPath));
|
|
132716
|
+
} catch {
|
|
132717
|
+
}
|
|
132718
|
+
const searchDirs = realHere === here ? [here, (0, import_node_path4.join)(here, "..")] : [here, (0, import_node_path4.join)(here, ".."), realHere, (0, import_node_path4.join)(realHere, "..")];
|
|
132719
|
+
for (const dir of searchDirs) {
|
|
132714
132720
|
try {
|
|
132715
132721
|
const v3 = (0, import_node_fs3.readFileSync)((0, import_node_path4.join)(dir, "version.txt"), "utf8").trim();
|
|
132716
132722
|
if (v3) return v3;
|
|
@@ -139420,6 +139426,16 @@ var StreamerServer = class {
|
|
|
139420
139426
|
cleanup();
|
|
139421
139427
|
this.sessionFileMap.set(sessionId, resolvedFilePath);
|
|
139422
139428
|
this.fileWatcher.watch(resolvedFilePath);
|
|
139429
|
+
try {
|
|
139430
|
+
const existing = (0, import_fs14.readFileSync)(resolvedFilePath, "utf8").split("\n").filter(Boolean);
|
|
139431
|
+
if (existing.length > 0) {
|
|
139432
|
+
this.wsHub.broadcast({ type: "conversation_events", sessionId, lines: existing });
|
|
139433
|
+
for (const line of existing) {
|
|
139434
|
+
this.wsHub.broadcast({ type: "conversation_event", sessionId, line });
|
|
139435
|
+
}
|
|
139436
|
+
}
|
|
139437
|
+
} catch {
|
|
139438
|
+
}
|
|
139423
139439
|
if (this.scannerReady) {
|
|
139424
139440
|
this.scannerStale = true;
|
|
139425
139441
|
} else {
|