@adhdev/daemon-core 0.9.76-rc.33 → 0.9.76-rc.34
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 +22 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/chat-commands.ts +26 -0
package/package.json
CHANGED
|
@@ -502,6 +502,18 @@ function buildChatDebugBundleSummary(bundle: Record<string, unknown>): Record<st
|
|
|
502
502
|
const readChat = bundle.readChat && typeof bundle.readChat === 'object' ? bundle.readChat as Record<string, unknown> : {};
|
|
503
503
|
const cli = bundle.cli && typeof bundle.cli === 'object' ? bundle.cli as Record<string, unknown> : null;
|
|
504
504
|
const frontend = bundle.frontend && typeof bundle.frontend === 'object' ? bundle.frontend as Record<string, unknown> : null;
|
|
505
|
+
const debugReadChat = readChat.debugReadChat && typeof readChat.debugReadChat === 'object'
|
|
506
|
+
? readChat.debugReadChat as Record<string, unknown>
|
|
507
|
+
: {};
|
|
508
|
+
const parsedStatus = cli?.parsedStatus && typeof cli.parsedStatus === 'object'
|
|
509
|
+
? cli.parsedStatus as Record<string, unknown>
|
|
510
|
+
: null;
|
|
511
|
+
const cliParsedMessageCount = Array.isArray(parsedStatus?.messages) ? parsedStatus.messages.length : undefined;
|
|
512
|
+
const readChatReturnedMessages = Array.isArray(readChat.messagesTail) ? readChat.messagesTail.length : undefined;
|
|
513
|
+
const cliPartialResponse = typeof cli?.partialResponse === 'string' ? cli.partialResponse : '';
|
|
514
|
+
const readChatStatus = typeof readChat.status === 'string' ? readChat.status : '';
|
|
515
|
+
const cliStatus = typeof cli?.status === 'string' ? cli.status : '';
|
|
516
|
+
const cliParsedStatus = typeof parsedStatus?.status === 'string' ? parsedStatus.status : '';
|
|
505
517
|
return {
|
|
506
518
|
createdAt: bundle.createdAt,
|
|
507
519
|
targetSessionId: target.targetSessionId,
|
|
@@ -510,8 +522,22 @@ function buildChatDebugBundleSummary(bundle: Record<string, unknown>): Record<st
|
|
|
510
522
|
readChatSuccess: readChat.success,
|
|
511
523
|
readChatStatus: readChat.status,
|
|
512
524
|
readChatTotalMessages: readChat.totalMessages,
|
|
525
|
+
readChatReturnedMessages,
|
|
513
526
|
cliStatus: cli?.status,
|
|
527
|
+
cliParsedStatus: cliParsedStatus || undefined,
|
|
514
528
|
cliMessageCount: cli?.messageCount,
|
|
529
|
+
cliParsedMessageCount,
|
|
530
|
+
cliPartialResponseChars: cliPartialResponse.length,
|
|
531
|
+
parserAdapterStatusMismatch: Boolean(cliStatus && cliParsedStatus && cliStatus !== cliParsedStatus),
|
|
532
|
+
parserReadChatStatusMismatch: Boolean(readChatStatus && cliParsedStatus && readChatStatus !== cliParsedStatus),
|
|
533
|
+
readChatDebug: Object.keys(debugReadChat).length ? {
|
|
534
|
+
adapterStatus: debugReadChat.adapterStatus,
|
|
535
|
+
parsedStatus: debugReadChat.parsedStatus,
|
|
536
|
+
returnedStatus: debugReadChat.returnedStatus,
|
|
537
|
+
parsedMsgCount: debugReadChat.parsedMsgCount,
|
|
538
|
+
returnedMsgCount: debugReadChat.returnedMsgCount,
|
|
539
|
+
shouldPreferAdapterMessages: debugReadChat.shouldPreferAdapterMessages,
|
|
540
|
+
} : undefined,
|
|
515
541
|
hasFrontendSnapshot: !!frontend,
|
|
516
542
|
};
|
|
517
543
|
}
|