agentgui 1.0.549 → 1.0.551

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 +2 -1
  2. package/server.js +7 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.549",
3
+ "version": "1.0.551",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
@@ -32,6 +32,7 @@
32
32
  "form-data": "^4.0.5",
33
33
  "fsbrowse": "^0.2.18",
34
34
  "google-auth-library": "^10.5.0",
35
+ "msgpackr": "^1.11.8",
35
36
  "node-pty": "^1.0.0",
36
37
  "onnxruntime-node": "1.21.0",
37
38
  "opencode-ai": "^1.2.15",
package/server.js CHANGED
@@ -1005,10 +1005,14 @@ const server = http.createServer(async (req, res) => {
1005
1005
 
1006
1006
  if (pathOnly === '/api/conversations' && req.method === 'GET') {
1007
1007
  const conversations = queries.getConversationsList();
1008
- // Filter out stale streaming state for conversations not in activeExecutions
1008
+ // Filter out stale streaming state: check both activeExecutions AND database active sessions
1009
1009
  for (const conv of conversations) {
1010
- if (conv.isStreaming && !activeExecutions.has(conv.id)) {
1011
- conv.isStreaming = 0;
1010
+ if (conv.isStreaming) {
1011
+ const hasActiveSession = queries.getSessionsByStatus(conv.id, 'active').length > 0 ||
1012
+ queries.getSessionsByStatus(conv.id, 'pending').length > 0;
1013
+ if (!activeExecutions.has(conv.id) && !hasActiveSession) {
1014
+ conv.isStreaming = 0;
1015
+ }
1012
1016
  }
1013
1017
  }
1014
1018
  sendJSON(req, res, 200, { conversations });