@adhdev/daemon-core 0.9.82-rc.115 → 0.9.82-rc.116
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 +25 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/chat-commands.ts +29 -2
package/dist/index.mjs
CHANGED
|
@@ -16687,16 +16687,39 @@ function hasOverlappingVisibleConversationText(nativeMessages, ptyMessages) {
|
|
|
16687
16687
|
return false;
|
|
16688
16688
|
}
|
|
16689
16689
|
function hasSafeNativeHistoryMapping(args) {
|
|
16690
|
+
const isCoordinatorTranscript = args.nativeMessages.some((m) => {
|
|
16691
|
+
const text = typeof m?.content === "string" ? m.content : JSON.stringify(m?.content || "");
|
|
16692
|
+
return text.includes("mesh_send_task") || text.includes("mesh_status") || text.includes("mesh_read_chat") || text.includes("mesh_launch_session");
|
|
16693
|
+
});
|
|
16690
16694
|
const explicitSessionId = String(args.historySessionId || args.providerSessionId || "").trim();
|
|
16691
16695
|
if (explicitSessionId) {
|
|
16692
16696
|
const messageSessionIds = args.nativeMessages.map((message) => typeof message?.historySessionId === "string" ? message.historySessionId.trim() : "").filter(Boolean);
|
|
16693
|
-
if (messageSessionIds.length
|
|
16694
|
-
|
|
16697
|
+
if (messageSessionIds.length > 0) {
|
|
16698
|
+
return messageSessionIds.some((id) => id === explicitSessionId);
|
|
16699
|
+
}
|
|
16700
|
+
if (isCoordinatorTranscript && args.ptyMessages && args.ptyMessages.length > 0) {
|
|
16701
|
+
const ptyHasCoordinator = args.ptyMessages.some((m) => {
|
|
16702
|
+
const text = typeof m?.content === "string" ? m.content : JSON.stringify(m?.content || "");
|
|
16703
|
+
return text.includes("mesh_send_task") || text.includes("mesh_status") || text.includes("mesh_read_chat");
|
|
16704
|
+
});
|
|
16705
|
+
if (!ptyHasCoordinator) {
|
|
16706
|
+
return false;
|
|
16707
|
+
}
|
|
16708
|
+
}
|
|
16695
16709
|
}
|
|
16696
16710
|
const workspace = String(args.workspace || "").trim();
|
|
16697
16711
|
if (!workspace) return false;
|
|
16698
16712
|
const workspaceMatches = args.nativeMessages.some((message) => String(message?.workspace || "").trim() === workspace);
|
|
16699
16713
|
if (!workspaceMatches) return false;
|
|
16714
|
+
if (isCoordinatorTranscript && args.ptyMessages && args.ptyMessages.length > 0) {
|
|
16715
|
+
const ptyHasCoordinator = args.ptyMessages.some((m) => {
|
|
16716
|
+
const text = typeof m?.content === "string" ? m.content : JSON.stringify(m?.content || "");
|
|
16717
|
+
return text.includes("mesh_send_task") || text.includes("mesh_status") || text.includes("mesh_read_chat");
|
|
16718
|
+
});
|
|
16719
|
+
if (!ptyHasCoordinator) {
|
|
16720
|
+
return false;
|
|
16721
|
+
}
|
|
16722
|
+
}
|
|
16700
16723
|
if (!args.requireWorkspaceContentOverlap) return true;
|
|
16701
16724
|
return hasOverlappingVisibleConversationText(args.nativeMessages, args.ptyMessages || []);
|
|
16702
16725
|
}
|