debug: log sentMsg raw and Reflect.ownKeys

This commit is contained in:
admin
2026-05-05 13:58:26 +00:00
Unverified
parent a4a9e31e79
commit 70815a73d2

View File

@@ -63,6 +63,11 @@ export async function sendStreamingMessage(ctx, text, options = {}) {
logger.info('📡 sentMsg constructor:', sentMsg?.constructor?.name);
logger.info('📡 sentMsg has result?:', 'result' in (sentMsg || {}));
// Force log the response to see what we're getting
logger.info('📡 sentMsg raw:', sentMsg);
logger.info('📡 sentMsg keys (Object.keys):', Object.keys(sentMsg || {}).join(', '));
logger.info('📡 sentMsg ownKeys (Reflect.ownKeys):', Reflect.ownKeys(sentMsg || {}).join(', '));
// The response might be wrapped in a 'result' property
const response = sentMsg?.result || sentMsg;
logger.info('📡 Response type:', typeof response);