@adhdev/daemon-core 0.9.82-rc.255 → 0.9.82-rc.256
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 +11 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/providers/cli-provider-instance.ts +25 -29
package/dist/index.js
CHANGED
|
@@ -31175,8 +31175,17 @@ var CliProviderInstance = class {
|
|
|
31175
31175
|
};
|
|
31176
31176
|
}
|
|
31177
31177
|
completionFinalSummary(parsedMessages) {
|
|
31178
|
-
const
|
|
31179
|
-
|
|
31178
|
+
const adapterOwnsMessagesElsewhere = this.adapter?.chatMessagesOwnedExternally === true;
|
|
31179
|
+
const parsedSummary = extractFinalSummaryFromMessages(
|
|
31180
|
+
this.completionHasFinalAssistantMessage(parsedMessages) ? Array.isArray(parsedMessages) ? parsedMessages : [] : []
|
|
31181
|
+
);
|
|
31182
|
+
if (adapterOwnsMessagesElsewhere) {
|
|
31183
|
+
const externalMessages = this.readExternalCompletionMessages();
|
|
31184
|
+
const externalSummary = externalMessages ? extractFinalSummaryFromMessages(externalMessages) : "";
|
|
31185
|
+
if (externalSummary) return externalSummary;
|
|
31186
|
+
return parsedSummary || void 0;
|
|
31187
|
+
}
|
|
31188
|
+
return parsedSummary || void 0;
|
|
31180
31189
|
}
|
|
31181
31190
|
buildCompletedFinalizationDiagnostic(args) {
|
|
31182
31191
|
let parsed = null;
|
|
@@ -31275,20 +31284,6 @@ var CliProviderInstance = class {
|
|
|
31275
31284
|
const adapterOwnsMessagesElsewhere = this.adapter?.chatMessagesOwnedExternally === true;
|
|
31276
31285
|
const finalAssistantEvidence = this.completionFinalAssistantEvidence(parsed?.messages);
|
|
31277
31286
|
const allowMissingAssistantTimeout = !!(this.settings.meshNodeFor || this.settings.meshActiveTaskId || this.settings.launchedByCoordinator);
|
|
31278
|
-
if (adapterOwnsMessagesElsewhere && finalAssistantEvidence.source === "external-native") {
|
|
31279
|
-
const prevProbe = (pending.transcriptProbeHistory || [])[(pending.transcriptProbeHistory?.length ?? 0) - 1];
|
|
31280
|
-
this.readExternalCompletionMessages();
|
|
31281
|
-
const settleProbe = this.lastExternalCompletionProbe;
|
|
31282
|
-
if (settleProbe && prevProbe) {
|
|
31283
|
-
const stillGrowing = settleProbe.msgCount > prevProbe.msgCount || settleProbe.lastRole === "assistant" && settleProbe.contentLen > prevProbe.contentLen;
|
|
31284
|
-
if (stillGrowing) {
|
|
31285
|
-
this.recordPendingTranscriptProbe(pending);
|
|
31286
|
-
return { reason: `transcript_settling:${prevProbe.contentLen}->${settleProbe.contentLen}`, terminal: false };
|
|
31287
|
-
}
|
|
31288
|
-
} else if (settleProbe) {
|
|
31289
|
-
this.recordPendingTranscriptProbe(pending);
|
|
31290
|
-
}
|
|
31291
|
-
}
|
|
31292
31287
|
LOG.debug("CLI", `[${this.type}] finalAssistantEvidence: present=${finalAssistantEvidence.present} source=${finalAssistantEvidence.source} adapterOwnsMessagesElsewhere=${adapterOwnsMessagesElsewhere} parsedStatus=${parsedStatus}`);
|
|
31293
31288
|
if (!finalAssistantEvidence.present) {
|
|
31294
31289
|
if (adapterOwnsMessagesElsewhere) {
|