agentgui 1.0.789 → 1.0.791
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.
|
@@ -72,14 +72,14 @@ export function register(deps) {
|
|
|
72
72
|
async function handleArchive(req, res, id) {
|
|
73
73
|
const conv = queries.archiveConversation(id);
|
|
74
74
|
if (!conv) { sendJSON(req, res, 404, { error: 'Not found' }); return; }
|
|
75
|
-
broadcastSync({ type: '
|
|
75
|
+
broadcastSync({ type: 'conversation_updated', conversation: conv, archived: true });
|
|
76
76
|
sendJSON(req, res, 200, { conversation: conv });
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
async function handleRestore(req, res, id) {
|
|
80
80
|
const conv = queries.restoreConversation(id);
|
|
81
81
|
if (!conv) { sendJSON(req, res, 404, { error: 'Not found' }); return; }
|
|
82
|
-
broadcastSync({ type: '
|
|
82
|
+
broadcastSync({ type: 'conversation_updated', conversation: conv, restored: true });
|
|
83
83
|
sendJSON(req, res, 200, { conversation: conv });
|
|
84
84
|
}
|
|
85
85
|
|
package/package.json
CHANGED
package/static/js/client.js
CHANGED
|
@@ -1379,9 +1379,11 @@ class AgentGUIClient {
|
|
|
1379
1379
|
}
|
|
1380
1380
|
|
|
1381
1381
|
outputEl.querySelectorAll('p.text-secondary').forEach(p => p.remove());
|
|
1382
|
+
const safeRole = this.escapeHtml(data.message.role || 'user');
|
|
1383
|
+
const safeId = this.escapeHtml(data.message.id || '');
|
|
1382
1384
|
const messageHtml = `
|
|
1383
|
-
<div class="message message-${
|
|
1384
|
-
<div class="message-role">${
|
|
1385
|
+
<div class="message message-${safeRole}" data-msg-id="${safeId}">
|
|
1386
|
+
<div class="message-role">${safeRole.charAt(0).toUpperCase() + safeRole.slice(1)}</div>
|
|
1385
1387
|
${this.renderMessageContent(data.message.content)}
|
|
1386
1388
|
<div class="message-timestamp">${new Date(data.message.created_at).toLocaleString()}</div>
|
|
1387
1389
|
</div>
|
|
@@ -1893,7 +1895,9 @@ class AgentGUIClient {
|
|
|
1893
1895
|
const dedupedChunks = chunks.filter(c => !seenSeqs || !seenSeqs.has(c.sequence));
|
|
1894
1896
|
|
|
1895
1897
|
if (dedupedChunks.length > 0) {
|
|
1896
|
-
for (const chunk of dedupedChunks)
|
|
1898
|
+
for (const chunk of dedupedChunks) {
|
|
1899
|
+
try { this.renderChunk(chunk); } catch (chunkErr) { console.warn('Skipping bad chunk:', chunkErr.message); }
|
|
1900
|
+
}
|
|
1897
1901
|
}
|
|
1898
1902
|
} catch (e) {
|
|
1899
1903
|
console.warn('Chunk recovery failed:', e.message);
|