neohive 6.1.2 → 6.1.3
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/dashboard.js +3 -7
- package/package.json +1 -1
package/dashboard.js
CHANGED
|
@@ -245,19 +245,15 @@ function resolveDataDir(projectPath) {
|
|
|
245
245
|
projectPath = normalizeMonitoredProjectRoot(projectPath);
|
|
246
246
|
let dir = path.join(projectPath, '.neohive');
|
|
247
247
|
const dataDir = path.join(projectPath, 'data');
|
|
248
|
-
// Prefer whichever has data (local hive only — do not redirect agents/messages to parent)
|
|
249
248
|
if (hasDataFiles(dir)) return dir;
|
|
250
249
|
if (hasDataFiles(dataDir)) return dataDir;
|
|
251
250
|
if (fs.existsSync(dir)) return dir;
|
|
252
251
|
if (fs.existsSync(dataDir)) return dataDir;
|
|
253
252
|
return dir;
|
|
254
253
|
}
|
|
255
|
-
|
|
256
|
-
//
|
|
257
|
-
|
|
258
|
-
if (hasDataFiles(legacyDir)) return legacyDir;
|
|
259
|
-
if (fs.existsSync(DEFAULT_DATA_DIR)) return DEFAULT_DATA_DIR;
|
|
260
|
-
if (fs.existsSync(legacyDir)) return legacyDir;
|
|
254
|
+
// Always return the resolved default dir — never flip-flop to legacy.
|
|
255
|
+
// Switching directories between requests breaks the file watcher and
|
|
256
|
+
// causes agents registered in DEFAULT_DATA_DIR to be invisible.
|
|
261
257
|
return DEFAULT_DATA_DIR;
|
|
262
258
|
}
|
|
263
259
|
|