agentgui 1.0.60 → 1.0.61
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 +1 -1
- package/server.js +10 -13
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -455,19 +455,16 @@ async function processMessage(conversationId, messageId, sessionId, content, age
|
|
|
455
455
|
data: { promptSentTime: Date.now(), responseReceivedTime: Date.now() }
|
|
456
456
|
});
|
|
457
457
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
html: true,
|
|
469
|
-
streamUpdatesCount: streamHandler.getUpdateCount()
|
|
470
|
-
};
|
|
458
|
+
console.log(`[processMessage] ACP returned: stopReason=${result?.stopReason}, streamUpdates=${streamHandler.getUpdateCount()}`);
|
|
459
|
+
|
|
460
|
+
// Save agent's complete response as-is, without any processing
|
|
461
|
+
// The agent workflow must flow naturally - no HTML extraction or interference
|
|
462
|
+
const responseText = fullText || result?.result || 'No response.';
|
|
463
|
+
|
|
464
|
+
const messageContent = {
|
|
465
|
+
text: responseText,
|
|
466
|
+
streamUpdatesCount: streamHandler.getUpdateCount()
|
|
467
|
+
};
|
|
471
468
|
|
|
472
469
|
// Save consolidated response to database
|
|
473
470
|
const assistantMessage = queries.createMessage(conversationId, 'assistant', messageContent);
|