@adhdev/daemon-core 0.9.82-rc.103 → 0.9.82-rc.105

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.82-rc.103",
3
+ "version": "0.9.82-rc.105",
4
4
  "description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1310,8 +1310,14 @@ export async function handleReadChat(h: CommandHelpers, args: any): Promise<Comm
1310
1310
  ? (nativeHistory as any).unavailableReason
1311
1311
  : undefined;
1312
1312
  const lookup = (nativeHistory as any).lookup === 'workspace' ? 'workspace' : 'session';
1313
+ const nativeHistorySessionForMapping = adapter.cliType === 'antigravity-cli'
1314
+ && historyProviderSessionId
1315
+ && nativeHistorySessionId
1316
+ && historyProviderSessionId !== nativeHistorySessionId
1317
+ ? undefined
1318
+ : nativeHistorySessionId;
1313
1319
  const safeMapping = hasSafeNativeHistoryMapping({
1314
- historySessionId: lookup === 'workspace' ? undefined : nativeHistorySessionId,
1320
+ historySessionId: lookup === 'workspace' ? undefined : nativeHistorySessionForMapping,
1315
1321
  providerSessionId: lookup === 'workspace' ? undefined : historyProviderSessionId || providerSessionId,
1316
1322
  workspace,
1317
1323
  nativeMessages,
@@ -541,6 +541,15 @@ export class CliProviderInstance implements ProviderInstance {
541
541
  }
542
542
  const mergedMessages = this.mergeConversationMessages(parsedMessages);
543
543
  const canonicalBackedHistory = this.syncCanonicalSavedHistoryIfNeeded();
544
+ const statusMessages = canonicalBackedHistory && this.lastPersistedHistoryMessages.length > 0
545
+ ? this.lastPersistedHistoryMessages.map((message) => ({
546
+ role: message.role,
547
+ content: message.content,
548
+ kind: message.kind,
549
+ senderName: message.senderName,
550
+ receivedAt: message.receivedAt,
551
+ }))
552
+ : mergedMessages;
544
553
 
545
554
  const dirName = this.workingDir.split('/').filter(Boolean).pop() || 'session';
546
555
  const parsedChatStatus = typeof parsedStatus?.status === 'string' && parsedStatus.status.trim()
@@ -607,7 +616,7 @@ export class CliProviderInstance implements ProviderInstance {
607
616
  id: activeChatId,
608
617
  title: parsedStatus?.title || dirName,
609
618
  status: activeChatStatus,
610
- messages: mergedMessages,
619
+ messages: statusMessages,
611
620
  activeModal: autoApproveActive ? null : (parsedStatus?.activeModal ?? adapterStatus.activeModal),
612
621
  inputContent: '',
613
622
  },