@adhdev/daemon-standalone 0.9.82-rc.83 → 0.9.82-rc.84
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 +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/vendor/mcp-server/index.js +1 -0
- package/vendor/mcp-server/index.js.map +1 -1
package/dist/index.js
CHANGED
|
@@ -38254,6 +38254,15 @@ ${effect.notification.body || ""}`.trim();
|
|
|
38254
38254
|
function isGeneratingLikeStatus(status) {
|
|
38255
38255
|
return status === "generating" || status === "streaming" || status === "long_generating" || status === "starting";
|
|
38256
38256
|
}
|
|
38257
|
+
function hasVisibleAssistantMessage(messages) {
|
|
38258
|
+
if (!Array.isArray(messages)) return false;
|
|
38259
|
+
return messages.some((message) => {
|
|
38260
|
+
if (!message || message.role !== "assistant") return false;
|
|
38261
|
+
const kind = typeof message.kind === "string" ? message.kind : "standard";
|
|
38262
|
+
if (kind !== "standard") return false;
|
|
38263
|
+
return String(message.content || "").trim().length > 0;
|
|
38264
|
+
});
|
|
38265
|
+
}
|
|
38257
38266
|
function shouldTrustCliAdapterTerminalStatus(parsedStatus, activeModal, adapter, adapterStatus) {
|
|
38258
38267
|
if (!isGeneratingLikeStatus(parsedStatus)) return false;
|
|
38259
38268
|
if (hasNonEmptyModalButtons(activeModal)) return false;
|
|
@@ -38267,6 +38276,9 @@ ${effect.notification.body || ""}`.trim();
|
|
|
38267
38276
|
if (adapterRawStatus === "starting" && isGeneratingLikeStatus(parsedStatus) && !hasNonEmptyModalButtons(activeModal) && Array.isArray(parsedMessages) && parsedMessages.length === 0 && Array.isArray(adapterStatus?.messages) && adapterStatus.messages.length === 0 && !(typeof adapter.isProcessing === "function" && adapter.isProcessing())) {
|
|
38268
38277
|
return "starting";
|
|
38269
38278
|
}
|
|
38279
|
+
if (isGeneratingLikeStatus(adapterRawStatus) && parsedStatus === "idle" && !hasNonEmptyModalButtons(activeModal) && !hasVisibleAssistantMessage(parsedMessages)) {
|
|
38280
|
+
return adapterRawStatus;
|
|
38281
|
+
}
|
|
38270
38282
|
if (shouldTrustCliAdapterTerminalStatus(parsedStatus, activeModal, adapter, adapterStatus)) return "idle";
|
|
38271
38283
|
return typeof parsedStatus === "string" && parsedStatus.trim() ? parsedStatus : "idle";
|
|
38272
38284
|
}
|