@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.js
CHANGED
|
@@ -16953,16 +16953,39 @@ function hasOverlappingVisibleConversationText(nativeMessages, ptyMessages) {
|
|
|
16953
16953
|
return false;
|
|
16954
16954
|
}
|
|
16955
16955
|
function hasSafeNativeHistoryMapping(args) {
|
|
16956
|
+
const isCoordinatorTranscript = args.nativeMessages.some((m) => {
|
|
16957
|
+
const text = typeof m?.content === "string" ? m.content : JSON.stringify(m?.content || "");
|
|
16958
|
+
return text.includes("mesh_send_task") || text.includes("mesh_status") || text.includes("mesh_read_chat") || text.includes("mesh_launch_session");
|
|
16959
|
+
});
|
|
16956
16960
|
const explicitSessionId = String(args.historySessionId || args.providerSessionId || "").trim();
|
|
16957
16961
|
if (explicitSessionId) {
|
|
16958
16962
|
const messageSessionIds = args.nativeMessages.map((message) => typeof message?.historySessionId === "string" ? message.historySessionId.trim() : "").filter(Boolean);
|
|
16959
|
-
if (messageSessionIds.length
|
|
16960
|
-
|
|
16963
|
+
if (messageSessionIds.length > 0) {
|
|
16964
|
+
return messageSessionIds.some((id) => id === explicitSessionId);
|
|
16965
|
+
}
|
|
16966
|
+
if (isCoordinatorTranscript && args.ptyMessages && args.ptyMessages.length > 0) {
|
|
16967
|
+
const ptyHasCoordinator = args.ptyMessages.some((m) => {
|
|
16968
|
+
const text = typeof m?.content === "string" ? m.content : JSON.stringify(m?.content || "");
|
|
16969
|
+
return text.includes("mesh_send_task") || text.includes("mesh_status") || text.includes("mesh_read_chat");
|
|
16970
|
+
});
|
|
16971
|
+
if (!ptyHasCoordinator) {
|
|
16972
|
+
return false;
|
|
16973
|
+
}
|
|
16974
|
+
}
|
|
16961
16975
|
}
|
|
16962
16976
|
const workspace = String(args.workspace || "").trim();
|
|
16963
16977
|
if (!workspace) return false;
|
|
16964
16978
|
const workspaceMatches = args.nativeMessages.some((message) => String(message?.workspace || "").trim() === workspace);
|
|
16965
16979
|
if (!workspaceMatches) return false;
|
|
16980
|
+
if (isCoordinatorTranscript && args.ptyMessages && args.ptyMessages.length > 0) {
|
|
16981
|
+
const ptyHasCoordinator = args.ptyMessages.some((m) => {
|
|
16982
|
+
const text = typeof m?.content === "string" ? m.content : JSON.stringify(m?.content || "");
|
|
16983
|
+
return text.includes("mesh_send_task") || text.includes("mesh_status") || text.includes("mesh_read_chat");
|
|
16984
|
+
});
|
|
16985
|
+
if (!ptyHasCoordinator) {
|
|
16986
|
+
return false;
|
|
16987
|
+
}
|
|
16988
|
+
}
|
|
16966
16989
|
if (!args.requireWorkspaceContentOverlap) return true;
|
|
16967
16990
|
return hasOverlappingVisibleConversationText(args.nativeMessages, args.ptyMessages || []);
|
|
16968
16991
|
}
|