@adhdev/daemon-core 0.9.82-rc.55 → 0.9.82-rc.57
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/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/router.ts +8 -8
package/package.json
CHANGED
package/src/commands/router.ts
CHANGED
|
@@ -460,16 +460,16 @@ function reconcileInlineMeshCache(cached: any, incoming: any): any {
|
|
|
460
460
|
const incomingNodes = Array.isArray(incoming.nodes) ? incoming.nodes : [];
|
|
461
461
|
if (!cachedNodes.length || !incomingNodes.length) return { ...cached, ...incoming };
|
|
462
462
|
|
|
463
|
-
const
|
|
464
|
-
for (const node of
|
|
463
|
+
const cachedById = new Map<string, any>();
|
|
464
|
+
for (const node of cachedNodes) {
|
|
465
465
|
const nodeId = readInlineMeshNodeId(node);
|
|
466
|
-
if (nodeId)
|
|
466
|
+
if (nodeId) cachedById.set(nodeId, node);
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
-
const nodes =
|
|
470
|
-
const nodeId = readInlineMeshNodeId(
|
|
471
|
-
const
|
|
472
|
-
if (!
|
|
469
|
+
const nodes = incomingNodes.map((incomingNode: any) => {
|
|
470
|
+
const nodeId = readInlineMeshNodeId(incomingNode);
|
|
471
|
+
const cachedNode = nodeId ? cachedById.get(nodeId) : undefined;
|
|
472
|
+
if (!cachedNode) return incomingNode;
|
|
473
473
|
if (hasInlineMeshTransientNodeState(incomingNode)) {
|
|
474
474
|
return { ...cachedNode, ...incomingNode };
|
|
475
475
|
}
|
|
@@ -673,7 +673,7 @@ async function hydrateInlineMeshDirectTruth(args: {
|
|
|
673
673
|
continue;
|
|
674
674
|
}
|
|
675
675
|
|
|
676
|
-
if (
|
|
676
|
+
if (fs.existsSync(workspace)) {
|
|
677
677
|
try {
|
|
678
678
|
const localGit = await getGitRepoStatus(workspace, { timeoutMs: 10_000, refreshUpstream: true });
|
|
679
679
|
if (localGit?.isGitRepo) {
|