agentgui 1.0.726 → 1.0.727

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.726",
3
+ "version": "1.0.727",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/server.js CHANGED
@@ -1506,7 +1506,7 @@ const server = http.createServer(async (req, res) => {
1506
1506
  if (messagesMatch) {
1507
1507
  if (req.method === 'GET') {
1508
1508
  const url = new URL(req.url, 'http://localhost');
1509
- const limit = Math.min(parseInt(url.searchParams.get('limit') || '50'), 100);
1509
+ const limit = Math.min(parseInt(url.searchParams.get('limit') || '50'), 500);
1510
1510
  const offset = Math.max(parseInt(url.searchParams.get('offset') || '0'), 0);
1511
1511
  const result = queries.getPaginatedMessages(messagesMatch[1], limit, offset);
1512
1512
  sendJSON(req, res, 200, result);
@@ -2741,10 +2741,11 @@ class AgentGUIClient {
2741
2741
  return;
2742
2742
  }
2743
2743
  try {
2744
+ const base = window.__BASE_URL || '';
2744
2745
  const [convRes, chunksRes, msgsRes] = await Promise.all([
2745
- fetch(`/gm/api/conversations/${conversationId}`),
2746
- fetch(`/gm/api/conversations/${conversationId}/chunks`),
2747
- fetch(`/gm/api/conversations/${conversationId}/messages?limit=500`)
2746
+ fetch(`${base}/api/conversations/${conversationId}`),
2747
+ fetch(`${base}/api/conversations/${conversationId}/chunks`),
2748
+ fetch(`${base}/api/conversations/${conversationId}/messages?limit=500`)
2748
2749
  ]);
2749
2750
  const convData = await convRes.json();
2750
2751
  const chunksData = await chunksRes.json();
@@ -2834,14 +2835,7 @@ class AgentGUIClient {
2834
2835
  try {
2835
2836
  try {
2836
2837
  await window.wsClient.rpc('conv.full', { id: conversationId, allChunks: true });
2837
- } catch (wsErr) {
2838
- const [chunksRes, msgsRes] = await Promise.all([
2839
- fetch(`/gm/api/conversations/${conversationId}/chunks`),
2840
- fetch(`/gm/api/conversations/${conversationId}/messages?limit=500`)
2841
- ]);
2842
- const chunksData = await chunksRes.json();
2843
- const msgsData = await msgsRes.json();
2844
- }
2838
+ } catch (wsErr) {}
2845
2839
  this.invalidateCache(conversationId);
2846
2840
  await this.loadConversationMessages(conversationId);
2847
2841
  } catch (e) {
@@ -3111,7 +3105,8 @@ class AgentGUIClient {
3111
3105
  limit: 50
3112
3106
  });
3113
3107
  } catch (e) {
3114
- const r = await fetch(`/gm/api/conversations/${conversationId}/messages?limit=50`);
3108
+ const base = window.__BASE_URL || '';
3109
+ const r = await fetch(`${base}/api/conversations/${conversationId}/messages?limit=50`);
3115
3110
  const d = await r.json();
3116
3111
  result = { messages: d.messages || [] };
3117
3112
  }
@@ -3123,7 +3118,8 @@ class AgentGUIClient {
3123
3118
  limit: 500
3124
3119
  });
3125
3120
  } catch (e) {
3126
- const r = await fetch(`/gm/api/conversations/${conversationId}/chunks`);
3121
+ const base = window.__BASE_URL || '';
3122
+ const r = await fetch(`${base}/api/conversations/${conversationId}/chunks`);
3127
3123
  const d = await r.json();
3128
3124
  result = { chunks: d.chunks || [] };
3129
3125
  }