@yeaft/webchat-agent 0.1.183 → 0.1.185
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/claude.js +10 -0
- package/package.json +1 -1
package/claude.js
CHANGED
|
@@ -481,6 +481,16 @@ async function processClaudeOutput(conversationId, claudeQuery, state) {
|
|
|
481
481
|
// 检测后台任务
|
|
482
482
|
detectAndTrackBackgroundTask(conversationId, state, message);
|
|
483
483
|
|
|
484
|
+
// Debug: log assistant messages to help diagnose duplicate output issues
|
|
485
|
+
if (message.type === 'assistant') {
|
|
486
|
+
const text = typeof message.message?.content === 'string'
|
|
487
|
+
? message.message.content.substring(0, 80)
|
|
488
|
+
: Array.isArray(message.message?.content)
|
|
489
|
+
? message.message.content.map(b => b.type).join(',')
|
|
490
|
+
: '';
|
|
491
|
+
console.log(`[SDK] assistant msg for ${conversationId}: ${text}`);
|
|
492
|
+
}
|
|
493
|
+
|
|
484
494
|
sendOutput(conversationId, message);
|
|
485
495
|
}
|
|
486
496
|
} catch (error) {
|