agentgui 1.0.490 → 1.0.492
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.
|
@@ -123,8 +123,16 @@ export function register(router, deps) {
|
|
|
123
123
|
} catch {
|
|
124
124
|
agents = output.split('\n')
|
|
125
125
|
.map(line => line.trim())
|
|
126
|
-
.filter(line =>
|
|
127
|
-
|
|
126
|
+
.filter(line => {
|
|
127
|
+
if (!line || line.startsWith('-') || line.startsWith('#')) return false;
|
|
128
|
+
if (/active agents?$/.test(line)) return false;
|
|
129
|
+
if (line.endsWith(':') && (line.includes('agents') || line.includes('agent'))) return false;
|
|
130
|
+
return true;
|
|
131
|
+
})
|
|
132
|
+
.map(line => {
|
|
133
|
+
let name = line.replace(/\s*-\s*inherit\s*$/, '').trim();
|
|
134
|
+
return { id: name.toLowerCase().replace(/\s+/g, '-'), name };
|
|
135
|
+
});
|
|
128
136
|
}
|
|
129
137
|
if (Array.isArray(agents) && agents.length > 0) {
|
|
130
138
|
return { subAgents: agents };
|
package/lib/ws-handlers-util.js
CHANGED
|
@@ -264,7 +264,9 @@ export function register(router, deps) {
|
|
|
264
264
|
status: t.installed ? (t.isUpToDate ? 'installed' : 'needs_update') : 'not_installed',
|
|
265
265
|
isUpToDate: t.isUpToDate,
|
|
266
266
|
upgradeNeeded: t.upgradeNeeded,
|
|
267
|
-
hasUpdate: t.upgradeNeeded && t.installed
|
|
267
|
+
hasUpdate: t.upgradeNeeded && t.installed,
|
|
268
|
+
installedVersion: t.installedVersion,
|
|
269
|
+
publishedVersion: t.publishedVersion
|
|
268
270
|
}));
|
|
269
271
|
return { tools: result };
|
|
270
272
|
} catch (e) {
|
package/package.json
CHANGED
package/static/js/client.js
CHANGED
|
@@ -147,6 +147,7 @@ class AgentGUIClient {
|
|
|
147
147
|
this.wsManager.on('connected', () => {
|
|
148
148
|
console.log('WebSocket connected');
|
|
149
149
|
this.updateConnectionStatus('connected');
|
|
150
|
+
this._subscribeToConversationUpdates();
|
|
150
151
|
this._recoverMissedChunks();
|
|
151
152
|
this.emit('ws:connected');
|
|
152
153
|
});
|
|
@@ -1378,6 +1379,13 @@ class AgentGUIClient {
|
|
|
1378
1379
|
}
|
|
1379
1380
|
}
|
|
1380
1381
|
|
|
1382
|
+
_subscribeToConversationUpdates() {
|
|
1383
|
+
if (!this.state.conversations || this.state.conversations.length === 0) return;
|
|
1384
|
+
for (const conv of this.state.conversations) {
|
|
1385
|
+
this.wsManager.subscribeToConversation(conv.id);
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1381
1389
|
async _recoverMissedChunks() {
|
|
1382
1390
|
if (!this.state.currentSession?.id) return;
|
|
1383
1391
|
if (!this.state.streamingConversations.has(this.state.currentConversation?.id)) return;
|
|
@@ -1581,7 +1589,7 @@ class AgentGUIClient {
|
|
|
1581
1589
|
let finalPrompt = prompt;
|
|
1582
1590
|
if (subAgent && agentId === 'claude-code') {
|
|
1583
1591
|
const displaySubAgent = subAgent.split('-·-')[0];
|
|
1584
|
-
finalPrompt = `use ${displaySubAgent} subagent to ${prompt}
|
|
1592
|
+
finalPrompt = `use ${displaySubAgent} subagent to ${prompt}`;
|
|
1585
1593
|
}
|
|
1586
1594
|
const streamBody = { id: conversationId, content: finalPrompt, agentId };
|
|
1587
1595
|
if (model) streamBody.model = model;
|
|
@@ -473,6 +473,10 @@ class WebSocketManager {
|
|
|
473
473
|
return this.sendMessage({ type: 'subscribe', sessionId, timestamp: Date.now() });
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
+
subscribeToConversation(conversationId) {
|
|
477
|
+
return this.sendMessage({ type: 'subscribe', conversationId, timestamp: Date.now() });
|
|
478
|
+
}
|
|
479
|
+
|
|
476
480
|
resubscribeAll() {
|
|
477
481
|
for (const key of this.activeSubscriptions) {
|
|
478
482
|
const [type, id] = key.split(':');
|