agentgui 1.0.554 → 1.0.555
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 +1 -1
- package/static/js/client.js +17 -1
package/package.json
CHANGED
package/static/js/client.js
CHANGED
|
@@ -1179,9 +1179,11 @@ class AgentGUIClient {
|
|
|
1179
1179
|
outputEl.appendChild(queueEl);
|
|
1180
1180
|
}
|
|
1181
1181
|
|
|
1182
|
+
const isStreaming = this.state.streamingConversations.has(conversationId);
|
|
1182
1183
|
queueEl.innerHTML = queue.map((q, i) => `
|
|
1183
1184
|
<div class="queue-item" data-message-id="${q.messageId}" style="padding:0.5rem 1rem;margin:0.5rem 0;border-radius:0.375rem;background:var(--color-warning);color:#000;font-size:0.875rem;display:flex;align-items:center;gap:0.5rem;">
|
|
1184
1185
|
<span style="flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">${i + 1}. ${this.escapeHtml(q.content)}</span>
|
|
1186
|
+
${isStreaming ? `<button class="queue-steer-btn" data-index="${i}" style="padding:0.25rem 0.5rem;background:#06b6d4;border:1px solid #0891b2;border-radius:0.25rem;cursor:pointer;font-size:0.75rem;color:#fff;">Steer</button>` : ''}
|
|
1185
1187
|
<button class="queue-edit-btn" data-index="${i}" style="padding:0.25rem 0.5rem;background:transparent;border:1px solid #000;border-radius:0.25rem;cursor:pointer;font-size:0.75rem;">Edit</button>
|
|
1186
1188
|
<button class="queue-delete-btn" data-index="${i}" style="padding:0.25rem 0.5rem;background:transparent;border:1px solid #000;border-radius:0.25rem;cursor:pointer;font-size:0.75rem;">Delete</button>
|
|
1187
1189
|
</div>
|
|
@@ -1190,7 +1192,21 @@ class AgentGUIClient {
|
|
|
1190
1192
|
if (!queueEl._listenersAttached) {
|
|
1191
1193
|
queueEl._listenersAttached = true;
|
|
1192
1194
|
queueEl.addEventListener('click', async (e) => {
|
|
1193
|
-
if (e.target.classList.contains('queue-
|
|
1195
|
+
if (e.target.classList.contains('queue-steer-btn')) {
|
|
1196
|
+
const index = parseInt(e.target.dataset.index);
|
|
1197
|
+
const q = queue[index];
|
|
1198
|
+
try {
|
|
1199
|
+
const data = await window.wsClient.rpc('conv.steer', { id: conversationId, content: q.content });
|
|
1200
|
+
console.log('Steer response:', data);
|
|
1201
|
+
if (data.ok && data.steered) {
|
|
1202
|
+
// Remove from queue after successful steer
|
|
1203
|
+
await window.wsClient.rpc('q.del', { id: conversationId, messageId: q.messageId });
|
|
1204
|
+
}
|
|
1205
|
+
} catch (err) {
|
|
1206
|
+
console.error('Failed to steer:', err);
|
|
1207
|
+
this.showError('Failed to steer: ' + err.message);
|
|
1208
|
+
}
|
|
1209
|
+
} else if (e.target.classList.contains('queue-delete-btn')) {
|
|
1194
1210
|
const index = parseInt(e.target.dataset.index);
|
|
1195
1211
|
const msgId = queue[index].messageId;
|
|
1196
1212
|
if (await window.UIDialog.confirm('Delete this queued message?', 'Delete Message')) {
|