@adhdev/daemon-standalone 0.9.37 → 0.9.38
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 +21 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/index-D1E8oaRi.css +1 -0
- package/public/assets/index-P-CZY-TK.js +83 -0
- package/public/assets/{terminal-DARrkn0u.js → terminal-DIKZc0f5.js} +10 -10
- package/public/index.html +2 -2
- package/public/assets/index-CTRSDimx.css +0 -1
- package/public/assets/index-GPf9-iir.js +0 -83
package/dist/index.js
CHANGED
|
@@ -41051,17 +41051,24 @@ ${effect.notification.body || ""}`.trim();
|
|
|
41051
41051
|
normalizePersistableCliHistoryContent(message.content)
|
|
41052
41052
|
].join("|");
|
|
41053
41053
|
}
|
|
41054
|
+
function hasSamePersistableCliHistoryIdentity(a, b2) {
|
|
41055
|
+
return String(a?.role || "") === String(b2?.role || "") && String(a?.kind || "") === String(b2?.kind || "") && String(a?.senderName || "") === String(b2?.senderName || "") && String(a?.content || "") === String(b2?.content || "");
|
|
41056
|
+
}
|
|
41054
41057
|
function buildIncrementalHistoryAppendMessages(previousMessages, currentMessages) {
|
|
41055
41058
|
if (!Array.isArray(currentMessages) || currentMessages.length === 0) return [];
|
|
41056
41059
|
if (!Array.isArray(previousMessages) || previousMessages.length === 0) return currentMessages;
|
|
41057
|
-
const
|
|
41058
|
-
const currentSignatures = currentMessages.map(buildPersistableCliHistorySignature);
|
|
41060
|
+
const comparableLength = Math.min(previousMessages.length, currentMessages.length);
|
|
41059
41061
|
let sharedPrefixLength = 0;
|
|
41060
|
-
while (sharedPrefixLength <
|
|
41062
|
+
while (sharedPrefixLength < comparableLength && hasSamePersistableCliHistoryIdentity(previousMessages[sharedPrefixLength], currentMessages[sharedPrefixLength])) {
|
|
41063
|
+
sharedPrefixLength += 1;
|
|
41064
|
+
}
|
|
41065
|
+
if (sharedPrefixLength === currentMessages.length) return [];
|
|
41066
|
+
if (sharedPrefixLength === previousMessages.length) return currentMessages.slice(sharedPrefixLength);
|
|
41067
|
+
while (sharedPrefixLength < comparableLength && buildPersistableCliHistorySignature(previousMessages[sharedPrefixLength]) === buildPersistableCliHistorySignature(currentMessages[sharedPrefixLength])) {
|
|
41061
41068
|
sharedPrefixLength += 1;
|
|
41062
41069
|
}
|
|
41063
|
-
if (sharedPrefixLength ===
|
|
41064
|
-
if (sharedPrefixLength ===
|
|
41070
|
+
if (sharedPrefixLength === currentMessages.length) return [];
|
|
41071
|
+
if (sharedPrefixLength === previousMessages.length) return currentMessages.slice(sharedPrefixLength);
|
|
41065
41072
|
return currentMessages;
|
|
41066
41073
|
}
|
|
41067
41074
|
var CachedDatabaseSync = null;
|
|
@@ -41307,13 +41314,15 @@ ${effect.notification.body || ""}`.trim();
|
|
|
41307
41314
|
}));
|
|
41308
41315
|
if (!canonicalBackedHistory && !shouldSkipReplayPersist && normalizedMessagesToSave.length > 0) {
|
|
41309
41316
|
const incrementalMessages = buildIncrementalHistoryAppendMessages(this.lastPersistedHistoryMessages, normalizedMessagesToSave);
|
|
41310
|
-
|
|
41311
|
-
this.
|
|
41312
|
-
|
|
41313
|
-
|
|
41314
|
-
|
|
41315
|
-
|
|
41316
|
-
|
|
41317
|
+
if (incrementalMessages.length > 0) {
|
|
41318
|
+
this.historyWriter.appendNewMessages(
|
|
41319
|
+
this.type,
|
|
41320
|
+
incrementalMessages,
|
|
41321
|
+
parsedStatus?.title || dirName,
|
|
41322
|
+
this.instanceId,
|
|
41323
|
+
this.providerSessionId
|
|
41324
|
+
);
|
|
41325
|
+
}
|
|
41317
41326
|
}
|
|
41318
41327
|
if (!canonicalBackedHistory) {
|
|
41319
41328
|
this.lastPersistedHistoryMessages = normalizedMessagesToSave;
|