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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +10 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.60",
3
+ "version": "1.0.61",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
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
- console.log(`[processMessage] ACP returned: stopReason=${result?.stopReason}, streamUpdates=${streamHandler.getUpdateCount()}`);
459
-
460
- // Agent sends HTML directly - no conversion needed
461
- // Extract HTML code block from response
462
- const responseText = fullText || result?.result || 'No response.';
463
- const htmlMatch = responseText.match(/```html\n([\s\S]*?)\n```/);
464
- const htmlContent = htmlMatch ? htmlMatch[1] : responseText;
465
-
466
- const messageContent = {
467
- text: htmlContent,
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);