@adhdev/daemon-core 0.8.39 → 0.8.40

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 CHANGED
@@ -5306,7 +5306,7 @@ var ChatHistoryWriter = class {
5306
5306
  const lines = newMessages.map((m) => JSON.stringify(m)).join("\n") + "\n";
5307
5307
  fs3.appendFileSync(filePath, lines, "utf-8");
5308
5308
  const prevCount = this.lastSeenCounts.get(dedupKey) || 0;
5309
- if (messages.length < prevCount * 0.5 && prevCount > 3) {
5309
+ if (!historySessionId && messages.length < prevCount * 0.5 && prevCount > 3) {
5310
5310
  seenHashes.clear();
5311
5311
  this.lastSeenSignatures.delete(dedupKey);
5312
5312
  this.lastSeenTurnSignatures.delete(dedupKey);
@@ -7885,16 +7885,7 @@ async function handleSendChat(h, args) {
7885
7885
  const provider = h.getProvider(args?.agentType);
7886
7886
  const transport = getTargetTransport(h, provider);
7887
7887
  const dedupeKey = buildRecentSendKey(h, args, provider, text);
7888
- const historySessionId = getHistorySessionId(h, args);
7889
7888
  const _logSendSuccess = (method, targetAgent) => {
7890
- h.historyWriter.appendNewMessages(
7891
- targetAgent || provider?.type || getCurrentProviderType(h, "unknown_agent"),
7892
- [{ role: "user", content: text, receivedAt: Date.now() }],
7893
- void 0,
7894
- // title
7895
- args?.targetSessionId,
7896
- historySessionId
7897
- );
7898
7889
  return { success: true, sent: true, method, targetAgent };
7899
7890
  };
7900
7891
  if (isRecentDuplicateSend(dedupeKey)) {